Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Mr Stuff on June 23, 2017, 07:56:25 pm
-
(BPMN2.0 collaboration digram; EA 12.1 on W7 64 bit)
An Action is converted to an Activity by setting Type="Activity" and Stereotype = "BPMN2.0::Activity", the calledActivityRef is set from the Action's callbehaviour; the Call Behavior is cleared (manually, afterwards)
Control and Object flow but not Sequence Flow connectors can be created from/to the Activity in the UI
None of activityType & sub taskType tagged value values make any difference. It is not the presence of calledActivityRef disabling sequencing as adding that to a fresh element does not change its ability to support sequence flow.
I cannot see any difference between the element I converted to Activity and the BPMN2.0 Activity I created from the BPMN2.0 tools palette - in particular, apart from the name I cannot see (might have missed something!) any difference in TaggedValue values.
How can I make the converted activity support Sequence Flow? (Getting very frustrated :-[)
Thanks
Julian
-
Look closely into t_xref. The difference between the two might be hiding there.
Geert
-
Hi Try
This code
private EA.Connector createSequenceFlow(EA.Repository repository, Element source, Element target)
{
// Get corresponding elements from EA
EA.Element EASource = repository.GetElementByGuid(source.Guid);
EA.Element EATarget = repository.GetElementByGuid(target.Guid);
EA.Connector sequenceFlowTo = EASource.Connectors.AddNew("", "BPMN2.0::SequenceFlow");
sequenceFlowTo.SupplierID = EATarget.ElementID;
sequenceFlowTo.Update();
return sequenceFlowTo;
}
This is written in C#, but you should be able to use to create your script
All the best#
Phil
-
To get a gist you should create both the native and the converted action in an empty EAP. Then query t_object (and probably t_xref) to directly compare the two elements. That should make it clear where the issue is buried.
q.
-
Well... SEQUENCE FLOW IS NOW SUPPORTED!
I did look at object and xref without much insight (differences obvious but what to do about them far from obvious) so...
TL;DR I just ran Geert's synchronize script with no expectations but it ran OK... so then I idly, manually changed the Stereotype and Type to Activity... and lo and behold Sequence Flow was supported on the transformed elements.
So, I added a couple of lines to the script to do the same and... that also worked!
Amazing what can be done when you give up trying and just start doing random stuff.
Thanks everyone for all the input.
Julian
-
Julian,
Make sure you always use the property Element.StereotypeEx when handling stereotypes in scripts.
Element.Stereotype doesn't work as well.
Geert
-
Thanks Geert, that info is safely stored now ;)