Discussion:
[jboss-user] [jBPM] - how can i do, make it to work? about signal event
bird86
2013-03-22 08:39:24 UTC
Permalink
bird86 [https://community.jboss.org/people/bird86] created the discussion

"how can i do, make it to work? about signal event"

To view the discussion, visit: https://community.jboss.org/message/804221#804221

--------------------------------------------------------------
”my/test/event/signal/signalevent.bpmn“

<process processType="Private" isExecutable="true" id="signalevent" name="" >
    <!-- nodes -->
    <startEvent id="_1" name="Start" />
    <intermediateCatchEvent id="_2" name="Signal" >
      <signalEventDefinition signalRef="signalevent"/>
    </intermediateCatchEvent>
    <endEvent id="_3" name="End" >
        <terminateEventDefinition/>
    </endEvent>
    <!-- connections -->
    <sequenceFlow id="_1-_2" sourceRef="_1" targetRef="_2" />
    <sequenceFlow id="_2-_3" sourceRef="_2" targetRef="_3" />
  </process>



public class SignalEventTest extends MyJbpm5TestCase {
 
 
          public void testSignalEvent() {
                    String[] pro = { "my/test/event/signal/signalevent.bpmn" };
                    StatefulKnowledgeSession ksession = newStatefulKnowledgeSession(pro,
                                        new String[]{});
                    ProcessInstance startProcess = ksession.startProcess("signalevent");
                    long processInstanceId = startProcess.getId();
                    //myAssertNodeActive(processInstanceId, ksession, new String[] { "Signal" });
 
                    WorkflowProcessInstance processInstance = (WorkflowProcessInstance)ksession.getProcessInstance(processInstanceId);
                    println(processStateName[processInstance.getState()]);
                    Collection<NodeInstance> nodeInstances = processInstance.getNodeInstances();
                    for (NodeInstance nodeInstance : nodeInstances) {
                              if(nodeInstance==null){
                                        println("nodeInstance==null");
                              }else{
                                        println(nodeInstance.getNodeName());
                              }
                    }
          }
 
}


https://community.jboss.org/servlet/JiveServlet/showImage/2-804221-20496/%E6%96%B0%E5%BB%BA%E4%BD%8D%E5%9B%BE%E5%9B%BE%E5%83%8F.bmp https://community.jboss.org/servlet/JiveServlet/downloadImage/2-804221-20496/450-158/%E6%96%B0%E5%BB%BA%E4%BD%8D%E5%9B%BE%E5%9B%BE%E5%83%8F.bmp
Sorry, My English is very poor!!!!
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/804221#804221]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Loading...