Set Flow Output ValuesLast Updated: 04/11/2018 Introduced in Version: 4.1
This tutorial demonstrates how to use Set Flow Output Values step. This step is introduced in Decisions 4.1. It behaves just like Create Data step but data created in it can be retrieved via API call even from the asynchronous Flow.
In this example we are going to create a simple Flow with assigned Form. Then we are going to call this Flow via API and see what data is exposed. Finally, we are going to use Set Flow Output Values and test API call again.
We begin in the Designer Folder with clicking Create Flow on the Folder Actions Panel.
Then, we Name the Flow and click Ok to proceed to the Flow Designer.
In the Flow Designer we add Show Form step located in the Favorite Steps.
To learn how to create form in Decisions please click here.
After our Form is designed, we connect Form outcome to the End Step.
Then, we are going to setup an Assignment for our Form.
To learn how to create and use Assigned Forms, please click here.
This completes our simple Flow. On the top panel of the Flow Debugger we click Integration Details.
On the Integration Details page we can find information on how to call our Flow via Service call.
To learn more about Integration Details Page please click here.
Then, we use a URL provided on Integration Details Page to call our Flow via API.
We can see that our Flow is not completed because it wait the Assigned Form to be completed.
At this point we get just Flow Tracking Id data which is not very useful. We may want to know who is this Form assigned, or what is the process id or any other additional information from the Flow.
To accomplish this we need to use Set Flow Output Values step. We go back to the Flow Designer locate this step in All Steps [Catalog] > Flow Management category and add it before the Assigned Form in our Flow.
As mentioned in the beginning of this tutorial, Set Flow Output Values Step has to be configured in the same manner as Create Data Step.
To learn more about Create Data Step please click here.
In the step configurations we locate Data Definitions section and click Show Editor.
For the simplicity of this example we define a String data with Constant value.
Note: we can define any kind of complex Data Type here and make the values dynamic depending on our Flow logic.
When finished we click Close to save and continue.
Finally, we connect the outcome from Set Flow Output Values to the Show Form step.
This completes our Flow…
If we make the same API call to our Flow as we have made previously in this tutorial, we should be able to see Flow Outputs data returning data defined in Set Flow Output Values step.