- 31 May 2023
- 3 Minutes to read
Edit Flow Data While A Flow Is Running
- Updated on 31 May 2023
- 3 Minutes to read
This article covers how to edit the data in a Flow while the Flow is still running, or "inflight". This particular process utilizes the Flow Management Dashboard in the Decisions Studio. From there, Flows can be identified by name or by flow_tracking_id (for more active environments) so that the current session can be modified.
Download the project attachment below and import it into a Decisions environment using our Import/Export Overview article to simulate this example.
This example uses a Create Data step in a Flow to create a string value, then passes that value to a first Form, then a second Form. The data being passed in the Flow will be modified from the Flow Management Dashboard while the assignment (and Flow) are inflight.
- Begin the example by creating two Forms. The First Form will have a text box with first as the data name and a button, the Second Form will have a text box with second as the data name and a button. Both Forms can have an optional label.
- The Flow in this example starts with a Create Data step to make the string value. Add this step to a Flow and select it to configure the properties. Use the Show Editor button under the Data section to add a piece of data called string_val of type String [Text].
- Insert a Show Form step after the Create Data step in the Flow and make sure the outcome path of the Create Data step is connected so that the value can pass to the Form. Use the Pick or Create button in the Show Form step properties to pick the First Form.
- Change the Assignment Type to Assigned and enter the current user email, then enter constant values for Assignment Name and Assignment Action Name as shown in the screenshot below.
- Under the Inputs section, map the string_val data to the input value of the Show Form step (which passes to the first text box).
- Insert another Show Form step after the first one, then connect the outcome path of the first to the second. Use the Pick or Create button in the Show Form step properties to pick the Second Form.
- Under the Inputs section, map the first data (from the First Form) to the input value of the second Show Form step (which passes to the second text box). Once the build is complete, save and close the Flow.
- Back in the Designer Folder, right-click the Edit Flow Data Flow and select Run Flow from the action menu. Select YES when the First Form assignment window appears, view the string_val data defined as Hello World, then select the OK button. Avoid interaction with the Second Form assignment window when it appears, this will be covered in the next section.
- Before continuing with the Second Form assignment, open the Decisions environment in another tab so that the Flow can continue running in the first tab. In the second Studio tab, navigate to System > Administration > System Tools > Flow Management.
This Dashboard is built-in to Decisions and shows the amount of stored and recently ran Flows are in the system, along with the CPU usage that these Flows are accounting for at the moment. The Stored Workflow List is a report with several data fields per line item. The flow_tracking_id column can be useful here to find a particular Flow in a more active environment, this ID can be queried from the database outside of Decisions.
- In the Stored Workflow List, select the most recent 'Edit Flow Data Flow' line item. In the Selected Flow Step Details panel, select the Current step name option and navigate to Edit Step Start Data > second. When the Edit window appears, enter a new value for the second text box that is going to replace 'Hello World'.
- Go back to the first tab and accept the Second Form assignment to see how the replacement value is reflected. Select the button to end the Flow.