Join in workflow not working properly

Walter Ferroli
Tera Contributor

Hello

 

I have a Workflow created for a Service Portal Item, that depending on the field values creates and then executes 3, 4 or 5 tasks. For instance, if the user is critical, then the task for security is created.

 

At the end, I have a "join" to collect all the answers and proceed with the request item closure. The thing is, when one or two of the answers are "false" (this means that the item executes 3 or 4 tasks, but not 5), the join goes by the "false" option, that keeps the RITM open, instead of closing it.

 

Unless the ITEM creates all the 5 tasks, and all of them come to a result, the join will fail. This means the RITM will remain open though all of its tasks have been completed, and I have to close it manually.

 

Any ideas to solve this?

 

I attached a picture of the whole flow, hope you understand it.

 

5 REPLIES 5

Brad Bowman
Kilo Patron
Kilo Patron

In this case you can just connect both the 'Complete' and 'Incomplete' results of the Join activity to the next/end activity.

Yeah, thought of that already, but I would lose the result of each task. I mean, if one of the tasks was generated but could not be performed (for instance, due to lack of personnel or permissions), it should be closed as incomplete or skipped. And if I join both complete and incomplete routes to the end activity, the RITM will always say "closed complete", which is not that true... 

To meet this requirement, after the join add an If activity which leads to setting the value closed complete or closed incomplete.  In the if script, query the sc_task table where the request_item = current.sys_id, returning yes or no based on the states retrieved.

Sounds good. Will give it a try and let you know. Thanks in advance.