FlowEngine to support sub flows, is different from requestFlow, as it allows client side to automatically run sub flows without contacting server.
Test case:
Definitions:
[x] define context object to hold global flow collection, all subflows should be in this global flow collection
[x] subflow can be defined in webform level (item)
[x] subflow can be defined in submit callback level
the subflow only available when submit callback be called, but can be used by other scope of the call flows. If there is existing flow as same name defined in global flow collection, should be able to overwrite.
[x] subflow can be defined in requestFlow step level
same behavior as submit callback level, it should be able to overwrite in global flow collection if there is existing flow.
[x] In webform, submit callback level, requestFlow step level, both support following setup:
{
flow : object [ has steps ]
flows : {
'flow_a' : object [has steps]
'flow_b' : object [has steps]
}
}
OR
{
flow : 'flow_a' (string, put the name of flow directly)
flows : {
'flow_a' : object [has steps]
'flow_b' : object [has steps]
}
}
[x] checked webform
[x] checked submit callback level
[x] checked requestFlow step level
Worked (Called):
[x] subflow should work in main flow
[x] subflow should work in events call
[x] subflow should work in submit callback level
[x] subflow should work in requestFlow step level
[x] subflow should work in if step
Subflow variables:
[x] Local variable in main flow should be able to pass into subflow as input variables.
[x] Local variable in sub flow should be able to pass as output variables back to calling flow.
[x] If step should be able to read calling flow's variable and pass back output variables automatically to calling flow.
FlowEngine to support sub flows, is different from requestFlow, as it allows client side to automatically run sub flows without contacting server.
Test case:
Definitions:
[x] define context object to hold global flow collection, all subflows should be in this global flow collection
[x] subflow can be defined in webform level (item)
[x] subflow can be defined in submit callback level
[x] subflow can be defined in requestFlow step level
[x] In webform, submit callback level, requestFlow step level, both support following setup: { flow : object [ has steps ] flows : { 'flow_a' : object [has steps] 'flow_b' : object [has steps] } } OR { flow : 'flow_a' (string, put the name of flow directly) flows : { 'flow_a' : object [has steps] 'flow_b' : object [has steps] } }
Worked (Called):
Subflow variables: