2 Replies Latest reply on Mar 20, 2014 10:11 AM by dapengking

    How to defining a process with diverge gateway node using api of jbpm5.4

    dapengking

      Hi everyone :

           I want to build a process definition using api of jbpm5.4 . And I already read about the "6.1.3. Defining Processes Using the Process API" in the jBPM User Guide . Now I have finished a demo from the User Guide , and it can work well . But the process definition in the demo (like the code below ) only have one node and I want to add a node like "diverge gateway" , so that it could have many branches .

           Now I have read all document I could found , but it seemed that there is nothing tell about this issue . I don't konw what to do . Have anybody done this work before ? and tell something about this ? Any help will be thankfull~

       

      best regards.

       

      factory
      
          // Header
      
          .name("HelloWorldProcess")
      
          .version("1.0")
      
          .packageName("org.jbpm")
      
          // Nodes
      
          .startNode(1).name("Start").done()
      
          .actionNode(2).name("Action")
      
              .action("java", "System.out.println(\"Hello World\");").done()
      
          .endNode(3).name("End").done()
      
          // Connections
      
          .connection(1, 2)
      
          .connection(2, 3);