Development tools : Transaction editor : Inserting dynamic flows
  
Inserting dynamic flows
You can insert a dynamic flow at different cutting points, before or after different flow states, to handle different actions and results. This is normally used in error handling cases.
1 Create a file field in the btt.xml file.
This graphic is described in the surrounding text.
2 Enable the DynamicFlow in the dynamicFlow file:
<DynamicFlow>
  <Enabled value="true">
  ...
</DynamicFlow>
Note <Enabled> is an optional tag. The default value of <Enabled> is false.
3 Set the parameters of the <DynamicFlow>
 
 
Parameters
Detail
TargetFlow
pattern
Regular expression to evaluate the flow id
Optional attribute
Default value is ‘.*’
 
enabled
Switch to indicate whether the filter rule is valid
Optional attribute
Higher priority to override the global switch setting
Default value is ‘true’
TargetState
type
Current cutting point rule will be ignored if there is no valid value for ‘type’
Required attribute
Support multiple types as attribute value
 
pattern
Regular expression to evaluate the flow id
Optional attribute
Default value is ‘.*’
DynamicState
 
ID should be unique in one flow.
 
tagName
The name of the state, could be htmlState, operationState, popupPageState, or conditionState.
 
Attr
The attributes of htmlState, operationState, popupPageState, or conditionState.
Transition
 
Define a specific jumping logic from an existed state to the dynamic state
Optional attribute
Could be used whether the attribute ‘changeAll’ is true or false
 
event
The name of the transition which points from an existed state to the dynamic state
Required attribute
 
state
The name of an existed state inside the target flow
Required attribute
AfterExecution
 
Define how to inject dynamic state after the cutting point state
Optional attribute
 
event
The name of the transition which points from the cutting point state to the dynamic state
Required attribute
 
changeAll
Indicates whether the dynamic state will always be executed after the cutting point state’s execution
Optional attribute
Default value is false
Transition
 
Define a specific jumping logic from the dynamic state to an existed state
Optional attribute
Could be used whether the attribute ‘changeAll’ is true or false
 
event
The name of the transition which points from the dynamic state to an existed state
Required attribute
 
state
The name of an existed state inside the target flow
Required attribute
 
goBack
The value will be the name of the transition which points from the dynamic state to the cutting point state
Optional attribute
Only available for tag ‘AfterExecution’
Note For projects created with UNICOM® Multichannel Bank Transformation Toolkit V8.1.0.3 and earlier, add:
DynamicFlowHelper.getInstance().initDynamicFlow();
to the StartServerServlet to initiate the rule definition for dynamic flow.
This graphic is described in the surrounding text.
For new projects, the rule definition is initiated when you create the project.
<?xml version="1.0" encoding="UTF-8"?>
<DynamicFlow enabled="false">
  <!--
  <TargetFlow enabled="true" pattern=".*">
    <TargetState type="operation" pattern=".*">
      <DynamicState tagName="htmlState">
        <Attr id="id" value="commonErrorFlow" />
        <Attr id="type" value="subFlow" />
        <Attr id="typeIdInfo" value="ErrorFlow" />
      </DynamicState>
      <AfterExecution event="error" changeAll="false" inputMapFmt="errorInfoMapper_1">
        <Transition event="retry" stateId="hostOperation" outputMapFmt="errorInfoMapper_2"/>
        <Transition event="cancel" stateId="cancelFinal"/>
      </AfterExecution>
    </TargetState>
  </TargetFlow>
  <TargetFlow enabled="false" pattern="sampleFlow">
    <TargetState type="operation,subFlow" pattern="...">
      <DynamicState tagName="...">
      ...
      </DynamicState>
      <AfterExecution event="..." changeAll="true" inputMapFmt="..." outputMapFmt="...">
        <Transition event="..." stateId="..." pattern="..." inputMapFmt="..." outputMapFmt="..."/>
        <Transition event="..." pattern="..." inputMapFmt="..." outputMapFmt="..."/>
      </AfterExecution>
    </TargetState>
  </TargetFlow> -->
</DynamicFlow>
See also
Transaction editor