[jboss-user] [jBPM] New message: "Re: Problem Signaling a Waiting Execution"

Santanu Saraswati do-not-reply at jboss.com
Wed Jan 20 04:15:57 EST 2010


User development,

A new message was posted in the thread "Problem Signaling a Waiting Execution":

http://community.jboss.org/message/521001#521001

Author  : Santanu Saraswati
Profile : http://community.jboss.org/people/saraswati.santanu

Message:
--------------------------------------------------------------
Well Andy,
    I am not very sure how are you trying to do this. Let me explain what I think you should be doing.
 
But before that, your doubt about executionListener.findActiveActivityNames() method. This is "active" activity names. And you have only one active acitvity. I do not think there is any API to find all the activitiy names present in the JPDL.
 
    Assuming you will need all of your node to be state nodes, you will need two sets of classes an external class which triggers the flow when required, and few event listener classes whcih will perform the business logic. Below is a sample of how both the classes should look like:
 
    Class external to the flow that triggers the flow:
 
*    private void signalWorkFlow(ProcessInstance processInstance) {*
*         //signal flow to execute Activity1. The flow will stop at Activity2
*
*         String stateName = "Activity1";
*
*         Execution execution = processInstance.findActiveExecutionIn(stateName);*
*        * *processInstance =* *executionService.signalExecutionById(execution.getId());*
*
*
*         //signal flow to execute Activity2. The flow will stop at Activity3*
*         String stateName = "Activity2";
*
*         Execution execution = processInstance.findActiveExecutionIn(stateName);*
*        * *processInstance =* *executionService.signalExecutionById(execution.getId());*
*
*
*          ....*
*          ....*
*          .... till Activity8*
*    }*
 
    And the event listener will be something like:
 
*    public void notify(EventListenerExecution execution) throws Exception {
         //Execute business logic...*
*         //Important to note that you do not call signalXXX here, neither from any other class which you call from here
*
*    }*
 
    Also please check if you really need so many state nodes or you need java node, task node etc. Every node has its own purpose. And you will be the best judge to see which node exactly fits your requirement.

--------------------------------------------------------------

To reply to this message visit the message page: http://community.jboss.org/message/521001#521001




More information about the jboss-user mailing list