简体   繁体   中英

Spring Activiti Skip / Passthrough a task

I'm new at this, so please bear with me. I've got a sample of the activiti diagram here:

在此处输入图片说明

Assume I'm on task "Validate if Budgeted or Unbudgeted". If I choose "Budgeted", I go to task "Approve Laptop Request - IT Governance (Ron)". At this point, I can either say yes or no.

Saying yes gets me to "Approve Laptop Request - IT Governance (2)", while saying no returns me to ISGOC.

Here's the caveat - saying no as either the IT Governance (Ron) or the IT Governance (2) would make the process skip you next time around.

So, if I, as IT Governance (Ron) said no, which would then take me back to ISGOC, to which I said budgeted, the process would skip over me, and jump straight to IT Governance (2). Should IT Governance (2) say no as well, he would get skipped over as well should ISGOC choose budgeted.

Currently, I'm using the create and complete listeners per task to modify an entry in a database, denoting which approvers had declined my request.

So my question is, is there a function of sorts that allows me to bypass a task?

Thanks.

I am not sure if I understood your question correctly. In my opinion you should just change your process and save information about declining tasks in activiti variables and add additional conditionals to omit tasks which were declined.

The problem you have is that you are using process variables for managing state of the decisions but are not reseting the decision state when you enter the approval loop.

All Entry and Return paths to ISGOC need to go through either a service or script task that sets the two approval decision variables to false. This way, each time you re-enter the approval loop, you will start from a known state,

Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM