Scripting Interfaces: Flow Related Objects
Flow:
Synopsis
Used to group various components of the flow as a common flow. This flow is then submitted to
the Flow Engine (Task Scheduler) to execute the flow.
We specify the start activities (components that pump data into the overall data flow) and
the non-start activities (downstream components that simply read data, manipulate/process it and send it to
the next component in the flow chain).
E.g.
f = new Flow();
f.addComponents(dataFilterService);
f.addStartActivities(dataSource);
f.start("1");
f.waitUntilFlowCompletes();
API
-
Flow ()
Creates a new Flow object. Does not take any parameters.
E.g.
f = new Flow();
-
addComponents (component_1, component_2, ..., component_N)
Adds non-start activities to the flow
Possible components could be
DBResource,
WSProxyResource,
URLResource OR
WSDLResource.
Non-start activities are always completely initialized to be in the READY state and waiting for
data from upstream components.
E.g.
f.addComponents(dataFilterService);
-
addStartActivities (component_1, component_2, ..., component_N)
Adds start activities to the flow
Possible components could be DBResource, WSProxyResource, URLResource OR WSDLResource.
These activities are simply initialized. When all the non-start activities are READY to run, only then
are these activities started. These activities are upstream components that generate data to be
processed by downstream components.
E.g.
f.addStartActivities(dataSource);
-
start ("1")
Starts the flow. Step 1 is to initialize and run the non-start activities. After all activities
have been initialized, then Step 2 is to run the start activities. The parameter "1"
runs the flow, "0" is used for debugging purposes (only print information, do not start
flow).
E.g.
f.start("1");
-
waitUntilFlowCompletes ()
Causes the current shell context to wait until the flow completes, i.e. all activities return a
COMPLETED value.
E.g.
f.waitUntilFlowCompletes();
Status: Implemented
(back to Notes)