Index Changes

Goal:

You have an existing message structure defined in an XSD. You want to use some nested structure as an input to IEP process and use them for some decision making in some IEP operator.You also want to pass the original data confirming to this message structure defined to some other service.

Example:

You have a purchase order which has purchaser information (name, address) and line items. You want to be able to create an IEP process which takes this purchase order and some additional fields (which could be some nested fields in the original purchase order). You then design your IEP process where you use these additional fields to determine whether this purchase order is from a special customer.If it is from a special customer you pass original purchase order to a web service which does some special handling of it.

How to accomplish this goal:

This requires you to perform following steps:

(1)First select existing message structure and choose fields which are used in decision making in IEP process. Also choose message structure you want to pass to IEP process as it is for further processing by another service invoked down the line by IEP process.

(2)Define your IEP process logic.

(3)Translate your existing message to the format expected by IEP.

Read on below to find out how this can be done. You will also learn about how to use XSLT to call IEP service.

Designing IEP process:

IEP File creation wizard now has optional steps for users. This allow them to select an existing message structure (XSD element/type) and create an IEP input stream with pre- populated IEP schema attributes.

For example a Purchase Order XSD could be:

Following are Wizard Steps to use existing schema structure:

Step1: Name And Location

Here you specify name of IEP process.

Step2: Select A Global Element Or Type

Here you select a global element or type from an existing schema file.

Step3: Verify Or Edit Attributes Of Stream Input

Here it shows attributes of IEP Stream Input Operator. These attributes are generated based on element or type selected in the previous step. An attribute of Stream Input Operator is mapped to input message type which IEP process can receive.

Any XSD attributes and leaf level elements are automatically generated and shown here.(For example orderDate was an attribute on purchaseOrder element)Also there is default attribute with the same name as selected schema element or type is generated with its data type set to CLOB. This is so that original message can be passed as it is to IEP process.

You have the option to pre-populate additional schema element/type by either going back to previous step and selecting another schema element/type or adding new IEP attributes in Step3. As shown below "name" is added here.

After wizard is finished IEP editor with a default Stream Input is created. This Stream Input has attributes as specified in Step3.

Now once you have a Stream Input which has input message structure based on an existing schema, you can complete the logic in your IEP process. An example is shown below where IEP process receives purchase order and checks if it is from a special customer if so call out an external web service for further processing.

Below is how completed IEP process looks:

Using XSLT transformation:

Since IEP process takes an existing message structure as its input among other details and sends this exiting message structure to a different web service, you would need to use some kind of mapping to translate your existing message structure to what is required at IEP process's input. To do this you can use XSLT transformation which transforms the the existing message to the format as expected by IEP process. Here is how it can be done in XSLT.

Complete Demo and Further reading:

Here is the complete video demo which shows, how to use existing hierarchical message structure in IEP and use XSLT to transform message and invoke IEP process.

Here is the complete sample project which you can try. (You would need to make sure IEPSE, XSLTSE,HTTPBC and FILEBC are installed)

If you want to learn more about IEP, check out this.

JSPWiki v2.4.100
[RSS]
« Home Index Changes Prefs
This page (revision-33) was last changed on 18-Jan-08 19:16 PM, -0800 by RiteshAdval