Editing a flow
Click here to get the flow definition for this tutorial.
Navigating steps
Open the imported flow and observe that there are two availble step items - the JSONATA step and the trigger step. Click on the steps to navigate between them.
Trigger step
The trigger step is used to configure the flow and is always the first step. The primary trigger step properties include:
- Flow name. It is important to give your flow a clear name, since you will reference it in other parts of the application.
- Flow result path. Specifies what will be returned from the flow result document. In the imported flow, the
user
node will be returned as the result.
JSONATA Step
This step is one of the in-built ACE steps you can add to your flow as a developer. In this example it is responsible for all the data processing in the flow.
Click on the JSONATA step. In the side menu you will find options for configuring your step. The imported configuration performs the following mapping using JSONATA syntax:
- Merge the entire document to the
user.result
node - Map
name
andsurname
nodes to theuser.result.fullName
node and fallback to"Unknown"
if they do not exist in the input document. - Append a
user.result.requestTime
node with a timestamp.
Steps have access to the document doc
node. In case of JSONATA Step, we can directly reference any node within the doc
using it's name - in this case name
and surname
.
Some step configuration fields might require slightly different syntax to access the document.
The flow output document needs to contain a result
node. When the flow is attached to an API operation, the result
node will be extracted from the final document and sent as the API response.