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 Designer project and start the process flow.
The New iWay Project dialog box opens and prompts you for a new project name and an optional description.
The Designer Project Bindings dialog box opens.
The new sales project node appears under the repository in which it was created (in this example, it appears under iWay).
The New iWay Process dialog box opens.
The new sales.process node appears under the Processes 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 Define Iterator 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 New File Object dialog box opens.
The File Type dialog box opens.
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.
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 is 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 File Object dialog box.
Now you must connect the Iterator object (Loop Transactions) to the File object (Tap Data and Write to File).
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 Iterator object (Loop Transactions) and the File object (Tap Data and Write to File) to indicate that a relationship has been established.
All processing paths must terminate with an End object. To add an End object:
The New End Object dialog box opens.
The End Name Schema dialog box opens.
The End Object Properties dialog box opens.
The new End object appears in the workspace.
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 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.
The Process Runtime Options dialog box opens.
The Publish To: dialog box opens.
The Select Publication Location(s) dialog box opens.
The following message in iWay Designer indicates that your process flow has been successfully published to the iWay Registry.
iWay Software |