Flow

Runs a previously published process flow. This process flow is run under the control of the server configuration, rather than under the 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. The flow command is also useful when executed as a scheduled activity.

The process flow execution is not directly connected to the resources of iWay Service Manager. As a result, the use of published transforms, subflows, providers, or other resources that are external to the process flow itself may not be located.

To issue a flow command, enter the following:

flow <flowname> [<input> [-x | -f]] [-iwp <path>] [-c] [-o [@outfile]] [-map pairs…]

where:

flowname

Is the name of the process flow. The process flow must have been published to the system area of the configuration under which it is to be run.

input

Is the input to be supplied to the process flow. The input can be in flat format (not parsed into XML) or in XML format. The -x (default) or -f switches set the type. If the input is flat, then it will be passed as a string in Unicode format, and not in byte format. Input specification is subject to iFL operation. If the input is omitted, then a standard signal message will be passed to the process flow. You can use the _file() iFL function to load the contents of a file to be passed to the process flow. If the input is provided on the command line, and it contains any special characters such as spaces, then you must surround the input with single quote (‘) characters.

-iwp

Executes an unpublished process flow exported from iWay Integration Tools (iIT). In this case, the flowname operand is used only for documentation purposes, although it must be provided.

outfile

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.

-c

Commits the named process flow. In addition, this switch runs the process flow transactionally. If this switch is omitted, then the process flow is not run under transactional control.

-o

Is the output of the process flow displayed in the log. If this is omitted, then the output is not displayed. The output is the contents of the document(s) that are sent to the end nodes of the process flow.

-map pairs

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 equal (=) character and comma (,) characters are optional.

Example

Run a published process flow named status.mail. Pass in the name of the channel to monitor. The process flow must look in the standard signal document to get the channel name to monitor. The specific details of the process 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 process flow, which will have the following structure:

<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, then the process flow result is compared on a character-by-character basis with the contents of a named file. If the result of the process flow matches the expected result, then the following command is emitted to the output trace:

match

If the two do not match, then the process 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 the following regression test of a process flow named 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