Flow designer: How to use stages in subflows?

Mathias Vandend
Mega Sage

Hi,

Since madrid we try to use the new flow designer as much as we can.

We have a large process now that we are implementing with flow designer. To be able to keep a good overview we're making use of the subflows. One thing you can't do in subflows is setting the stages like in the mainflow. So how do you set stages in a subflow?

16 REPLIES 16

Jose Saldana
Tera Contributor

Any updates on this issue?

cao hui
Tera Contributor

Please refer to the attached solution.

At your step 3 there something missing, can you show how you did that? Will be super helpful.

 

Thank you

kc1959
Tera Contributor

Hi there - do you have the code snippet that you display in this screenshot please?

 

kc1959_0-1712760600486.png

 

Alfonso Perez
Tera Contributor

Hi, 

I developed a similar approach based on the Cao Hui, 

The code for the script is this one:

(function execute(inputs, outputs) {
   var json_data = JSON.parse(inputs.status_data);
   var found = false;
   for (var i=0;i<json_data.length;i++) {
      var stage = json_data[i]['stage'];
      if (stage['value'] == inputs.stage) {
         json_data[i].status = inputs.stage_status;
         found = true;
         break;
      }
   }
   outputs.updated = found;
   outputs.status_data = JSON.stringify(json_data);
})(inputs, outputs);

 

The steps here are same as described in Cao's excel, except for the last one that includes an update of RITM stage.

find_real_file.png

Consider the following variables for this action:

find_real_file.png