パターンNo.5 Simple Merge
で、確認実装はこれ
public class SimpleMergeTest extends TestCase { public void testSimpleProcess() throws Exception { // Extract a process definition from the processdefinition.xml file. FileInputStream fis = new FileInputStream("processes/simpleMerge.par/processdefinition.xml"); ProcessDefinition processDefinition = ProcessDefinition.parseXmlInputStream(fis); // Create an instance of the process definition. ProcessInstance instance = new ProcessInstance(processDefinition); instance.signal("toA"); //<--明示的に指定! Token root = instance.getRootToken(); assertSame( processDefinition.getNode("a"), root.getNode() ); root.signal(); //<--遷移しれ! assertSame( processDefinition.getNode("c"), root.getNode() ); } }
実はmergeノードがjBPMの場合は存在しているが、普通のstateの裏側で動いている。デザイナツールにもmergeノードは存在していない。