JBPM 5 - Human Task “Recall”

假如想象 提交于 2019-12-11 02:19:32

问题


I have a business process requirement where a requestor should be able to "RECALL" the workflow-case he raised.

The flow is like,

  Start ---> Requestor ----> Approver -----> Updater -----> End

Requestor , Approver , Updater are human tasks.

So after the Requestor task completed and goes to Approver task (and if it is not STARTED), the requestor should be able to "Recall" the process instance and flow should back to Requestor.

I understand that a work-item for Approver "Human Task" will be available. If I abort that work-item (internally task exits), will the flow get back to "Requestor"?

If it won't flow back,I am wondering if i can add some signal handlers in the process definition and do that abort.

  Start ---(signal handler to abort Approver task)----> Requestor ----> Approver -----> Updater -----> End

Environment: JBoss 7.1.0, JBPM 5.4.0.Final, Drools 5.5.0.Final, Spring 3.0.6.RELEASE


回答1:


I saw a possiblity to implement this requirement with "Attached Intermediate Events". I have attached a "Intermediate Event" to "Approver" task and on that event the flow comes back to "Requestor".

So the flow becomes

Start -------> Requestor ----> Approver (signal handler to go back to Requestor) -----> Updater -----> End

When i sent that event to the process-instance in "Approver" task, the flow came back to Requestor and new task has been created.

But the "Approver" task is still in "Ready" state.How to deal with it ? It must complete/exit on this signal. How to do that?

Update 1:

I was able to exit from the task/activity with the "CancelActivity" property for "Signal Intermediate Event".So on receiving the signal, the "Approver" task is "Exited" and flow returns to the "Requestor" task.



来源:https://stackoverflow.com/questions/14473411/jbpm-5-human-task-recall

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!