Sounds like you've just added the tag values to one of the BPMN 2.0 <<BusinessProcess>> elements rather than define a stereotype with the extra tag values so synching tagged values as won't work.
AFAIKT there are only two ways to add those extra tagged values on mass other than do it manually;
a) Create an MDG with stereotype that has the extra tagged values that extend BPMN 2.0. Then change all the stereotypes and synch tagged values to add all the tagged values. This approach has the advantage that new elements will be created with the tagged values. However this is a fair amount of work and probably a bit more effort than just simply added the tagged values manually.
b) Use a script such as JScript to navigate all the elements down the hierarchy and add the tagged values if they don't already exist. However you'll need to run this periodically as new BPMN elements won't have the tagged values by default.
Probably option b) is your way forward. You'll need some skills in JScript. I did something similar a while back where I needed to change tagged values on mass, see code below. If you modify the tag names and values in the function ChangeElementTags() then run it should work. Caution: I'd test it on a copy of your repository first rather than just run it on your live data. Once your happy its works then copy the code onto the live repository and run it. You'll then need to run it to update any new BPMN Business Processes to add the tag values to them.
NOTE whilst trying this out I did notice getting access to tag values for business process on V14 was a little more difficult than V13.5. I could only see the tagged values in the element properties dialog using special actions in the context menu from a diagram.
!INC Local Scripts.EAConstants-JScript
/*
* This script should be stored as JScript under a Project Brower Group so
* it can be executed from the context menu in the project browser
*
* Script Name: Add Tagged Values
* Author: Sunshine
* Purpose: Adds tagged values to BPMN stereotype <BusinessProcess>
* Date: 3/08/2018
*/
/*
* Project Browser Script main function
*/
function OnProjectBrowserScript()
{
// Get the type of element selected in the Project Browser
var treeSelectedType = Repository.GetTreeSelectedItemType();
switch ( treeSelectedType )
{
case otElement :
{
// Code for when an element is selected
var theElement as EA.Element;
theElement = Repository.GetTreeSelectedObject();
ChangeElements( '', theElement);
break;
}
case otPackage :
{
// Code for when a package is selected
var thePackage as EA.Package;
thePackage = Repository.GetTreeSelectedObject();
NavigatePackage(" ",thePackage);
Session.Prompt( "Script Completed, TagValues Added", promptOK );
break;
}
default:
{
// Error message
Session.Prompt( "This script does not support items of this type. Please select a package", promptOK );
}
}
}
function NavigatePackage( indent, thePackage )
{
// Cast thePackage to EA.Package so we get intellisense
var currentPackage as EA.Package;
currentPackage = thePackage;
// Add the current package's name to the list
Session.Output( indent + currentPackage.Name + " (PackageID=" +
currentPackage.PackageID + ")" );
// Convert the elements this package contains
ChangeElementsInPackage( indent + " ", currentPackage );
// Recursively process any child packages
var childPackageEnumerator = new Enumerator( currentPackage.Packages );
while ( !childPackageEnumerator.atEnd() )
{
var childPackage as EA.Package;
childPackage = childPackageEnumerator.item();
NavigatePackage( indent + " ", childPackage );
childPackageEnumerator.moveNext();
}
}
function ChangeElementsInPackage( indent, thePackage )
{
// Cast thePackage to EA.Package so we get intellisense
var currentPackage as EA.Package;
currentPackage = thePackage;
// Iterate through all elements and add them to the list
var elementEnumerator = new Enumerator( currentPackage.Elements );
while ( !elementEnumerator.atEnd() )
{
var currentElement as EA.Element;
currentElement = elementEnumerator.item();
ChangeElements(indent+" ",currentElement );
elementEnumerator.moveNext();
}
}
function ChangeElements( indent, theElement )
{
// if workpackage then do change
if (theElement.Stereotype === "BusinessProcess")
{
ChangeElementTags(indent+" ",theElement );
// Iterate through all embedded elements and add them to the list
var elementEnumerator = new Enumerator( theElement.Elements );
while ( !elementEnumerator.atEnd() )
{
var currentElement as EA.Element;
currentElement = elementEnumerator.item();
// if workpackage then do change
ChangeElements(indent+" ",currentElement );
elementEnumerator.moveNext();
}
}
}
function TagValue(tagName,tagValue,tagNotes)
{
this.tagName = tagName;
this.tagValue = tagValue;
this.tagNotes = tagNotes
}
// Change element tagValues
function ChangeElementTags( indent, theElement )
{
// Cast theElement to EA.Element so we get intellisense
var currentElement as EA.Element;
currentElement = theElement;
var tagValues = new Array();
//Tag Values to add for BPMN:BusinessProcess
tagValues[0] = new TagValue("TaggedValueName0", "DefaultValue0",""); // Value
tagValues[1] = new TagValue("TaggedValueName1", "DefaultValue1",""); // Value
tagValues[2] = new TagValue("TaggedValueName2", "<memo>","DefaultNotes2"); //Notes
tagValues[3] = new TagValue("TaggedValueName3", "<memo>","DefaultNotes3"); // Notes
var tagEnumerator = new Enumerator( tagValues );
Session.Output( "Processing Element: " + theElement.Name );
while ( !tagEnumerator.atEnd() )
{
//Session.Output( "Processing Element: " + theElement.Name + ", TagValue:"+tagEnumerator.item());
//Add Tagged Value to Element preserving any existing tagged values
// Set Tagged Notes
//SetElementTaggedNotes(theElement,tagEnumerator.item().tagName, tagEnumerator.item().tagValue,false);
// Set Tagged Value
if (theElement.TaggedValues.GetByName( tagEnumerator.item().tagName ) == null)
{
//If tagname does not exist then add it.
SetElementTaggedValue(theElement,tagEnumerator.item().tagName, tagEnumerator.item().tagValue,tagEnumerator.item().tagNotes,true);
}
tagEnumerator.moveNext();
}
theElement.Update();
}
/**
* Retrieves the TaggedValue value from the provided element whose name matches the specified name.
* If the element does not exist, or does not contain a TaggedValue with the specified name, null
* is returned.
*
* @param[in] theElement (EA.Element) The element to retrieve the TaggedValue value from
* @param[in] taggedValueName (String) The name of the TaggedValue whose value will be retrieved
*
* @return The value of the requested TaggedValue in variant form
*/
function GetElementTaggedValue( theElement /* : EA.Element */, taggedValueName /* : String */, defaultValue /* : String */ ) /* : variant */
{
var result = defaultValue;
if ( theElement != null && taggedValueName.length > 0 )
{
var taggedValue as EA.TaggedValue;
taggedValue = theElement.TaggedValues.GetByName( taggedValueName );
if ( taggedValue != null )
{
result = taggedValue.Value;
Session.Output( "Element Value: " + theElement.Name + " TagValue:"+taggedValueName + "Value = " + result)
}
else
{
Session.Output( "ERROR Element Value: " + theElement.Name + " TagValue:"+taggedValueName + "Doesn't exist");
}
}
return result;
}
function GetElementTaggedNotes( theElement /* : EA.Element */, taggedValueName /* : String */, defaultValue /* : String */ ) /* : variant */
{
var result = defaultValue;
if ( theElement != null && taggedValueName.length > 0 )
{
var taggedValue as EA.TaggedValue;
taggedValue = theElement.TaggedValues.GetByName( taggedValueName );
if ( taggedValue != null )
result = taggedValue.Notes;
}
return result;
}
/**
* Sets the specified TaggedValue on the provided element. If the provided element does not already
* contain a TaggedValue with the specified name, a new TaggedValue is created with the requested
* name and value. If a TaggedValue already exists with the specified name then action to take is
* determined by the replaceExisting variable. If replaceExisting is set to true, the existing value
* is replaced with the specified value, if not, a new TaggedValue is created with the new value.
*
* @param[in] theElement (EA.Element) The element to set the TaggedValue value on
* @param[in] taggedValueName (String) The name of the TaggedValue to set
* @param[in] taggedValueValue (variant) The value of the TaggedValue to set
* @param[in] replaceExisting (boolean) If a TaggedValue of the same name already exists, specifies
* whether to replace it, or create a new TaggedValue.
*/
function SetElementTaggedValue( theElement /* : EA.Element */, taggedValueName /* : String */, taggedValueValue /* : variant */, taggedValueNotes /* : variant */,replaceExisting /* : boolean */ ) /* : void */
{
if ( theElement != null && taggedValueName.length > 0 )
{
var taggedValue as EA.TaggedValue;
taggedValue = null;
// If replace existing was specified then attempt to get a tagged value from the element
// with the provided name
if ( replaceExisting )
taggedValue = theElement.TaggedValues.GetByName( taggedValueName );
if ( taggedValue == null )
{
//Add a new taggedValue
taggedValue = theElement.TaggedValues.AddNew( taggedValueName, taggedValueValue );
taggedValue.Notes = taggedValueNotes;
Session.Output( " Added Element: " + theElement.Name+ ' TaggedValue:'+ taggedValueName + " ="+ taggedValueValue);
}
else
{
taggedValue.Value = taggedValueValue;
taggedValue.Notes = taggedValueNotes;
Session.Output( " Updated Element: " + theElement.Name+ ' TaggedValue:'+ taggedValueName + " ="+ taggedValueValue);
}
taggedValue.Update();
}
}
function SetElementTaggedNotes( theElement /* : EA.Element */, taggedValueName /* : String */, taggedValueNotes /* : variant */, replaceExisting /* : boolean */ ) /* : void */
{
if ( theElement != null && taggedValueName.length > 0 )
{
var taggedValue as EA.TaggedValue;
taggedValue = null;
// If replace existing was specified then attempt to get a tagged value from the element
// with the provided name
if ( replaceExisting )
taggedValue = theElement.TaggedValues.GetByName( taggedValueName );
if ( taggedValue == null )
{
taggedValue = theElement.TaggedValues.AddNew( taggedValueName, "<memo>" );
taggedValue.Notes = taggedValueNotes;
}
else
{
taggedValue.Notes = taggedValueNotes;
}
taggedValue.Update();
}
}
function DeleteElementTaggedValue( theElement /* : EA.Element */, taggedValueName /* : String */ ) /* : void */
{
if ( theElement != null && taggedValueName.length > 0 )
{
var taggedValue as EA.TaggedValue;
taggedValue = null;
// var taggedValueArray as EA.Element.TaggedValues;
// taggedValue = theElement.TaggedValues
for ( var i = 0; i < theElement.TaggedValues.Count; i++ )
{
// Session.Output( "DELETING Element: "+ theElement.Name + " TagValue:"+ taggedValueName);
taggedValue = theElement.TaggedValues.GetAt(i);
// If the element is the one we just added, then delete it
if ( taggedValue.Name == taggedValueName )
{
Session.Output( " Deleted Element: " + theElement.Name + ", TagValue:"+theElement.TaggedValues.GetAt(i).Name);
theElement.TaggedValues.DeleteAt(i,false);
theElement.TaggedValues.Refresh();
break;
}
}
}
}
OnProjectBrowserScript();