2 Replies Latest reply on Dec 6, 2005 6:05 PM by kukeltje

    fork issues

    sforema

      It appears from the FAQ that forks are not asychronous (scratches head). I am a bit baffled by this. Worse, my fork is not running running both branches.

      I am not running in a managed environment, such as jBoss, so sending messages around isn't going to work (I believe), and doing work outside the workflow engine doesn't make sense to me. I had always assumed that when a fork was encountered, that a thread was created for each branch...

      Here is my process.xml:

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

      <?xml version="1.0" encoding="UTF-8"?>

      <process-definition name="simple">



      <start-state name="start">







      </start-state>






      <end-state name="end">



      </end-state>

























      </process-definition>

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

      I have a base class that each of the action extend that essentially do this:
      context.leaveNode();

      This should move the process along quite nicely. What is happening is that parallel2 is not firing at all. And if I do eventually get it to fire, I am afraid that it isn't going to run asychronously.

      I am struggling to make jBPM work for me. First I had to create a solution that persists state at every juncture (done). Now this little bugger.

      (help)

        • 1. Re: fork issues
          sforema

          Um... that XML wasn't very happy in this post... sorry about that (should have do a preview)

          Let me try again...

          <?xml version="1.0" encoding="UTF-8"?>
          
          <process-definition name="simple">
           <swimlane name="swimlane1">
           <assignment class=""></assignment>
           </swimlane>
           <start-state name="start">
           <task>
           <controller>
           <variable name="color" />
           <variable name="size" />
           </controller>
           </task>
           <transition name="to_state" to="first"></transition>
           </start-state>
           <state name="first">
           <event type="node-enter">
           <action name="node_enter" class="com.cms.workflow.sample_simple.Step1"></action>
           </event>
           <transition name="tr1" to="fork1"></transition>
           </state>
           <end-state name="end">
           <event type="node-enter">
           <action name="action1" class="com.cms.workflow.sample_simple.End"></action>
           </event>
           </end-state>
           <fork name="fork1">
           <event type="node-enter">
           <action name="action1" class="com.cms.workflow.sample_simple.Fork"></action>
           </event>
           <transition name="tr1" to="parallel1"></transition>
           <transition name="tr2" to="parallel2"></transition>
           </fork>
           <state name="parallel1">
           <event type="node-enter">
           <action name="action1" class="com.cms.workflow.sample_simple.Parallel1"></action>
           </event>
           <transition name="tr1" to="join1"></transition>
           </state>
           <state name="parallel2">
           <event type="node-enter">
           <action name="action1" class="com.cms.workflow.sample_simple.Parallel2"></action>
           </event>
           <transition name="tr1" to="join1"></transition>
           </state>
           <join name="join1">
           <event type="node-enter">
           <action name="action1" class="com.cms.workflow.sample_simple.Join"></action>
           </event>
           <transition name="tr1" to="end"></transition>
           </join>
          </process-definition>
          


          • 2. Re: fork issues
            kukeltje