3 Replies Latest reply on Feb 21, 2011 9:26 PM by Kris Verlaenen

    Event definitions....

    Amin MC Newbie



      I have the following process definition:



      Essentially what I would like to do is wait for both sub process are complete before I move to the next part of the flow.  The sub process complete when they receive a message event called 'completeEvent'.   I would like to pass some value into the signalEvent to indicate which event should be triggered.  For example at the moment if i signal a completeEvent then both sub process complete.   The sub process has a instance variable which is populated and what I would like to do is signal an event and pass a value for example signalEvent("completeEvent", "A", processid); and then somehow evaluate which event it belongs to.  Is this possible?  I've looked at some of the examples but I'm not able to work out a solution.


      Hope this made sense!  Any help would be appreciated.



        • 1. Event definitions....
          Kris Verlaenen Master

          You could use an exclusive gateway after to signal event to add this kind of logic (only trigger the parallel join if for example the event data is "A".  In my opinion though, it would probably be easier to create two different event types for this, "completeEventA" and "completeEventB", that way you don't need to add this type of logic to the process itself, keeping it easier and higher-level.



          • 2. Event definitions....
            Amin MC Newbie

            Hi Kris


            THanks for your reply.  So can i not execute some kind of condition evaluation in the event definition? For example when I signal my event i can pass some business data which I thought could be used to evaluate the event before proceeding. Is this not possible?



            • 3. Event definitions....
              Kris Verlaenen Master

              If you're using a signal event definition in BPMN2, it allows you to specify the event type you're waiting for and how the data that is provided should be mapped to a process variable.  You can then use it in the rest of your process to make decisions, for example by using an exclusive gateway after the event.  It is not possible in BPMN2 to add a simple constraint as part of the signal event node.  But you can use the event type to distinguish between different the different events in a process.


              If you want to trigger the process instance in a specific, more complex condition, I suggest you take a look at the conditional event node, that allows you to specify a constraint as well.  This type of event node is supported by the jBPM5 engine, unfortunately you'll have to edit the XML directly as editing the constraint is not possible in the existing BPMN2 eclipse editor.  An example of a conditional event node can be found here: