The Enclosing Step references another SFC defined on the same Gateway. This is an important tool for SFC design, because it lets the chart designer create reusable blocks of logic encapsulated into charts, which can make chart design more modular.
When talking about enclosing steps, the chart that the enclosing step references is called its enclosed chart, or subchart. The chart that the enclosing step is in is called the parent chart.
When flow reaches an enclosing step, it starts its enclosed chart. Using the enclosing step's Execution Mode property, the step can be configured to work in one of two very different ways:
Execution Mode = Block
Let the enclosed chart run to completion. This means that the enclosed chart should have an End Step in it, and that flow will not be able to move beyond the enclosing step until the enclosed chart stops by reaching its end step.
Execution Mode = Cancel
Cancel the subchart when the enclosing step is ready to stop. This means that the subchart is canceled when flow is ready to move beyond the enclosing step. Any running steps in the enclosed chart are told to stop, and flow ceases in the enclosed chart.
When invoking a subchart via an enclosing step, you have the opportunity to define how variables are passed and returned between the parent and child chart’s scopes.
The enclosing step can define a list of parameters to be passed into the enclosed chart’s scope. The values for the parameters will be expressions, thus they can be literal values or they can be references to variables in the enclosing chart’s scope.
The enclosing step can also define a list of return values to receive from the enclosed chart. This is a mapping of variable names from the enclosed chart’s scope to variable names in the parent chart’s scope.Return values can now be mapped to Chart Scoped Variables by using the same syntax that they would in the passed parameters. See Chart Scope and Variables.
- No labels