-
1. Re: Calling TaskService.CompleteTask from inside a Java callback
mwohlf Jun 21, 2010 3:52 PM (in response to joegottman)I am not sure what you try to do, but an AssignmentHandler or an EventListener is not the right place to complete a task or send any signals to the process instance.
Maybe what you try to do can be implemented with the <custom /> tag.
Basically you implement a ExternalActivityBehaviour and use execution.waitForSignal() or execution.take(transition) if you want the process instance to stop or take a certain transition.
-
2. Re: Calling TaskService.CompleteTask from inside a Java callback
joegottman Jun 22, 2010 3:03 PM (in response to mwohlf)I'm sorry if my question was not clear enough. I have some business logic I need to perform for a task, and I have two requirements:
1) I need to automatically start performing the code for the business logic when the task is assigned.
2) I need to automatically alert jbpm when the business logic code finishes so it can mark the task as complete.
For requirement 1, it seemed like either an AssignmentHandler or an EventWatcher that was watching for the assign event would work to know when the task was assigned, but neither one seems capable of handling the second requirement.
-
3. Re: Calling TaskService.CompleteTask from inside a Java callback
mwohlf Jun 23, 2010 1:08 AM (in response to joegottman)Hi Joe,
Can you please explain what kind of task are you talking about?
If it's a human task why do you want to mark it as "complete" by your business logic and if it is business logic that is performed within the task why do you assign it and to whom?
Did you check out
http://docs.jboss.com/jbpm/v4/userguide/html_single/#custom ?