Sample Configuration for Outbound Processing: XML to EDIFACT

In this section:

This topic provides step-by-step instructions for configuring a basic outbound message flow for the iWay Integration Solution for UN/EDIFACT. The message flow represents the movement and tasks in the conversion of a message from XML to EDIFACT.

If you plan to modify the message flow presented here and would like more information on the supported iWay business components that you can use in channel construction, see the iWay Service Manager User's Guide.


Top of page

x
Accessing the iWay Service Manager Administration Console

For instructions, see Accessing the iWay Service Manager Administration Console.


Top of page

x
Adding an Ebix to the Registry

The iWay e-Business Information Exchange (Ebix) framework supplies several Ebix files for the iWay Integration Solution for UN/EDIFACT.

An Ebix file for EDIFACT is named EDIFACT_transaction_set.ebx, where transaction_set is the transaction set number. For example, the Ebix file for EDIFACT transaction set D01B is named EDIFACT_D01B.ebx.

For details on the supported EDIFACT transaction sets, see UN/EDIFACT Supported Versions.

This topic describes how to add an Ebix to the Registry on Windows and UNIX.

Tip: If you already added an Ebix to the Registry as described in Adding an Ebix to the Registry, you do not need to add it again for outbound processing. You can go directly to Defining an Inlet.



x
Procedure: How to Add an Ebix to the Registry on Windows
  1. To access the Registry, click the Registry option in the top pane.
  2. Under Components in the left pane of the Registry, select Ebix.

    The Ebix pane opens, as shown in the following image.

  3. Click Add to add a new Ebix. The New Ebix pane opens.

  4. Browse to the directory in which the Ebix is located and select the name of the file, for example, EDIFACT_D01B.ebx.
  5. Once you have selected the Ebix, click Next.

    You are prompted for the name of the Ebix and an optional description.

  6. Enter a name for the Ebix, for example, EDIFACT_D01B_EBIX, and an optional description, such as EDIFACT D01B EBIX.

    Note: This step must be repeated for each Ebix message set that is added to the Registry.

  7. Click Finish.

    On the Ebix pane, you will see that the Ebix was successfully added. Later you will associate it with the channel for inbound processing.



x
Procedure: How to Add an Ebix to the Registry on UNIX

Depending on your system configuration, there are two methods that you can use to add an Ebix to the Registry on UNIX.


Top of page

x
Adding Special Register Sets

In iWay Service Manager, a special register is a name-value pair that defines a variable that is carried throughout the system. Once defined, this variable is available to all components of the system. Within the EDIFACT components, a Best Practice is to use special registers to define inputs and outputs. When packages containing channels are migrated between systems, the only changes required to deploy in the new location is to modify these special registers and build the channel. Channels may have many locations and this practice will minimize the effort required to migrate. For a complete list of system special registers that are provided, see the iWay Service Manager Programmer's Guide. For more information on defining a special register of your own, see the iWay Service Manager User's Guide.

The sample outbound channel uses a set of special registers. For example:



x
Procedure: How to Add a Special Register Set to Your Channel

To add a special register set to your channel:

  1. In the left console pane of the Registry menu, select Channels.

    The Channels pane opens.

  2. In the row for your channel, click Regs for the channel you want to modify.

    The Assign register pane opens.

  3. Select a register and click Finish.
  4. Click Back to return to the Channels pane.

Top of page

x
Defining an Inlet

You will add a listener to the Registry, then associate that listener with a new inlet.



x
Procedure: How to Add a Listener
  1. From the Registry menu options, select Listeners.
  2. On the Listeners pane, click Add to add a new listener.
  3. For the purpose of this example, we will show the configuration with a File listener. For details on supported protocols, see the iWay Service Manager Protocol Guide.

    Select File from the Type drop-down list and click Next.

    The configuration parameters pane opens.

  4. Supply configuration parameters for the new File listener as follows. An asterisk indicates that a parameter is required. For parameters not listed in the following table, accept the default value.

    Parameter

    Value

    Input Path *

    sreg(XML.Input)

    This value is a special register that uses a defined directory in which input messages are received.

    Make sure that you have created this directory; otherwise, errors will occur during deployment.

    Destination *

    sreg(XML.ValidationReport)\validation__sreg(basename)__*.xml

    This value is a special register that uses a defined directory in which output messages are received.

    Note: The double underscore characters are used in the destination to escape the underscore.

    Make sure that you have created this directory; otherwise, errors will occur during deployment.

    Removal Destination

    sreg(XML.Archive)

    This value is a special register that uses a defined directory to which output messages are moved if they fail during transformation.

    Make sure that you have created this directory; otherwise, errors will occur during deployment. It is recommended to configure a removal destination when you are constructing a basic channel.

    Suffix In

    xml

    Input files with the extension .xml are allowed.

    Suffix Out

    edifact

    In this example, the extension for output files is .edifact.

  5. Click Next.
  6. On the Listeners pane, enter the name of the new listener and a brief description, as shown in the following table.

    Parameter

    Value

    Name *

    XmlToEDIFACT_Ebix

    Description

    XML to EDIFACT file listener

  7. Click Finish to add the listener.


x
Procedure: How to Define an Inlet
  1. From the Registry menu options, select Inlets.
  2. On the Inlet Definitions pane, click Add to add an inlet.
  3. On the New Inlet Definition pane, enter the name of the new inlet and an optional description, as shown in the following table.

    Parameter

    Value

    Name *

    XmlToEDIFACT_Ebix

    Description

    The file inlet contains a file listener for XML to EDIFACT processing.

  4. Click Finish to add the inlet.
  5. On the Construct Inlet pane, click Add to associate the listener with the inlet. The next pane prompts you for the component type.
  6. Select Listener and click Next.

    The next pane prompts you to select a listener.

  7. Select XmlToEDIFACT_Ebix, which is the listener you added earlier for outbound processing, and click Finish.

    The listener is added to the inlet.


Top of page

x
Defining a Route

For this sample channel configuration, you will define a route that will invoke the XML to EDIFACT validation process flow. The outcome of the validation process flow will place valid EDIFACT data in a defined output folder. Invalid EDIFACT data will be routed to an errors folder. A validation report will also be sent to the appropriate folder.

This section describes how to create a validation process flow using iIT Designer and bind it to a sample outbound channel as a route.



x
Procedure: How to Create a New Project and Start the Process Flow

To create a new project and start the process flow using iIT Designer:

  1. From the Windows Start menu select Programs, iWay 7.0 Service Manager, tools, and then iWay Integration Tools (iIT) 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 drop-down list.

    The Designer Project Information dialog box opens, prompting you for a project name and optional description.

  4. In the Name field, type a project name, for example, Test.

    In the Description field, type a brief description (optional) to describe the project.

  5. Click Next.

    The Designer Project Bindings dialog box opens.

  6. To create the project in the iWay Registry, select iWay Registry and click Finish. The choice of project association depends on where you intend to publish (deploy) your process flow. If you are developing a process flow for use as part of a channel, you must publish it to the iWay Registry for subsequent deployment.
  7. The Test 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 project node and select Save from the context menu.
  9. Expand the Test project node to expose the project elements (Processes, Services, Transforms, and so on).
  10. Right-click the Processes folder and select New Process from the drop-down list.

    The iWay Process Configuration dialog box opens.

  11. In the Name field, type XMLToEDIFACT_Ebix as the process flow name.

    In the Description field, type a brief description (optional).

  12. Click Finish.

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

    You are ready to build the XMLToEDIFACT_Ebix validation process flow by configuring objects to it and specifying their relationships.



x
Procedure: How to Configure Objects for the Process Flow

To configure objects for the process flow using iIT Designer:

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

    The New Service Object dialog box opens.

  2. In the Name field, type XMLToEDIFACTTransformAgent, and a brief description (optional) in the Description field.
  3. Click Next.

    The Service Type dialog box opens.

  4. Select Class Name and enter com.ibi.agents.XMLToEDIFACTTransformAgent.
  5. Click Next.

    The Properties dialog box opens.

  6. For the template parameter, enter the name of the transformation template, for example, XMLtoFACT_%_^.xch.
  7. For the debug parameter, select false from the drop-down list.
  8. Click Finish.

    The new Service object (XMLtoEDIFACTTransformAgent) appears in the workspace.

  9. Select the Start object, right-click the XMLtoEDIFACTTransformAgent object, and select 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 line appears between the objects to indicate that a relationship has been established.

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

    The New File Object dialog box opens.

  12. In the Name field, type Write To Error Dir, and a brief description (optional) in the Description field.
  13. Click Next.

    The File Type dialog box opens.

  14. From the Type drop-down list, select File Write.
  15. Click Next.

    The Properties dialog box opens.

  16. For the Target Directory parameter, enter a location where error data will be written, for example, sreg(XML.Error).
  17. For the File Pattern parameter, enter error__sreg(basename)__*.xml.
  18. For the Return parameter, select input from the drop-down list.
  19. Click Finish.

    The new File object (Write To Error Dir) appears in the workspace.

  20. Select the XMLtoEDIFACTTransformAgent object, right-click the Write To Error Dir object, and select Relation from the context menu.

    The Line Configuration dialog box opens.

  21. From the Event drop-down list, select OnFailure and click OK.

    A line appears between the objects to indicate that a relationship has been established.

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

    The End Name and Description dialog box opens.

  23. In the Name field, type End_Fail, and a brief description (optional) in the Description field.
  24. Click Next.

    The End Name Schema dialog box opens.

  25. 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.
  26. Click Next.

    The Properties dialog box opens.

  27. Click Finish to accept the default values and close the dialog box.

    The new End_Fail object appears in the workspace.

  28. Select the Write To Error Dir object, right-click the End_Fail object, and select Relation from the drop-down list.

    The Line Configuration dialog box opens.

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

    A line appears between the objects to indicate that a relationship has been established.

  30. Drag and drop the Service object from the toolbar to the workspace.

    The New Service Object dialog box opens.

  31. In the Name field, type XDEDIFACTValidationReportAgent, and a brief description (optional) in the Description field.
  32. Click Next.

    The Service Type dialog box opens.

  33. Select Class Name and enter com.ibi.agents.XDEDIFACTValidationReportAgent.
  34. Click Next.

    The Properties dialog box opens.

  35. Configure the available parameters according to your requirements.
  36. Click Finish.

    The new Service object (XDEDIFACTValidationReportAgent) appears in the workspace.

  37. Select the XMLtoEDIFACTTransformAgent object, right-click the XDEDIFACTValidationReportAgent object, and select Relation from the context menu.

    The Line Configuration dialog box opens.

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

    A line appears between the objects to indicate that a relationship has been established.

  39. Drag and drop the Decision Test object from the toolbar to the workspace.

    The New Test Object dialog box opens.

  40. In the Name field, type Decision Test, and a brief description (optional) in the Description field.
  41. Click Next.

    The Test Operands dialog box opens.

  42. In the Operand One field, enter the following:
    XPATH(/documents/ValidationReport/Report/Errors/error)
  43. From the Operation drop-down list, select Is Not Null.
  44. Click Next.

    The Value Occurrences dialog box opens.

  45. Ensure that Unique is selected from the available options.
  46. Click Finish.

    The new Decision Test object appears in the workspace.

  47. Select the XDEDIFACTValidationReportAgent object, right-click the Decision Test object, and select Relation from the context menu.

    The Line Configuration dialog box opens.

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

    A line appears between the objects to indicate that a relationship has been established.

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

    The New File Object dialog box opens.

  50. In the Name field, type Write Good File, and a brief description (optional) in the Description field.
  51. Click Next.

    The File Type dialog box opens.

  52. From the Type drop-down list, select File Write.
  53. Click Next.

    The Properties dialog box opens.

  54. For the Source of Data parameter, enter the following:
    XPATH(/documents/output)
  55. For the Target Directory parameter, enter the following location where valid data will be written:
    sreg(XML.Output)
  56. For the File Pattern parameter, enter the following:
    sreg(basename)__*.edifact
  57. For the Return parameter, select input from the drop-down list.
  58. Click Finish.

    The new File object (Write Good File) appears in the workspace.

  59. Select the Decision Test object, right-click the Write Good File object, and select Relation from the context menu.

    The Line Configuration dialog box opens.

  60. From the Event drop-down list, select OnCustom.

  61. In the Case of section, select false.
  62. Click OK.

    A line appears between the objects to indicate that a relationship has been established.

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

    The End Name and Description dialog box opens.

  64. In the Name field, type End_Success, and a brief description (optional) in the Description field.
  65. Click Next.

    The End Name Schema dialog box opens.

  66. 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.
  67. Click Next.

    The Properties dialog box opens.

  68. Click Finish to accept the default values and close the dialog box.

    The new End_Success object appears in the workspace.

  69. Select the Write Good File object, right-click the End_Success object, and select Relation from the drop-down list.

    The Line Configuration dialog box opens.

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

    A line appears between the objects to indicate that a relationship has been established.

  71. Select the Decision Test object, right-click the End_Success object, and select Relation from the context menu.

    The Line Configuration dialog box opens.

  72. From the Event drop-down list, select OnCustom.

  73. In the Case of section, select true.
  74. Click OK.

    A line appears between the objects to indicate that a relationship has been established.

    The process flow is now complete.

  75. To save the process flow, right-click the XMLToEDIFACT_Ebix node in the left pane and select Save from the context menu.

    Now you need to validate the process flow and publish it to the Registry of the iWay Service Manager Administration Console for use in the route of a channel for outbound processing.

    Validating a process flow ensures that its structure is correct. Publishing a process flow makes it available in the Registry for use in a channel configuration. For instructions on validating and publishing the process flow, see the iWay Integration Tools Designer User's Guide.

  76. Close iIT Designer.

    Your next step is to add a new route to the Registry using the iWay Service Manager Administration Console and associate the process flow with it.



x
Procedure: How to Define a Route and Associate the Process Flow With It

To define a route and associate the process flow with It:

  1. From the Registry menu options in the iWay Service Manager Administration Console, click Routes.
  2. On the Route Definitions pane, click Add to add a route.
  3. On the New Route Definition pane, enter a name for the route and an optional description, as shown in the following table.

    Parameter

    Value

    Name *

    XMLToEDIFACT

    Description

    This route will invoke the XML to EDIFACT validation process. The outcome of the validation process will place valid EDIFACT data in your valid outbound folder. Invalid EDIFACT will be routed to an errors folder. A validation report will also be sent to the appropriate folder.

  4. Click Finish.
  5. On the Construct Route pane, click Add.

    You are prompted for the type of component to associate with the route.

  6. Select Process and click Next.
  7. The next pane prompts you to select a process. Select the process flow you created earlier with iIT Designer, XMLToEDIFACT_Ebix, and click Finish.

    The route, with its associated process flow, has been successfully defined.


Top of page

x
Defining an Outlet

For the iWay Integration Solution for UN/EDIFACT, you will add an emitter to the Registry, then associate it with a new outlet.



x
Procedure: How to Add an Emitter for an Error Validation Report

To add an emitter that will emit an error validation report and error file due to the XML to EDIFACT validation process:

  1. From the Registry menu options, select Emitters.
  2. On the Emitters pane, click Add to add an emitter.

    The next pane prompts you for the emitter type.

  3. Select File from the drop-down list and click Next.

    The File Emitter configuration parameters pane opens.

  4. In the Destination field, enter the following:
    sreg(XML.ErrorReport)\error__sreg(basename)__*.xml
  5. From the Create Directory drop-down list, select true.
  6. Click Next.
  7. On the Emitters pane, enter the name of the new emitter and an optional description, as shown in the following table:

    Parameter

    Value

    Name *

    XmltoEDIFACTEbix_XML_error

    Description

    XmltoEDIFACTEbix_XML

  8. Click Finish to add the emitter.


x
Procedure: How to Add an Emitter for a Valid Validation Report

To add an emitter that will emit a valid validation report due to the XML to EDIFACT validation process:

  1. From the Registry menu options, select Emitters.
  2. On the Emitters pane, click Add to add an emitter.

    The next pane prompts you for the emitter type.

  3. Select File from the drop-down list and click Next.

    The File Emitter configuration parameters pane opens.

  4. In the Destination field, enter the following:
    sreg(XML.ValidationReport)\validation_sreg(basename)_*.xml
  5. From the Create Directory drop-down list, select true.
  6. Click Next.
  7. On the Emitters pane, enter the name of the new emitter and an optional description, as shown in the following table:

    Parameter

    Value

    Name *

    XmltoEDIFACTEbix_XML_validation

    Description

    XmltoEDIFACTEbix_XML

  8. Click Finish to add the emitter.


x
Procedure: How to Define the Outlets

Now that you have added two emitters to the Registry, you are ready to define the required outlets. Each emitter will be associated with a corresponding outlet.

  1. From the Registry menu options, select Outlets.
  2. On the Outlet Definitions pane, click Add to add the first outlet.
  3. On the New Outlet Definition pane, enter the name of the first new outlet and an optional description, as shown in the following table.

    Parameter

    Value

    Name *

    XmltoEDIFACTEbix_XML_error

    Description

    Outlet which will contain error validation report and error file due to the XML to EDIFACT validation process.

  4. Click Finish to add the outlet.
  5. On the Construct Outlet pane, click Add to associate the emitter with the outlet.

    The next pane prompts you for the component type.

  6. Select Emitter and click Next.

    The next pane prompts you to select an emitter.

  7. Select XmltoEDIFACTEbix_XML_error, which is the first emitter you added earlier, and click Finish.
  8. On the Outlet Definitions pane, click Add to add the second outlet.
  9. On the New Outlet Definition pane, enter the name of the second outlet and an optional description, as shown in the following table.

    Parameter

    Value

    Name *

    XmltoEDIFACTEbix_XML_validation

    Description

    Outlet which will contain valid validation report produced by the validation process.

  10. Click Finish to add the outlet.
  11. On the Construct Outlet pane, click Add to associate the emitter with the outlet.

    The next pane prompts you for the component type.

  12. Select Emitter and click Next.

    The next pane prompts you to select an emitter.

  13. Select XmltoEDIFACTEbix_XML_validation, which is the second emitter you added earlier.
  14. Click Finish.

Top of page

x
Defining a Channel

Now that you have defined the required components for the outbound channel, you are ready to add the channel to the Registry and associate the conduits with it. At this time you will also add the route to the channel.



x
Procedure: How to Define a Channel

To define a channel:

  1. From the Registry menu options, select Channels.
  2. On the Channel Definitions pane, click Add to add a channel.
  3. On the New Channel Definition pane, enter the name of the new channel (for example, XmlToEDIFACT_Ebix) and an optional description. Then click Finish to add the channel.
  4. On the Construct Channel pane, click Add to associate the inlet, route, and outlets with the channel.

    You are prompted to associate components with the channel.

  5. Select Inlet and click Next. The next pane prompts you to select an inlet.
  6. Select XmlToEDIFACT_Ebix, which you defined earlier, and click Finish.

    The inlet is associated with the channel. Now you need to associate a route with the channel and set it to the default.

  7. On the Construct Channel pane, click Add.

    The next pane prompts you for the component type.

  8. Select Route and click Next.

    On the next pane, you are prompted to select a route.

  9. Select XmltoEDIFACTEbix, which you defined earlier, and click Finish.

    The Construct Channel pane reopens.

  10. Click the minus sign (-) under Conditions to set this route as the default.

  11. On the Construct Channel pane, click Add to add the next component.
  12. When prompted for the component type, select Outlet and click Next.
  13. Select the two outlets you defined earlier, XmltoEDIFACTEbix_XML_error and XmltoEDIFACTEbix_XML_validation.
  14. Click Finish.
  15. To set a condition for the outlets, on the Construct Channel pane, click the plus sign (+) under Conditions for the specific outlet.

    The Set Condition pane opens.

  16. In the Condition input field, enter the appropriate conditional expression, and click Update.

    The following table lists the expression that must be entered for each outlet.

    Outlet

    Expression

    XmltoEDIFACTEbix_XML_validation

    _isxml() and sreg(iwaf.validationSuccess) = true

    XmltoEDIFACTEbix_XML_error

    _isxml() and sreg(iwaf.validationSuccess) != true

    For details on supported conditions, see the topic on using functions in the iWay Service Manager User's Guide.



x
Procedure: How to Add the Ebix to the Channel
  1. From the Registry menu options, select Channels.

    The Channel Definitions pane opens.

  2. Click the link in the Ebix column for the XmlToEDIFACT_Ebix channel.
  3. On the next pane, which prompts you to add Ebix components, click Add to add the Ebix to the channel.
  4. On the next pane, select EDIFACT_D01B_EBIX, which is the name of the Ebix you added previously, and click Finish.


x
Procedure: How to Build the Channel
  1. From the Registry menu options, select Channels.
  2. On the Channel Definitions pane, select the channel for outbound processing defined previously, XmlToEDIFACT_Ebix, and click Build.

    The results of the build are displayed on the right pane.

  3. Review the results of your build and then click Back.

    If an error or errors are displayed in the Message column, take the appropriate action as instructed.



x
Procedure: How to Deploy the Channel

Deployment is the mechanism by which a channel moves from being stored in the Registry to becoming active in iWay Service Manager. For more information on deployment, see the iWay Service Manager User's Guide.

  1. Select the Deployments option.
  2. On the Channel Management pane, click Deploy.
  3. On the Available Channels pane, select the channel you defined previously, XmlToEDIFACT_Ebix, and click Deploy.

    The Channel Management pane reopens.

  4. Select XmlToEDIFACT_Ebix and click Start.

    The red X under Status changes to a green check mark to indicate that the channel has been started. If an error or errors are displayed, take the appropriate action as instructed.


Top of page

x
Reusing Your Channel Configuration

Using the Archive Manager feature of iWay Service Manager, you can archive your channel configuration with its associated components and import them into another Registry. They will then be available from that Registry for modification or reuse.

For details on this feature, see the iWay Service Manager User's Guide.


iWay Software