1 Reply Latest reply on Jun 2, 2006 2:10 PM by John Liptak

    Blocking tasks

    Scott Newbie

      I appologise in advance if this is a dumb question, but I'm having trouble defining what I think a blocking task should be. What I want is to have a task that blocks a process until the task is started and then completed. I also want to have a 'reset' transition that can reset the process to a state before the task node in the process. Is this possible, when I have tried to create a blocking task that signals, I can still signal the node of the process and it will transition to the next state even if its on a blocking task node and the task has not been started (never mind complete). Here's the process definition I'm using:

      <process-definition name="blockingTest" >
       <start-state name="Task Started">
       <transition to="Task Queued">
       <!-- On starting the process, the task should be queued and any other set up work done -->
       <action name="myAction" config-type="bean" class="org.springmodules.workflow.jbpm31.JbpmHandler">
       <state name="Task Queued">
       <transition to="Do Task">
       <task-node name="Do Task" signal="last-wait">
       <task name="Perform Task Processing" blocking="true">
       <transition name="continue" to="Completed"/>
       <transition name="reset" to="Task Queued">
       <end-state name="Completed"/>

      What I would expect is that when I retrieve the process instance and attempt to call 'signal()', an exception would be thrown when in 'Do Task' as the task isn't started. Any assistance in this matter would be greatly appreciated.

        • 1. Re: Blocking tasks
          John Liptak Newbie

          I don't think you want to signal the node the process is in. I think you want to complete the task.

          That way, you will either loop back around and create a new task or you will finish the process.

          If you single a node, it will do what you ask it to and move on. It assumes you know what your doing ;-)