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">
<beanName>jbpmAction</beanName>
<factoryKey>jbpmConfiguration</factoryKey>
</action>
</transition>
</start-state>
<state name="Task Queued">
<transition to="Do Task">
</transition>
</state>
<task-node name="Do Task" signal="last-wait">
<task name="Perform Task Processing" blocking="true">
</task>
<transition name="continue" to="Completed"/>
<transition name="reset" to="Task Queued">
</transition>
</task-node>
<end-state name="Completed"/>
</process-definition>
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.