Hi

I have the following state definition (fragment):

<process-definition>
  | <start-state name='start'>
  | <task name='StartStateTask'>
  | <controller>
  | <variable access='read,write,required' name='variable1' 
mapped-name='Var1'></variable>
  | </controller>
  | </task>
  | <transition to='task-node1' name='to_task_node1'></transition>
  | </start-state>
  | ...
I use the following code to create a process Instance:

ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
<xml string above>);

ProcessInstance processInstance = new ProcessInstance(processDefinition);


Later, I call the following code:

TaskMgmtInstance taskmgmtInstance = processInstance.getTaskMgmtInstance();
Token token = processInstance.getRootToken();
if (taskmgmtInstance.hasUnfinishedTasks(token) == false)
{
...
}
else
{
...
}

However, even though the start state has a task, it seems to
enter the "if" block, not the "else" part.

Any suggestions would be appreciated.

Thanks,

Debnath


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120312
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to