0 Replies Latest reply on Dec 11, 2006 9:41 AM by r f

    Possible: Decide to end task instance or not?

    r f Newbie

      A workflow has a task where parameters (process variables) for the further workflow steps should be set. When the actor has defined all parameters, it will end the task.

      Wanted: Check that the parameters are really correct before leaving (ending the task instance)

      At the moment I have a CheckAction on end-task events that will throw an IllegalStateException. At first I thought that this would stop jBPM from ending the task: The client who called endTask gets the exception, the task instance is kept un-ended. But it seems that the jBPM just got confused: workflow execution continues (next task is started) but old task is not ended (even when task is blocking).

      <event type="task-end">
       <action name="CheckTransferParametersAction"

      Is there a possibility to do this kind of check?

      I know that I could put an decision node after the tasknode and loop back to the task but it would be nice when the caller could get an exception immediately when trying to (illegally) end the task (endTask, exception, reportError) instead of endTask, sleep, getTaskList, findTaskWithSameExecutionTokenAsBefore, reportError