Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: ktaylor on December 03, 2016, 07:24:14 am

Title: Microsft Visio extension - Importing BPMN
Post by: ktaylor on December 03, 2016, 07:24:14 am
I've been playing around with the MS Visio extension in an attempt to import some BPMN 2.0 processes. The extension does import my process maps but only in UML. Is there a way to convert a UML diagram to BPMN 2.0 within EA?
Title: Re: Microsft Visio extension - Importing BPMN
Post by: Sunshine on December 05, 2016, 06:00:08 pm
Yes if you import the Visio BPMN diagram in as UML activity you can then create a JScript or VBScript in Sparx EA to translate the UML object type to BPMN object type and stereotype.
Do a search on the forum and you'll find some code examples;
Here are some I've posted in the past
http://sparxsystems.com/forums/smf/index.php/topic,31109.msg225449.html#msg225449 (http://sparxsystems.com/forums/smf/index.php/topic,31109.msg225449.html#msg225449)
http://sparxsystems.com/forums/smf/index.php/topic,30653.msg223132.html#msg223132 (http://sparxsystems.com/forums/smf/index.php/topic,30653.msg223132.html#msg223132)
Just change the Conversions array at the top to do your mappings from UML activity to BPMN
Code: [Select]
Conversions[0] = new TypeConversion("Class", "ArchiMate_Requirement", "Class", "Requirement");Where
TypeConversion parameters are sourceObject, sourceStereotype, targetObject, targetStereotype
Add more conversions in the array to deal with events, activities, gateways etc.
Code: [Select]
Conversions[1] = new TypeConversion("Class", "ArchiMate_Actor", "Actor", "Actor");
You could always write some SQL too which would be faster to execute.