-
1. Re: Problem nesting JBPM BeginTask into an existing conversation
pmuir Mar 20, 2008 1:12 AM (in response to aluduena)This isn't supported. You need to make the task the whole conversation. A task can use a pageflow.
-
2. Re: Problem nesting JBPM BeginTask into an existing conversation
aluduena Mar 20, 2008 5:12 AM (in response to aluduena)Thanks Pete, but this doesnt work. The problem is in the ConversationInterceptor class in isMissingJoin method.
private boolean isMissingJoin(Method method) { return Manager.instance().isLongRunningConversation() && ( ( method.isAnnotationPresent(Begin.class) && !method.getAnnotation(Begin.class).join() && !method.getAnnotation(Begin.class).nested() ) || method.isAnnotationPresent(BeginTask.class) || method.isAnnotationPresent(StartTask.class) ); } if ( isMissingJoin(method) ) { throw new IllegalStateException("begin method invoked from a long running conversation, try using @Begin(join=true)"); }
This implementation does not consider the fact that BeginTask and StartTask annotations can be used within an existing conversation.Therefore, it is not possible to start a JBPM Task within a PageFlow. This is correct? This is not an important limiting factor?
Thanks
Ariel
-
3. Re: Problem nesting JBPM BeginTask into an existing conversation
pmuir Mar 25, 2008 10:51 AM (in response to aluduena)
Ariel Ludueña wrote on Mar 20, 2008 05:12 AM:
This implementation does not consider the fact that BeginTask and StartTask annotations can be used within an existing conversation.They can't, that is what I was saying ;-)
You could file a feature request in JIRA, but I don't know if it's possible or not to support this.
-
4. Re: Problem nesting JBPM BeginTask into an existing conversation
aluduena Mar 25, 2008 2:13 PM (in response to aluduena):) Ok Pete, I will try to put this in JIRA..
thanks for your help
Ariel -
5. Re: Problem nesting JBPM BeginTask into an existing conversation
yagiz.yagiz.mobilus.com.tr Jan 3, 2009 2:06 PM (in response to aluduena)
Ariel Ludueña wrote on Mar 25, 2008 14:13:
:) Ok Pete, I will try to put this in JIRA..
thanks for your help
ArielIs there any development about this? I checked JIRA, but couldn't find the relevant bug.
--
Yagiz -
6. Re: Problem nesting JBPM BeginTask into an existing conversation
sunilsu Apr 24, 2009 6:53 PM (in response to aluduena)We removed the @BeginTask annotation and are just calling
BusinessProcess.instance().resumeTask(taskId).
in the method that begins the task. This seems to be working...
-
7. Re: Problem nesting JBPM BeginTask into an existing conversation
balazska May 14, 2009 3:35 PM (in response to aluduena)Did it really work?
-
8. Re: Problem nesting JBPM BeginTask into an existing conversation
ericcart Mar 26, 2010 3:12 PM (in response to aluduena)Yes, it works.
@Name("docTaskManagement") public class DocTaskManagement { @Logger private Log log; @RequestParameter("selectedTransition") String selectedTransition; @RequestParameter("taskId") Long taskId; public void doTheTask() { log.info("doTheTask #0", selectedTransition); BusinessProcess bp = BusinessProcess.instance(); if (bp == null) log.error("BusinessProcess null!"); if (taskId == null) log.error("taskId null!"); bp.resumeTask(taskId); bp.endTask(selectedTransition); } }
The status of jbpm-seam implementation is very tricky indeed. You have to sort out the scopes, triggers, and variable injections.... and sometimes the jbpm process errors are hidden at the debug level.
Thanks,
Eric