Creating a Process Flow

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.


Top of page

x
Procedure: How to Create an iWay Designer Project and Start the Process Flow

To create an iWay Designer project and start the process flow.

  1. From the Windows Start menu select All Programs, iWay 6.0.1 Service Manager, tools, and then iWay Designer.
  2. Connect to the repository from which you want to work, for example, iWay.

  3. Right-click the iWay node and select New Project from the context menu.

    The New iWay Project dialog box opens and prompts you for a new project name and an optional description.

  4. In the Name field, type sales.
  5. In the Description field, type an optional description, for example, This project contains a process flow for the iWay Enable application.
  6. Click Next.

    The Designer Project Bindings dialog box opens.

  7. Select the iWay Registry option and click Finish.

    The new sales project node appears under the repository in which it was created (in this example, it appears under iWay).

  8. To save the project to the repository, right-click the sales project node and select Save from the context menu.

  9. Expand the sales project node to expose the project elements (Processes, Services, Transforms, and so on), as shown in the following image.

  10. Right-click the Processes folder and select New Process from the context menu.

    The New iWay Process dialog box opens.

  11. In the Name field, type sales.process.
  12. In the Description field, type an optional description, for example, iWay process flow designed to process and monitor sales transactions.
  13. Click Finish.

    The new sales.process node appears under the Processes folder, and the workspace displays a Start object.


Top of page

x
Procedure: How to Add and Configure an Iterator 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.

  1. Drag and drop the Iterator object from the toolbar to the workspace.

    The New Iterator Object dialog box opens.

  2. In the Name field, type Loop Transactions, and leave the default value (Iterator object) in the Description field.
  3. Click Next.

    The Iterator Type dialog box opens.

  4. Select the Class Name option, and enter XDIterXMLSplit in the corresponding field.
  5. Click Next.

    The Define Iterator dialog box opens.

  6. Click Next.

    The Iterator Object Properties dialog box opens.

  7. Provide the appropriate configuration properties that will split the incoming batched document into multiple transactions, as defined in the following table.

    Parameter

    Value

    Snip levels

    1

    Expression

    XPATH(/SALES/TRANSACTION)

    Cross Section

    false

    Output document type

    status

  8. Click Finish.

    The new Iterator object (Loop Transactions) is added to the workspace.

    Now you must connect the Start object to the Iterator object (Loop Transactions).

  9. Select the Start object, right-click the Loop Transactions object, and select Build Relation from the context menu.

    The Line Configuration dialog box opens.

  10. From the Event drop-down list, select OnCompletion and click OK.

    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.



x
Procedure: How to Add and Configure a File Object

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.

  1. Drag and drop the File object from the toolbar to the workspace.

    The New File Object dialog box opens.

  2. In the Name field, type Tap Data and Write to File, and leave the default value (File object) in the Description field.
  3. Click Next.

    The File Type dialog box opens.

  4. Select File Write from the Type drop-down list.
  5. Click Next.

    The File Object Properties dialog box opens.

  6. Provide the appropriate configuration properties for the File object, as defined in the following table.

    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

  7. Click Finish.

    The new File object (Tap Data and Write to File) is added to the workspace.

  8. Right-click the File object (Tap Data and Write to File) and select Properties from the context menu.

    The File Object dialog box opens.

  9. Click the Post-Execution tab.

  10. Click the first empty cell under the Name column and select Create variable from the drop-down list.

    The Property Manager dialog box opens and displays the Run Time tab by default.

  11. Add the following variables that contain two _etap() functions, as defined in the following table.

    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.

  12. Click OK.

    You are returned to the File Object dialog box.

  13. Click the first empty cell under the Name column and select sales.process.tap1 from the drop-down list.
  14. Click the second empty cell under the Name column and select sales.process.tap2 from the drop-down list.
  15. Click OK.

    Now you must connect the Iterator object (Loop Transactions) to the File object (Tap Data and Write to File).

  16. Select the Iterator object (Loop Transactions), right-click the File object (Tap Data and Write to File), and select Build Relation from the context menu.

    The Line Configuration dialog box opens.

  17. From the Event drop-down list, select OnCompletion and click OK.

    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.

  18. Right-click the File object (Tap Data and Write to File) and select Loop from the context menu.

  19. Click and hold the File object (Tap Data and Write to File) and drag the loop connection line to the Iterator object (Loop Transactions) in the workspace.



x
Procedure: How to Add an End Object

All processing paths must terminate with an End object. To add an End object:

  1. Drag and drop the End object from the toolbar to the workspace.

    The New End Object dialog box opens.

  2. In the Name field, type End, and leave the default value (End object) in the Description field.
  3. Click Next.

    The End Name Schema dialog box opens.

  4. Since no schemas are used in this processing path (that is, the process flow will not be exposed as a Web service), from the Schema drop-down list, select None.
  5. Click Next.

    The End Object Properties dialog box opens.

  6. Click Finish to accept the default values and close the End Object Properties dialog box.

    The new End object appears in the workspace.

  7. Select the File object (Tap Data and Write to File), right-click the End object, and select Build Relation from the context menu.

    The Line Configuration dialog box opens.

  8. From the Event drop-down list, select OnCompletion and click OK.

    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.


Top of page

x
Procedure: How to Publish the Process Flow to the iWay Registry

Once you have added and configured all the required process flow components, you are ready to publish your process flow to the iWay Registry:

  1. Right-click the sales.process process flow in the left pane and select Save from the context menu.

  2. Right-click the sales.process process flow in the left pane and select Publish from the context menu.

    The Publishing Process ‘sales.process’ dialog box opens.

  3. Verify the connection information to iWay Service Manager and click Next.

    The Process Runtime Options dialog box opens.

  4. Click Next to accept the default values.

    The Publish To: dialog box opens.

  5. Select the iWay Registry option and click Next.

    The Select Publication Location(s) dialog box opens.

  6. Select the Registry check box and click Finish.

    The following message in iWay Designer indicates that your process flow has been successfully published to the iWay Registry.


iWay Software