1 Reply Latest reply on Jun 14, 2011 9:47 AM by francesco.pietrobelli

    Conditional start event's data output

    francesco.pietrobelli

      Hello everybody,

      Does anyone have an example of a process, started by a start conditional event, a little bit more complex than the  examples provided with the source code of jBPM5.1CR1 (jbpm5.1CR1/jbpm-5.1.0.CR1-src/jbpm-bpmn2)?

       

      My scope is to set a property of the process from a fact in WorkingMemory when a conditional start event is triggered.

       

      I have same rule like:

      rule "start process"

           when

                #something

           then

                insert(new StartProcess())

      end

       

      a java class for  StartProcess:

       

      public class StartProcess{
           String personId;
           //other field
           //getter and setter
      }
      
      
      

       

      process definition that starts like:

      output.jpg

      in which the Conditional event definition has a formal expression equal to "StartProcess()"

       

      In my application i insert facts until the rule "start process" fired and so a process instance has started, but how can i set the personId or the StartProcess instance as a property of the process?

      When i use message or signal start event is sufficent to define a Data Output and to assign it to a process's property, but when i use conditional start event the Data Output is null.

       

      P.S: sorry for my poor english... , if you can't understand the problem, tell me!

       

      Thank's in advance

      Francesco.