[jboss-dev-forums] [Design of JBoss jBPM] - Re: GetOutcomes returns additional transition

shekharv do-not-reply at jboss.com
Fri Jul 3 04:56:00 EDT 2009


But having said that, here comes the fun part: I believe this qualifies as unexpected behavior. 

consider this process-definition:

  | <?xml version="1.0" encoding="UTF-8"?>
  | 
  | <process key="CompletedOutcome" name="CompletedOutcome" xmlns="http://jbpm.org/4.0/jpdl">
  | 
  |     <start g="20,20,48,48">
  |         <transition to="review"/>
  |     </start>
  | 
  |     <task name="review" g="96,16,127,52">
  |         <assignment-handler
  |                 class="RandomTaskHandler"/>
  |         <transition to="redpill"/>
  |         <transition name="completed" to="bluepill"/>
  |     </task>
  | 
  |     <end name="redpill" g="255,16,88,52"/>
  |     <end name="bluepill" g="255,16,88,75"/>
  | </process>
  | 
  | taskService.completeTask(777, null);
  | 

Guess where the workflow will end when the task is ended. Irrespective of what OUTCOME you pass to the completeTask, null or 'completed' it will always end up in 'bluepill'.

Is there any way to get to the redpill 'end' state? NO! Now is this right or wrong? The more I look at this, the lesser and lesser sense it makes to me. 

But if course, the JIRA is rejected :(. 

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4241657#4241657

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4241657



More information about the jboss-dev-forums mailing list