How to: |
A process flow enables the processing of business transactions. As the message flows through a process flow, it carries useful information, which can be monitored. In this example, you will create a simple process flow that receives a single batch document of sales transactions. This document will be split into individual transactions and each transaction will be processed accordingly. As the transactions are processed, the goal will be to capture real-time data about them.
To create an iWay Integration Tools project and start the process flow.
The New Integration Project dialog box opens and prompts you for a new project name.
The Project tree gets created as shown below.
The New Process Flow Wizard dialog box opens.
The new sales.process node appears under the Flows folder, and the workspace displays a Start object.
In this iWay Enable application, the incoming document will contain multiple transactions. As a result, you will need to loop through each transaction and gather the appropriate data. This procedure describes how to add and configure an Iterator object to the process flow.
The New Iterator Object dialog box opens.
The Iterator Type dialog box opens.
The Iterator Object Properties dialog box opens.
Parameter |
Value |
---|---|
Snip levels |
1 |
Expression |
XPATH(/SALES/TRANSACTION) |
Cross Section |
false |
Output document type |
status |
The new Iterator object (Loop Transactions) is added to the workspace.
Now you must connect the Start object to the Iterator object (Loop Transactions).
The Line Configuration dialog box opens.
This option indicates that there are no conditions that affect the path, and that the path between the two objects will always be followed.
A connecting line with a forward arrow appears between the Start and Loop Transactions objects to indicate that a relationship has been established.
In this process flow, after the Iterator object (Loop Transactions) loops through each transaction and gathers the appropriate data, a File object is required to write the resulting transactions to an output directory.
In addition, the File object will be configured to contain two _etap() functions that will serve as a hook to indicate a point of interest to capture data along the process flow.
The following procedure describes how to add and configure a File object to the existing process flow and configure two _etap() functions.
The File Object Properties dialog box opens.
Parameter |
Value |
---|---|
Target Directory |
C:\Sales_Demo\data\out |
File Pattern |
sale_####.xml |
Avoid Preemitter |
true |
Return |
input Note: This value indicates that the message itself will remain on the processing bus and can be viewed later if required. |
Base64 Decode |
false |
Respect Transactionality |
false |
Call at EOS? |
false |
The new File object (Tap Data and Write to File) is added to the workspace.
The File Object dialog box opens.
The Property Manager dialog box opens and displays the Run Time tab by default.
We need to define two taps within the Property Manager.
Name |
Value |
---|---|
sales.process.tap1 |
_etap(sales.process.tap1) |
sales.process.tap2 |
_etap(sales.process.tap2) |
These variables represent the taps in the process flow that are used by the iWay Enable application. The _etap() function allows you to create taps at multiple points within the process flow without using predefined expressions. As a result, the actual process can be developed and shared between technical and business groups. Once created, each tap is made available to the iWay Service Manager Administration Console and can be configured to execute an expression to retrieve real-time data.
Each tap can be activated and deactivated using the iWay Service Manager Administration Console. This flexibility allows you to modify real-time data capture specifications without the need to edit the existing process flow. The expressions that are used by the taps to extract real-time data must be configured using the iWay Service Manager Administration Console. As the process flow is running and transactions are flowing through the system, and each active tap is hit in the process flow, a configured expression is executed.
You are returned to the Property Manager dialog box.
When you click OK you are returned to the File Object dialog box and the first variable that you defined in the steps above will be added to the Post-Execution tab.
The File Object Properties pane appears, as shown in the following image.
You must now create a Loop connection to be able to loop through the single batch document of sales transactions and create individual transactions.
The following image shows how your workspace should appear.
All processing paths must terminate with an End object. To add an End object:
The New End Object dialog box opens.
The new End object appears in the workspace.
A connecting line with a forward arrow appears between the File object (Tap Data and Write to File) and the End object to indicate that a relationship has been established.
Once you have added and configured all the required process flow components, you are ready to publish your process flow to the iWay Registry:
The Publishing Process 'sales.process' dialog box opens and you can select the server on which, you will be publishing your process to.
The following message on the iIT Message Console indicates that your process flow has been successfully published to the iWay Registry.
iWay Software |