Decision Builder:  Make a decision Flow step:  Returned results record scope concerns:

staticCrash
Tera Guru

At my job, I created a new catalog item. I used Decision Builder to help contain the follow logic:  Who get’s the approval, who get’s the task, and the task’s short description.

In my flow, after getting the catalog variables, I added a: Make Decision step.  Here there were a few branches depending on the results of the decision builder.

In each branch of the Make a Decision, I had an Approval step, followed by If Approved, Create a Catalog Task.  Both the Approval step and the Task step, had their parameters set by the returned results table fields from the decision table.

The issue was that these returned result fields where out of scope, after the first step below the Make a Decision step.  This meant that my second step, the Task creation was getting empty values for its assignment group and short description fields!  While the approver step got its assignment group just find from the results. 

To fix this, I created Flow Variables.  Then for each branch of the Make a Decision, I added a Set Flow Variables step.  Here I stored the returned results fields into these flow variables.  Now for the Approval and Create Catalog Task steps, I used the flow variables instead. These remain in scop anywhere in the flow.

 

In my PDI, I recreated the issue, using a mocked up versions for a catalog item, flow, and decision table.

 

This is the simple decision table, built using Decision Builder:

staticCrash_0-1685718909925.png

 

This is the Make a Decision step in the flow that calls the above decision table:

staticCrash_1-1685718909928.png

 

Notice here we set the inputs to the decision table from the get variables step.

staticCrash_2-1685718909930.png

 

 

In the original attempted, I grabbed the approval group from the Make a Decision step’s output:

staticCrash_3-1685718909932.png

 

In my original Create Task, I also grabbed values from the Make a decision step.

staticCrash_4-1685718909933.png

 

In action, the first step, within the Make a decision, the approval step worked, it was able to get the values from the decision table’s result fields.

staticCrash_5-1685718909934.png

 

However the second step, Create Task, failed to get the values from the decision table’s result fields.

staticCrash_6-1685718909935.png

 

 

Here is the flow context for the failed attempt:

staticCrash_7-1685718909937.png

 

staticCrash_8-1685718909938.png

 

 

 

The Fix

 

 

Setting up flow variables:

staticCrash_9-1685718909939.png

 

Setting up a Set Flow Variable Step, within each branch of the Make a Decision step.  Using flow variables, we can set and get at any place in the flow.

staticCrash_0-1685719145339.png

 

Setting the values from the flow variables instead of the decision table outputs.

staticCrash_1-1685719232771.png

 

 

 

 

staticCrash_2-1685719232772.png

 

Overall view of the flow showing the new set flow variables

staticCrash_3-1685719232775.png

 

Now both the approval and catalog task steps are able to get the values (approval group, task group, and task short description) needed to complete correctly.

staticCrash_4-1685719232776.png

 

staticCrash_5-1685719232777.png

 

 

 

 

 

 

 

 

 

 

 

0 REPLIES 0