Runs a previously published process flow. The process flow is run under control of the server configuration, rather than under control of a channel. Channel services may not be available within the process flow. The flow command can be used to test process flows, including verifying that the process flow produces the expected result.
To issue a flow command, enter the following:
flow <flowname> [<input> [-x | -f]] [-c] [-o [@outfile]] [-map pairs…]
where:
Is the name of the flow. The flow must have been published to the system area of the configuration under which it is to be run.
Is the input to be supplied to the flow. The input can be in flat form (not parsed into XML) or in XML. The -x (default) or -f switches set the type. If the input is flat it will be passed as a string in Unicode, and not in byte form. Input specification is subject to iFL operation. If the input is omitted, a standard signal message will be passed to the flow. You can use the _file() iFL function to load the contents of a file to be passed to the flow.
Is the path to a file into which the output document contents are flattened. Use of this feature requires that the -o switch is used.
Runs the flow transactionally. If this switch is omitted, the flow is not run under transactional control.
Is the output of the flow is displayed in the log. If this is omitted, the output is not displayed. The output is the contents of the document(s) that are sent to the flow's end nodes.
Adds token=value pairs to the standard signal document if used, as the parameter map. The pairs will also be set as DOC level special registers in the execution environment. This must be the last switch on the line, and all tokens that follow it are considered as token=value pairs. The = sign and commas are optional.
Example: Run a published flow named status.mail. Pass in the name of the channel to monitor. The flow must look in the standard signal document to get the channel name to monitor. The details of the flow are not shown here.
flow status.mail -map channel chan1
Because no input was specified in the command, a standard signal document will be passed to the flow. It will look like:
<signal type='flow' timestamp='time' version='2' protocol='command'> <parms count='1'> <parm name='channel>chan1</parm> </parms> </signal>
If the optional -expects switch is used, the flow result is compared on a character-by-character basis with the contents of a named file. If the result of the flow matches the expected result, the following command is emitted to the output trace:
match
If the two do not match, the flow emits the following command:
nomatch
In this case, information showing the location of the mismatch and what was found is traced. For example, consider a regression test of the flow “passthru”.
Enter command:>flow passthru _file(c:/docs/flowin.xml) -expect c:/docs/expect.xml Flow 'passthru' OK, not committed Unequal compare: -- Lengths are not equal Length expected=54, actual=53 Difference starts at char 46, expected=c'b'/d'98', actual=c'<'/d'60' Partial Expected: >aaaab</Test> Partial Actual: >aaaa</Test> Expected: <?xmlversion='1.0'encoding='UTF-8'?><Test>aaaab</Test> Actual : <?xmlversion='1.0'encoding='UTF-8'?><Test>aaaa</Test> nomatch Enter command:>
iWay Software |