Log out?

Multi-Stage XML Workflow

eiConsole v.13.17R1
Tutorial & Interface

eiConsole Tutorial Basic

Multi-Stage XML Workflow

Welcome to the eiConsole Multi-Stage XML Workflow Tutorial. Oftentimes automation of a business process requires more than simple point-to-point integration of Source and Target Systems. The eiConsole supports the implementation of a wide variety of the workflow patterns common to these more complex Business Process Modeling (BPM) scenarios. Supported patterns include sequencing, splitting, merging, branching, conditional logic and iteration. Over this tutorial, we will take you through an example of a multi-route interface that demonstrates a number of the components used in the implementation of a multi-stage XML workflow in the eiConsole.

zip-iconTraining kit


Place the eip-root directory from the Training Kit for this section to the desired folder on your drive. In our case, it’s

c:\Program Files\PilotFish Technology\Samples\.

Open the eip-root directory as a new Working Directory , using the Browse button.

multi-stage-xml-workflow-001-13-16-r3

Your Route File Management window should now have 4 routes. The last three of them are marked by blue icons which means these routes are fully configured. We want to configure the first one – to begin, double click on it to open the eiConsole’s main route grid.


multi-stage-xml-workflow-002-13-16-r3

Let’s begin by talking about the different levels of modularity within an eiConsole interface. It all starts with a Stage. There are 7 stages in the eiConsole’s main route grid. Stages are things like Listeners, Transforms, Routing or Transport. These are essentially a node within a workflow, representing an action on the data. A Route, like we’re looking at here, represents a collection of these stages. These make up an XML pipeline. In the eiConsole within a Route, data travels in one direction between a set of Source Systems and one or more defined Target Systems.


multi-stage-xml-workflow-003-13-16-r3

First, we need to configure the Listener. Select the Listener stage and click the icon to open the Listener Configuration panel. Now the Listener Type (Directory / File) is already selected, so we’ll leave that. But we need to point the Polling directory at the right file on your computer. That is where you placed the downloaded Tutorial Workflow folder. Click the Ellipsis button to the right of Polling Directory, click and navigate to the Workflow folder, select the input folder and click Open.


multi-stage-xml-workflow-004-13-16-r3

Now, a single Route with one Source and one Target is the simplest possible example of an XML workflow in the eiConsole. However, in this example, we need two defined Target Systems – one named PilotFish and one named Sharks.

We will need two. Click the Add Target button to add a second target.


multi-stage-xml-workflow-005-13-16-r3

The second Target System appears in the grid.


multi-stage-xml-workflow-006-13-16-r3

Now we want to name our two Target Systems, but in order to do so we first have to name our two Target Transforms. So, click the Add Format button.


multi-stage-xml-workflow-007-13-16-r3

Name your first Target Transform by entering the name in the Add New Format box (in our example shown below – we entered Transform1) and clicking OK.


multi-stage-xml-workflow-008-13-16-r1

Repeat the same process for the Second Target Transform. Be sure to enter a different name (in our example shown below – we entered Transform2) and click OK.


multi-stage-xml-workflow-009-13-16-r3

Your main route grid should resemble what is shown below. Note the names Transform 1 and Transform 2 now appear in the Target Transform column.


multi-stage-xml-workflow-010-13-16-r3

Now you can name your Target Systems. To do so, select Target System stage and click the icon. The System Info dialogue panel will open. Enter a name in the field (in our example shown below – we entered PilotFish).


multi-stage-xml-workflow-011-13-16-r3

Repeat the same process with the second Target System. Name it Sharks.


multi-stage-xml-workflow-012-13-16-r3

Next, we need to add the Source System information. As was with naming the Target System, the first step in the process is to configure your Source Transform. Select the Source Transform stage in the grid. Click the Add Format button and enter a name in the Add New Format dialogue window. Click OK. In our example shown below – we named ours Fork.


multi-stage-xml-workflow-013-13-16-r3

Your main route grid window should now resemble the main route grid shown below. Note: your Source Transform is now named Fork in the grid.


multi-stage-xml-workflow-014-13-16-r3

In the Transport stage, we select the RouteToRoute Transport Module. Both Targets use this same Transport Type, but they’re configured slightly differently. Unlike many of the other available connectivity options, the RouteToRoute Transport is used to sequence multiple routes within the given interface. Here we’ll see that Sharks will be passed to one Route indicated by the Listener name and PilotFish to another. You’ll see Pilotfish is sent to a Listener called Step2A-Listener.

Click the first Transport icon in the main route grid to open the Transport Configuration panel. Name it Send To Step 2A. In the Basic tab, enter Step2A-Listener in the Target Listener field.


multi-stage-xml-workflow-015-13-16-r3

Repeat the process for the second Transport, but enter Step2B-Listener in the Target Listener field and name it Send To Step 2B.

multi-stage-xml-workflow-016-13-16-r3

When a Route has more than one Target, the Routing Module is used to select the appropriate execution path or paths. Here, we expect our input message to represent a Fish. If the Fish is a PilotFish, we will proceed down the top path. If the Fish is a Shark, we’ll use the second path. All other messages will be discarded. Hence, the Routing Stage can implement both this conditional logic and the filtering.

Select the Route icon in the main route grid. The main Route configuration panel opens to the General Tab.


multi-stage-xml-workflow-017-13-16-r3

Click the Routing Rules tab to open the configuration panel.


multi-stage-xml-workflow-018-13-16-r2

Right click the Rules tree node to Add Rule.


multi-stage-xml-workflow-019-13-16-r2

Select Set Expression, then XPath Query from the drop down menu.


multi-stage-xml-workflow-020-13-16-r2

Enter a name, in the XPath Expression field. In the example shown below – we entered: contains(//CommonName,'Pilotfish').
Please note that case matters: Pilotfish and PilotFish are two different names.
Click enter/return to save. Note the XPath expression now appears in your Module Configuration panel tree.


multi-stage-xml-workflow-021-13-16-r2

Next you need to add your Transport. Right click the top Rules icon and select Add Target, then Transport Target.


multi-stage-xml-workflow-022-13-16-r2

In the Transport Target Configuration panel, select the Transport you wish to specify from the drop down menu. We selected Send To Step 2A, our previously configured Route.


multi-stage-xml-workflow-023-13-16-r2

Your selected Transport will now appear in the Module Configuration panel Rules tree as shown below.


multi-stage-xml-workflow-024-13-16-r2

Our second rule checks to see if the CommonName is sharkcontains(//CommonName,'shark'). If so, it sends it to Step 2B. Follow the same process you followed to configure the first set of rules to configure the rules for Sharks and Step B. Once you have completed these steps, your panel should resemble the panel below.


multi-stage-xml-workflow-025-13-16-r2

You are ready to move on to the Source Transform. Click the Source Transform icon in the main route grid. The main Source Transform panel opens. Select the Forking tab, then select XPath Forking from the Forking Module drop down menu.


multi-stage-xml-workflow-026-13-16-r3

Also demonstrated in this Route is our ability to perform a parallel split or forking operation. We see this configured in the Forking tab of the Source Transform. The input document that we’ll be using for this Route is a “batch file” of Fish – each represented as an XML tag. We have used the XPath Forking Module to pull out each Fish tag and to turn it into its own transaction.

We enter /FishXML/Fish in the XPath Expression Field. Click enter/return to save.


multi-stage-xml-workflow-027-13-16-r1

Also let’s name the Source System. As we start with the file from our local Workflow directory, let it be Local Drive.

multi-stage-xml-workflow-027-13-16-r3

In the Testing Mode of the eiConsole, we’ll start with the stage immediately before the Source Transformation and we’ll allow the test to run through to both defined Targets. But first you’ll need to save your Route. To do so, go to the File menu and select Save Current Route.

multi-stage-xml-workflow-029-13-16-r1

Next, go the Route menu and select the Testing Mode.


multi-stage-xml-workflow-030-13-16-r3

The eiConsole’s inline graphical test mode opens.


multi-stage-xml-workflow-031-13-16-r3

Select the Source Transform icon in the main route grid. Check the Start Test Here box in the Stage Configuration area, choose the From file in the Alternate Data Source drop-down menu. Click Browse.


multi-stage-xml-workflow-032-13-16-r3

Navigate to your Workflow folder, choose your sample xml file in the Select File to Start Test With dialogue window. You’ll want to select the FishXML-Small.xml file.


With the Source Transform Stage still selected, let the test run to the two defined targets. Click the Execute Test button at the top to start the test.


multi-stage-xml-workflow-034-13-16-r3

Once the test executes, the blue questions marks will have been replaced by green check marks indicating that test has been successful. A red X would indicate a failure.


multi-stage-xml-workflow-035-13-16-r3

With the “No Transformation” stage still selected in the left panel, click the View State Output.


multi-stage-xml-workflow-036-13-16-r3

Now, let’s take a look. The input is FishXML with a number of different Fish tags.


multi-stage-xml-workflow-037-13-16-r1

Next, select the Forking Stage then click View Stage Output.


multi-stage-xml-workflow-038-13-16-r3

As you can see, the Forking stage then performed a parallel split.


multi-stage-xml-workflow-039-13-16-r1

Next, select the Route stage. We can see it split into a number of different transactions, each depicted as a row in this Test Results grid.


multi-stage-xml-workflow-040-13-16-r3

After this stage, some subset of these transactions will be filtered out; others will be branched to one of the two defined Transports. You can select each row and click View Stage Output to view each transaction. Each transaction contains a different Fish. Some will be Pilotfish, some shark.


multi-stage-xml-workflow-041-13-16-r1
Now we select the first Target Transform stage (Transform1) and click View Stage Output to view the first test result.


multi-stage-xml-workflow-043-13-16-r3

We can see here that one transaction was sent towards the top Transport, the Pilotfish. And we can see here that yes, it is the Fish tag, that has the CommonName of Pilotfish.


multi-stage-xml-workflow-044-13-16-r1

We move down to the second Target Transform (Transform2), select the first row then click View Stage Output.


multi-stage-xml-workflow-045-13-16-r3We see that there were two transactions sent in the Sharks direction, one being the Blacknose shark.


multi-stage-xml-workflow-046-13-16-r1

Select the second row, then click View Stage Output to view the second transaction with the CommonName of Silky shark.


multi-stage-xml-workflow-047-13-16-r1

Now let’s go and take a look at the next two Routes that these transactions are sent to. Go to the File menu and select File Management to return to the Route File Management window.


multi-stage-xml-workflow-048-13-16-r3

You’ll see that back in our main Route File Management window the Step 1 now has the blue icon as configured route. We’ll take a look at the Route Step 2A. The Step 2A and Step 2B are similar.


multi-stage-xml-workflow-049-13-16-r3

Double click Route Step 2A to open the eiConsole main route grid. You can see that this Route is simple with a single Source and a single Target.


multi-stage-xml-workflow-050-13-16-r3

Select the Listener stage and click the icon to open the Listener Configuration panel.

A Programmable Listener is selected (Programmable Trigger). In the Listener Name Configuration area, we see the same text that we used in the RouteToRoute configuration area – Step2A-Listener. The name of this Listener is the link between the Transport in the previous stage and this portion of the process. This allows Step 1’s RouteToRoute Transport to call Step 2A or Step 2B by indicating the corresponding Listener’s name. Not much happens in the body of this Route until we get to the Transport Stage.


multi-stage-xml-workflow-051-13-16-r3

Next, select the Transport stage. We see the Transport Type selected is the Process Orchestration Transport. This robust transport component allows for the implementation of any number of synchronization and state based workflow patterns.


multi-stage-xml-workflow-052-13-16-r3

Perhaps most interestingly, the Process Orchestration Transport, and its corresponding Process Orchestration Listener, allow us to merge asynchronous transactions. In other words, it can serve as a rendezvous point for data arriving from different sources. Here, we want to rendezvous a PilotFish message with a shark message, so that we can merge the two XML messages into a single XML document for further processing. The Transport indicates a process component, which is essentially the piece of this process that the current message represents. Essentially, what we’re doing is creating an empty puzzle board and specifying when a piece of that puzzle should be placed in that puzzle board. Here we’re saying, put the Process Component called “Fish” into our puzzle board.


multi-stage-xml-workflow-053-13-16-r3

Similarly, our Step 2B Route also uses a Process Orchestration Transport, but this one places the “Shark” piece in the puzzle board.


multi-stage-xml-workflow-054-13-16-r3

Next, we return the main Route File Management window and select our third Route. We double click Step 3 to open the main route grid. Moving on with our third Route, we can see how we can rendezvous and merge data with the Process Orchestration Listener. We select the Listener stage. The Listener Type selected is Process Orchestration.


multi-stage-xml-workflow-055-13-16-r3

Now, here we see that under the Action tab we’re going to Aggregate Transactions. In the Remove Process Instance field, we want When Transactions Fired to be selected.


multi-stage-xml-workflow-056-13-16-r3

And under our Firing Conditions tab we’re going to do that when the Fish and Shark puzzle pieces or Process Components have arrived.


multi-stage-xml-workflow-057-13-16-r3

Please note that there are a number of other workflow patterns that are enabled by the other configuration options of the Process Orchestration Listener and Transport pair. For instance, we can deal with multiple transactions of the same type based on a count using this Transaction Count Required. Or we can implement conditional firing or statement-based operations with this Conditional Statement option.


multi-stage-xml-workflow-058-13-16-r3

But in this case, we just take the data from these two puzzle pieces, combine it and then pass it through the process until we get to a simple Directory Drop Transport. Note: we want the Target file extension to be xml.


multi-stage-xml-workflow-059-13-16-r3

Now that we’ve walked through the four Routes that make up this three step process – let’s look at this end-to-end in the Local eiPlatform Emulator. We go to the Route menu to select and launch the Emulator.


multi-stage-xml-workflow-060-13-16-r3

But before we can run through the whole test we’ll need to drop a file into the appropriate input directory. From our Tutorial Workflow folder, open the data folder and copy the FishXML-small.xml file. Just keep it cached for now.

We are ready to start the test. Click Start Emulator.


multi-stage-xml-workflow-061-13-16-r3

While it starts running drop the FishXML-small.xml file into the input folder. Note: if any error occurs it will be indicated by the red error message, as shown below.


multi-stage-xml-workflow-062-13-16-r3

We’ll paste our batch file of Fish into the input directory and we’ll see it disappear as it begins processing.


Once we drop the file in the Emulator, it gets happy again and processes away with pleasant green transactions zipping along. All is well.


multi-stage-xml-workflow-064-13-16-r3

Finally when processing completes, we’ll see our output file consisting of the rendezvoused Fish and Sharks.


multi-stage-xml-workflow-065-13-16-r3

This concludes the Tutorial of Multi-Part XML Workflow handling within the eiConsole. To review, we’ve seen how an eiConsole interface can be made up of stages and routes, and how various workflow patterns can be implemented with forking, process orchestration and routing rules. With the eiConsole, you have powerful tools at your fingertips that can support workflow patterns common to more complex Business Process Modeling (BPM) scenarios.

    to post comments

    This is a unique website which will require a more modern browser to work! Please upgrade today!

    Thanks!

    Our editors are notified.

    Close