just to ask if the question is
either inappropriate for this forum,
or not clear,
or completely senseless,
or too specific, so nobody wants to bother,
or people who can answer are too busy in last 4 days?
I would be very happy to know this.
I haven't implemented this yet, but here's what I'm planning to do for this senerio:
Create a servlet or webservice that the external application can access to signal the process execution. The signal that is sent from the external application would match up to one of the defined transitions.
When the external application is called from the process execution, the process id will be passed to it, so when the external app is done it can signal the process execution that called it.
In addition to the signal, I may need to provide for the external application sending a serialized variable map or maybe just a http query string to set process variables. For instance, if the external application generates a file that the process execution will need to know about, I plan to pass the file location back to be set in a process varible.
Does this sound possible?
first thank you for response.
I do not know if you missed the part when I am saying that I do exactly the same thing when I have WAIT STATE as you described.
The problem is how to do that when TASK is created/assigned.
So, on task-create event you can call WS from action handler
but then, it would be great if I can somehow receive callback (how, what to signal, resume, call from external app?) and then assign task by calling setActorId().
I hope that this gives more light to my problem.
And I really hope, somebody has an answer.
Hi, here is the answer (to my own question):
1. In task-node (on node-enter event) I create N task instances for particular task (inside ActionHandler). A task belongs to the swimlane, which has assignment handler that sets pooled actors.
2. User lists all pooled tasks, takes first found and sets his username as actorId for that task instance.
3. On task-assign event, I am calling ActionHandler, which invokes Web Service asynchronously.
4. When WS makes a callback, I have method which starts task instance and makes it available for external user.
The task node snippet:
<task-node name="annotate" create-tasks="false"> <event type="node-enter"> <action name="createAnnotationTasksActionHandler" class="org.springmodules.workflow.jbpm31.JbpmHandlerProxy" config-type="bean"> <targetBean>createAnnotationTasksActionHandler</targetBean> </action> </event> <event type="task-assign"> <action name="gasActionHandler" class="org.springmodules.workflow.jbpm31.JbpmHandlerProxy" config-type="bean"> </action> </event> <task description="Annotate Document" swimlane="annotator"></task> <transition to="join1"></transition> </task-node>