|
Re: Add new workflow pattern [message #1602568 is a reply to message #1599775] |
Thu, 05 February 2015 16:58  |
|
Hi Imen,
Sorry for the late reply - I was trying to put together an example of how to do this and ran across a minor bug which has been fixed in the latest builds for Luna [1] and Kepler [2]. Here's the solution:
1. create a folder called ".bpmn2config" in your workspace project (the one that contains the BPMN2 files you want to edit)
2. create an XML file called, for example, "toolpaletteExtensions.xml" in that folder. Note that the file name is unimportant - the editor will search and load all XML files in that folder
3. add the following XML to this file:
<?xml version="1.0" encoding="UTF-8"?>
<runtime id="org.eclipse.bpmn2.modeler.runtime.none">
<toolPalette
id="org.bpmn2.modeler.toolpalette.my.full"
runtimeId="org.eclipse.bpmn2.modeler.runtime.none"
profile="Full">
<category id="org.bpmn2.modeler.toolpalette.default.categories"/>
<category id="org.bpmn2.modeler.toolpalette.process.patterns" fromPalette="org.bpmn2.modeler.toolpalette.full">
<tool name="Parallel Join" id="org.bpmn2.modeler.tool.parallel.join">
<object type="Task[$name='Task A']" id="parallel.join.taskA" optional="true"/>
<object type="Task[$name='Task B',y=100]" id="parallel.join.taskB" optional="true"/>
<object type="Task[$name='Task C',x=200,y=50]" id="parallel.join.taskC" optional="true"/>
<object type="ParallelGateway[x=100,y=50,$gatewayDirection=Converging]" id="parallel.join.gateway"/>
<object type="SequenceFlow[source='parallel.join.taskA',target='parallel.join.gateway']"/>
<object type="SequenceFlow[source='parallel.join.taskB',target='parallel.join.gateway']"/>
<object type="SequenceFlow[source='parallel.join.gateway',target='parallel.join.taskC']"/>
</tool>
</category>
</toolPalette>
</runtime>
Restart the editor and you should see the "Parallel Join" tool in the "Workflow Patterns" category. Once you're happy with the way this tool works, you can build an extension plugin and include this code in your plugin.xml, or you can simply deliver the ".bpmn2config" folder and its contents to your users.
You can find documentation for the <toolPalette> extension element in the Extension XSD located in the editor Core plugin here:
org.eclipse.bpmn2-modeler/plugins/org.eclipse.bpmn2.modeler.core/schema/org.eclipse.bpmn2.modeler.runtime.exsd
HTH,
Bob
[1] http://download.eclipse.org/bpmn2-modeler/updates/luna/1.1.2/
[2] http://download.eclipse.org/bpmn2-modeler/updates/kepler/1.0.4/
[Updated on: Thu, 05 February 2015 17:05] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.01876 seconds