Top  | Previous | Next

Enclosing Step

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 will start 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 will be canceled when flow is ready to move beyond the enclosing step. Any running steps in the enclosed chart will be told to stop, and flow will cease in the enclosed chart.

 

Parameter Passing

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 may define a list of parameters to be passed into the enclosed chart’s scope. The values for the parameters will be expressions, thus they may be literal values or they may be references to variables in the enclosing chart’s scope.

 

The enclosing step may 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.

 

Enclosed Chart Parameter Passing

Enclosed Chart Parameter Passing