- 04 Dec 2020
- 2 Minutes to read
- Print
- DarkLight
Using Placeholder Steps to Sketch Out Flow Structure
- Updated on 04 Dec 2020
- 2 Minutes to read
- Print
- DarkLight
The Placeholder Step component simulates a working component by providing simulated outcomes or objects. It has no function except to describe a component to be inserted at a later date. Use a placeholder step while designing a flow structure to provide information about additional steps needed in the flow.
To add a placeholder to a flow, in the Toolbox panel, under the category Data, drag a Placeholder Step component to the workspace.
Example
Our example flow will describe a component that tries to retrieve patient information. If it succeeds, it will send a string to an end step called EndedWithData. If it fails, it will direct the flow to an end step called NoData.
Begin by placing the Placeholder Step component onto the workspace. It can be found in the Steps panel window, under the All Steps [Catalog] > Data category. Connect the path from the Start Step to Placeholder Step 1.
To simulate a real component, Placeholder Step 1must have some outcomes. We will replace the default Outcome with two unique outcomes. Under Output, click the Add New link from the Properties panel.
In the resulting Edit object pop-up, click the Add New link to create data objects for output.
In the next Edit object pop-up, define the object outputted by Placeholder Step 1. If we were sketching the functionality for a production flow, we might use any of the complex data structures available in the platform, but for our simple example, we will have Placeholder Step 1 output a string called "GotPatientInfo."
Once we've defined our data and clicked OK, we will need to define the path along which GotPatientInfo will travel. Name this path "GotInfo," and click OK to save our changes.
Now, Placeholder Step 1 has a single possible outcome GotInfo. If we look in the Properties panel, we'll also see the new outcome listed under the Outcomes section, along with controls to remap the outputted string GotPatientInfo.
For our second outcome, we want to return no information. Since a failed attempt to get patient information doesn't need to return a string, we will define no data outputs. Instead, we will just give this output a path of "NoInfo", and click OK to save our changes.
Next, add our custom End Steps. First, delete our existing End Step and drag two more from the Toolbox panel, under the category Flow Management.
To make it clear which end step is which, name one "EndedWithData" and the other "NoData."
Next, connect Placeholder Step 1 to the appropriate end steps with the GotInfo and NoInfo paths.
Because Placeholder Step 1 doesn't actually do anything, configure it with the appropriate path to take. Otherwise, our flow will produce an error when it runs in the debugger. In the Properties panel, under the heading Outcome Definition > Selected Path, select "GotInfo."
This completes our example flow. If we were to task someone with creating a component that gets patient information, we could give them this flow as a requirements document. From it, they would be able to understand quickly what would be the expected outcomes, outputs and inputs (though there are no inputs illustrated in our example) of the new component.
Because we configured Placeholder Step 1 with a SelectedPath of "GotInfo", our flow also performs successfully in the debugger, despite the fact that the most central and crucial component doesn't do anything at all.