61
Automation Interface, Add-Ins and Tools / Re: Synchronise stereotype: tagged value groups
« on: November 15, 2013, 12:03:56 am »
For those interested in this topic:
1) This query selects the xref description for all objects of a certain stereotype in a certain MDG technology: (As you can see, the t_xref.client corresponds with the t_object.ea_guid)
2) The xref.description looks like this:
3) The xref.description actually contains the properties of the <AppliesTo> in the MDG technology:
The problem is that EA forgets to update this t_xref.description when synchronising a stereotype. So with an update script, it's easy to solve this problem.
Greets
S.
1) This query selects the xref description for all objects of a certain stereotype in a certain MDG technology: (As you can see, the t_xref.client corresponds with the t_object.ea_guid)
Code: [Select]
SELECT obj.object_id, obj.name AS ElementName, xref.description
FROM t_xref AS xref INNER JOIN t_object AS obj ON xref.client = obj.ea_guid
WHERE xref.description LIKE '%<Name of MDG>%' AND xref.name = 'CustomProperties' AND obj.stereotype = '<Stereotype>'
2) The xref.description looks like this:
Code: [Select]
@PROP=@NAME=_defaultDiagramType@ENDNAME;@TYPE=string@ENDTYPE;@VALU=UML Behavioral::Use Case@ENDVALU;@PRMT=@ENDPRMT;@ENDPROP;
@PROP=@NAME=_subtypeProperty@ENDNAME;@TYPE=string@ENDTYPE;@VALU=Partena BPMN::Activity::TaskType@ENDVALU;@PRMT=@ENDPRMT;@ENDPROP;
@PROP=@NAME=_tagGroups@ENDNAME;@TYPE=string@ENDTYPE;@VALU=Task,Measures,Loop,Project@ENDVALU;@PRMT=@ENDPRMT;@ENDPROP;
@PROP=@NAME=_tagGroupings@ENDNAME;@TYPE=string@ENDTYPE;@VALU=TitelFR=Task;TitelNL=Task;taskPriority=Task;activityType=Task;TaskType=Task;DescriptionEN=Task;DescriptionFR=Task;DescriptionNL=Task;Frequency=Measures;AverageTime=Measures;isSequential=Loop;loopCharacteristics=Loop;Status=Project;@ENDVALU;@PRMT=@ENDPRMT;@ENDPROP;
@PROP=@NAME=_tagGroupStates@ENDNAME;@TYPE=string@ENDTYPE;@VALU=Task=open;Measures=closed;Loop=closed;Project=closed@ENDVALU;@PRMT=@ENDPRMT;@ENDPROP;
3) The xref.description actually contains the properties of the <AppliesTo> in the MDG technology:
Code: [Select]
<AppliesTo>
<Apply type="Activity">
<Property name="_defaultDiagramType" value="UML Behavioral::Use Case"/>
<Property name="_subtypeProperty" value="Partena BPMN::Activity::TaskType"/>
<Property name="_tagGroups" value="Task,Measures,Loop,Project"/>
<Property name="_tagGroupings" value="TitelFR=Task;TitelNL=Task;taskPriority=Task;activityType=Task;TaskType=Task;DescriptionEN=Task;DescriptionFR=Task;DescriptionNL=Task;Frequency=Measures;AverageTime=Measures;isSequential=Loop;loopCharacteristics=Loop;Status=Project;"/>
<Property name="_tagGroupStates" value="Task=open;Measures=closed;Loop=closed;Project=closed"/>
The problem is that EA forgets to update this t_xref.description when synchronising a stereotype. So with an update script, it's easy to solve this problem.
Greets
S.