Workflow Join

Georges_Younes
Tera Contributor

I am working on a workflow and I have the following problem:

 

Branch leads to 3  IF logic API Calls

If the response is no we will create catalog task (once the tasks are closed we will continue to the join Than set state to completed)

if the response is yes we will continue to the join then set the value to completed

We have 3 different testing scenarios:

1- All if will evaluate to YES, then join will set value to completed (which will be the normal behavior)

2- All if will evaluate to NO, then join will set value to completed  (which will be the normal behavior)

 

3-Not all the if results will be the same no or yes then join will be incomplete and here relies my problem

I want to do the following if 2 were yes, the other was no but it created a task and it was closed then continue and set value to completed.

How can I accomplish the above

Screenshot (4).png

1 ACCEPTED SOLUTION

What do you mean by both joins completed? Is it that all if script did Yes and all tasks were created and completed. I don't see how that is possible. If one or more of the if scripts is yes then one or more of the tasks will not be created. It does not see possible to have both joins have all there items going to them.

View solution in original post

3 REPLIES 3

Brian Lancaster
Tera Sage

The complete and incomplete don't work the way you think. Incomplete just means that one of the items that connect to the join did not follow the path. So if one of your if script went to the join and the others went to a task it will go down the incomplete path from the join. What you need to do is add maybe add an if script where both incomplete and completed from the join go to it. Then use a script to determine  which set value it needs to go to.

Here is an example. I have a bunch of catalog task that go into a join. Depending on the request variables some tasks are not needed so If that is the case it goes down the incomplete route on the join. So I added  if script to determine if all the tasks were close complete then decided which set value to use.

BrianLancaster_0-1715381496616.png

 

Dear Brain,

Thank you for your reply,

I understood all mentioned above,

I have additional questions if you may help me

I have added an If Script that connects both join.

My logic is the following if any of the 2 joins has been completed, this means that I will be setting the value to resolved 

If both joins are incomplete, I need to check if the if condition that was evaluated to No and created a catalog task and the catalog task has been completed than I will set to resolved else closed complete

Screenshot (5).png

My questions are the following:

In the IF script how can I:

1-Get the result of Join API and Join Tasks

2-Get the result of the 3 IF (Execute IService API Call)

3-Get the state of the Created catalog Tasks

What do you mean by both joins completed? Is it that all if script did Yes and all tasks were created and completed. I don't see how that is possible. If one or more of the if scripts is yes then one or more of the tasks will not be created. It does not see possible to have both joins have all there items going to them.