Introduction

The ModusBox’s JDE Connector leverages the internal capabilities of Oracle’s JD Edwards EnterpriseOne™ solution to a broader extent.

The JDE Connector aims to provide integration from and to Oracle’s JD Edwards EnterpriseOne™.

ModusBox’s JDE Connector leverages the power of Oracle’s Java Dynamic Connector to provide interoperability with Oracle’s JD Edwards EnterpriseOne™ and external systems.

After reading this guide, you should be able to accomplish the following scenarios:

  1. Log into JD Edwards EnterpriseOne™

  2. Invoke a BSFN on the server using proper parameters

  3. Invoke a UBE by name

  4. Check a UBE call’s status asynchronously

  5. Poll Events

  6. Poll EDI Events

  7. Log out

At design time, the JDE Connector allows you to discover functions by name providing full access to all BSFN signatures. Given that discovery is a heavy duty process, the Connector manages a cache repository for all function’s metadata used at least once.

The results of a function call will be injected into the flow as a Map containing key-value pairs with the invocation’s output values. This approach gives the end user freedom of choice to construct complex flows and manage custom exception strategies.

Prerequisites

This document assumes that you are familiar with Oracle’s JD Edwards EnterpriseOne™ basics, Mule the Anypoint™ Studio interface.

Requirements

  • Mule 3.6.1 server Runtime or higher

  • Anypoint Studio January 2015 onwards

  • Access to your Oracle’s JD Edwards EnterpriseOne™ installation java libraries

Compatibility Matrix

The following matrix displays the Oracle’s JD Edwards EnterpriseOne™ Tools versions supported by version

1.1.0

Tool Release 8.98 Update 4. onwards

Install the Connector

Installing

  1. Launch Anypoint Studio and click on Help → Install New Software.

  2. Press Add to create a new repository.

  3. Type in "ModusBox Inc" in the Name field and http://modusbox.com/jde-update-site/ in the Location field

  4. Expand Select and select JDE Connector. Press Next > to review the items to be installed.

  5. Press Next > again to review and accept the license. Press Finish to install the connector.

  6. Press OK to accept the prompted security dialog box and allow Anypoint Studio to restart.

Updating From an Older Version

If you’re currently using an older version of the connector, a small popup appears in the bottom right corner of Anypoint Studio with an "Updates Available" message.

  1. Click the popup and check for available updates. 

  2. Click the Connector version checkbox and click Next and follow the instructions provided by the user interface. 

  3. Restart Studio when prompted. 

  4. After restarting, when creating a flow and using the Object Store Connector, if you have several versions of the connector installed, you may be asked which version you would like to use. Choose the version you would like to use.

Additionally, we recommend that you keep Studio up to date with its latest version.

It’s not necessary do any update on the flows because this update is compatible with the previous one. This version adds optional parameters to existing operation:

  • BSFN Call

  • Submit Batch Process

Configure the Connector Global Element

Preliminary Setup

In addition to meeting the requirements listed in the Prerequisites and Requirements section, a bundle has to be created to establish a connection to the JDE Enterprise Server. This bundle will be created only for the first time and it can be reused in other applications.

This adapter is a bundle of JAR files that come with the JD Edwards EnterpriseOne distribution.

These steps illustrate how to create bundle connector component so that you can include in the flow that needs connect to JDE Enterprise Server.

Step 1

Create a folder in the file system that it will include the following subfolder:

jde plugin 01

SERVER_jar_File:

In this folder we need all the jar file that come with the JD Edwards EnterpriseOne distribution. The files can be found at <Enterprise Server directory>\system\classes on the JDE Enterprise Server to which you are connecting.

For Tools Releases prior to JD Edwards EnterpriseOne Tools Release 9.1 Update 4, copy these files:

  • ApplicationAPIs_JAR.jar

  • ApplicationLogic_JAR.jar

  • Base_JAR.jar

  • BizLogicContainer_JAR.jar

  • BizLogicContainerClient_JAR.jar

  • BusinessLogicServices_JAR.jar

  • castor.jar

  • commons-httpclient-3.0.jar

  • commons-logging.jar

  • Connector_JAR.jar

  • EventProcessor_JAR.jar

  • Generator.jar

  • JdbjBase_JAR.jar

  • JdbjInterfaces_JAR.jar

  • JdeNet_JAR.jar

  • jmxremote.jar

  • jmxremote_optional.jar

  • jmxri.jar

  • ManagementAgent_JAR.jar

  • Metadata.jar

  • MetadataInterface.jar

  • PMApi_JAR.jar

  • Spec_JAR.jar

  • System_JAR.jar

  • SystemInterfaces_JAR.jar

  • xmlparserv2.jar

For JD Edwards EnterpriseOne Tools Release 9.1 Update 4 and later releases, copy the following files:

  • ApplicationAPIs_JAR.jar

  • ApplicationLogic_JAR.jar

  • Base_JAR.jar

  • BizLogicContainer_JAR.jar

  • BizLogicContainerClient_JAR.jar

  • BusinessLogicServices_JAR.jar

  • castor.jar

  • commons-codec.jar

  • commons-lang2.6.jar

  • commons-logging.jar

  • Connector.jar

  • EventProcessor_JAR.jar

  • Generator_JAR.jar

  • httpclient.jar

  • httpcore.jar

  • httpmime.jar

  • j2ee1_3.jar

  • JdbjBase_JAR.jar

  • JdbjInterfaces_JAR.jar

  • JdeNet_JAR.jar

  • jmxremote.jar

  • jmxremote_optional.jar

  • jmxri.jar

  • ManagementAgent_JAR.jar

  • Metadata.jar

  • MetadataInterface.jar

  • PMApi_JAR.jar

  • Spec_JAR.jar

  • System_JAR.jar

  • SystemInterfaces_JAR.jar

  • xml-apis.jar

  • xmlparserv2.jar

JDBC_Vendor_Drivers:

In this folder we need the JDBC driver files that correspond to the database to which you are connecting.

Bundle:

It will be an empty folder that will be used be the JD Edwards Setup to prepare the bundle jar file.

Create Mule Project

Create a new Mule Project with Mule Server 3.7.0 or larger EE as runtime:

step01

We will need this project to generate Bundle.

Generate Bundle

After create the project, you need to build the Oracle JD Edwards' lib bundle.

This jar bundle will be created once and it can be reused for all the projects that it needs connect to JD Edwards.

Step 1

Select the project created and press right mouse button to show context menu.

Select JD Edwards setup from the JDE Context Menu options.

jde plugin 02

This option will open the following screen:

jde plugin 03n1

Step 2

In this screen you need to enter:

JDE Edwards libraries directory: the folder SERVER_jar_File created in section Preliminary Setup.

Select the JDBC driver for you vendor: The driver inside the folder JDBC_Vendor_Drivers created in section Preliminary Setup.

Target directory for your bundle: the folder Bundle created in section Preliminary Setup..

jde plugin 04n1

Press the button Finish and wait at the process end. You can see the advanced in the Progress tab at the bottom:

jde plugin 05

Step 3

When the process finishes, a windows show you the result.

jde plugin 06

You can open the bundle folder to see the JDE Edwards jar file generated:

jde plugin 07

This JAR file will be used in the connector setup.

Note: If you are creating the JDE Edwards bundle from a Maven Project, the jar file will be in the Maven Repository. Folder [MAVEN REP]com\jdedwards\jde-lib-bundle\[Version]

Copy JDE ini Files inside the Project

The JDE Connector relies on Oracle’s Java Dynamic Connector to establish the link to the server. In order to achieve this, setting up the follwing standard configuration files is needed:

  • "jdbj.ini"

  • "interop.ini"

  • "jdelog.properties"

  • "tnsnames.ora" (for Oracle RDBMS based installations only)

These files are distributed with both Fat Clients or Enterprise Server modules. In case you get the files from a Fat Client, the folder containing them can be found under the path ini/sbf of your installation.

step09

Step 1

Put the files inside the project folder in the folder:

  • source/main/resource

  • root folder of the project

step10n1

Step 2

Edit jdeinterop.ini, jdelog.properties, and jdbj.ini for proper settings.

Refer to the Guide "JD Edwards EnterpriseOne Tools Connectors Guide"

Configure Global Element

To use the ModusBox’s JDE Connector in your Mule application, you must configure a global ModusBox’s JDE Connector element that can be used by the ModusBox’s JDE Connector (read more about Global Elements).

The ModusBox’s JDE Connector offers the following global configuration(s), requiring the following credentials:

General → Connection

Field Description

User

Enter JDE User used to initialize the JDE Session.

Password

Enter Password used to authenticate the JDE user

Environment

Enter JDE Environment

Role

Enter JDE User Role

General → Check Enable DataSense

General → Required Dependency

Field Description

Oracle JD Edwards' Lib Bundle

Select Jar File generated in section Generate Bundle or include maven reference. (See below)

Specs Image Settings → Spec Image

Field Description

Folder Specs Image Cache

Select folder to save specs locally

To include the Oracle JD Edwards' lib bundle generated previously:

Press button Add File and select JD Edwards' bundle created.

step13 b

the result will be:

step13

For Maven Project:

step13 c

Press button Add Dependency and select JD Edwards' bundle created.

step13 d

the result will be:

step13 e

Before continue, you need to test connection pressing TEST CONNECTION…​ button

Using the Connector

You can use the connector to

  • Invoke a BSFN on JD Edwards Enterprise Server

  • Submit a UBE

  • Get UBE Job Status for a UBE using JDE Job Id.

  • Get Outbound Events from a JD Edwards Application

  • Get EDI Event from EDI Application

Connector Namespace and Schema

When designing your application in Studio, the act of dragging the connector from the palette onto the Anypoint Studio canvas should automatically populate the XML code with the connector namespace and schema location.

If you are manually coding the Mule application in Studio’s XML editor or other text editor, define the namespace and schema location in the header of your Configuration XML, inside the <mule> tag.
1
2
3
4
5
6
7
8
9
10
11
12
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:jde="http://www.mulesoft.org/schema/mule/jde"
      xsi:schemaLocation="
               http://www.mulesoft.org/schema/mule/core
               http://www.mulesoft.org/schema/mule/core/current/mule.xsd
               http://www.mulesoft.org/schema/mule/connector
               http://www.mulesoft.org/schema/mule/jde http://www.mulesoft.org/schema/mule/jde/current/mule-jde.xsd">

      <!-- put your global configuration elements and flows here -->

</mule>

Using the Connector in a Mavenized Mule App

If you are coding a Mavenized Mule application, this XML snippet must be included in your pom.xml file.

1
2
3
4
5
<dependency>
  <groupId></groupId>
  <artifactId></artifactId>
  <version></version>
</dependency>

Inside the <version> tags, put the desired version number, the word RELEASE for the latest release, or SNAPSHOT for the latest available version. The available versions to date are:

  • x.y.z

Demo Mule Applications Using ModusBox’s JDE Connector

  • Invoke a BSFN

  • Invoke a UBE

  • Get UBE Job Status

  • Get Outbound Events from a JD Edwards Application

  • Get EDI Event to generate Order Acknowledgments 855 EDI Doc

Using the JDE Connector in your application is explained in detail in the Example Use Case section below.

Demo Mule Applications Using Connector to invoke a BSFN

This use case example will create a simple flow to get the address book name from the Address Book table (A/B) invoking the Master Business Function (MBF) on Oracle’s JDE EnterpriseOne Server.

Step 1

Use Mule Project created in the Section 4.2 Create Mule Project.

Step 2

Locate the HTTP Endpint connector on the right hand-side palette:

step02

Step 3

Drag the connector over to the canvas:

step03

Step 4

The connector requires an Connector Configuration; click on Add to create a connector configuration.

step04

Step 5

Give the HTTP endpoint a more descriptive name like “get-AddressBookName-http-endpoint” and press OK to go back to the global HTTP endpoint dialog box:

step05

Step 6

Add a path to the URL like "getaddressbookname" and press SAVE the project. The connector will be ready to process requests.

step06

Step 7

Back to the Message Flow view, you need to Locate the JDE Connector on the right hand-side palette:

step07

Step 8

Drag the connector over to the canvas:

step08

Step 9

You need to select Connector Configuration created in section 4:

step12

Step 10

You need to select the operation "Call object"

step16

Step 11

Now, you need to write the bsfn to call in the Entity Type field and press ENTER:

step17

The connector will get the specification from the server and it will put the specification in the local repository.

step17b

Step 12

After the connector get the specs from the server, you will need to populate the parameters. To do this, you need to select the option: Create Object manually

step18

Press the button […​] and populate the parameters:

Action Code to "I" Inquire

step18b

And Address Book Number the address number that will be part of the URL parameter.

Ex: localhost:8081/getaddressbookname?addressbook=1

step18c

Press OK button to return to JDE Connector configuration. Save the project.

Step 13

Back to the Message Flow view, and you need to Locate the Set Payload on the right hand-side palette to return the address book name.

step19

Step 14

Drag the Transformer over to the canvas and write the answer.

step20

The answer will be:

step20b

Step 15

Finally, run the example as a Mule application

step21

Step 16

Test the Mule Application

Write the URL:

localhost:8081/getaddressbookname?addressbook=1

step22

How to use common Call BSFN parameters

There is 4 common parameters to invoke a BSFN:

Parameter Input/Output Type Description

_BSFNThrowExceptionWithErrorsYN

Input

STRING

Values: Y, The flow will throw Runtime Eexception with cause: org.mule.modules.jde.exceptions.JDEBfsnError.

_BSFNReturnCode

Output

INTEGER

Values: 0: Processed Correctly, 1: There is warnings, 2: There is errors.

_BSFNNumberOfErrors

Output

INTEGER

Number of errors

_BSFNDetailErrors

Output

LIST

Detail of the error. It return ArrayList<CallObjectErrorItem>

This is an example of CallObjectErrorItem object:

step23

Demo Mule Applications Using Connector to submit a UBE

This use case example will create a simple flow to submit an UBE to JDE Enterprise Server.

Step 1

Use Mule Project created in the Section 4.2 Create Mule Project.

Step 2

Locate the HTTP Endpoint connector on the right hand-side palette:

ube step02

Step 3

Drag the connector over to the canvas:

ube step03

Step 4

The connector requires an Connector Configuration; click on Add or to create a connector configuration.

ube step04

Step 5

Give the HTTP endpoint a more descriptive name like “SubmitUBE-http-endpoint” and press OK to go back to the global HTTP endpoint dialog box:

ube step05

Step 6

Add a path to the URL like "submitube" and press SAVE the project. The connector will be ready to receive request.

ube step06

Step 7

Back to the Message Flow view, you need to Locate the JDE Connector on the right hand-side palette:

ube step07

Step 8

Drag the connector over to the canvas:

ube step08

Step 9

You need to select Connector Configuration created in section 4:

ube step12

Step 10

You need to select the operation "Submit batch process"

ube step16

Step 11

Now, you need to write the UBE/Version to submit in the Entity Type field and press ENTER:

ube step17

The connector will get the specification from the server and it will put the specification in the local repository.

ube step17b

Step 12

After the connector get the specs from the server, you will need to populate the parameters. To do this, you need to select the option: Create Object manually

ube step18

Press the button […​] and populate the parameters:

_Job Queue: Enter the Job Queue or empty if you prefer default job queue for the UBE selected

_Selection: F0010.CO = ''00000''

cFiscalDatePattern: F

ube step18c

Press OK button to return to JDE Connector configuration. Save the project.

Step 13

Back to the Message Flow view, and you need to Locate the Set Payload on the right hand-side palette to return the address book name.

ube step19

Step 14

Drag the Transformer over to the canvas and write the answer.

ube step20

Step 15

Finally, run the example as a Mule application

ube step21

Step 16

Test the Mule Application

Write the URL:

localhost:8082/submitube

ube step22

Step 17

Check Work Submit Job from E1

ube step23

How define Data Selection

The parameter _Selection is used to define UBE Data Selection.

The sentence is like a WHERE of SQL sentence.

The _Sentence syntax is:

     table.column_name operator [value|table.column_name];

The table must be a JDE table that it belong to main view. Column Name must be an JDE’s Alias.

The following operators can be used in the _Sentence:

Operator Description

=

Equal

<>

Not equal

<>

Not equal

>

Greater than

<

Less than

>=

Greater than or equal

Less than or equal

BETWEEN

Between an inclusive range

NOT BETWEEN

Not Between an exclusive range

IN

To specify multiple possible values for a column

NOT IN

To exclude multiple possible values for a column

The values can be literals or another column table.

Literals can be String or Number

The sentence can include AND condition and the OR condition

To override the default precedence you need to use parenthesis as:

     C1 AND (C2 OR C3)

The sentence only accept one level of Parenthesis.

For example, this is a valid sentence because the maximum level of Parenthesis opened is 1.

     C1 AND (C2 OR C3) AND (C4 OR C5)

otherwise, this is an invalid sentences because the maximum level of Parenthesis opened is 2.

     C1 AND (C2 OR (C3 AND C4))

Examples:

     F4211.KCOO = '00001' AND F4211.DOCO > 10332
     F4211.KCOO = '00001' AND F4211.DOCO >= 10332
     F4211.KCOO = '00001' AND F4211.DOCO <= 10332
     F4211.KCOO = '00001' AND F4211.DOCO <> 10332
     F4211.KCOO = '00001' AND ( F4211.DCTO = 'SO' OR F4211.DCTO = 'SI' )
     F4211.KCOO = '00001' AND F4211.DCTO IN ('SO','SI')
     F4211.KCOO = '00001' AND F4211.DCTO NOT IN ('SO','SI')
     F4211.KCOO = '00001' AND F4211.DOCO BETWEEN 1022 AND 400
     F4211.KCOO = '00001' AND F4211.DOCO NOT BETWEEN 1022 AND 400
     F4211.MCU = F4211.EMCU AND F4211.DOCO NOT BETWEEN 1022 AND 400

Demo Mule Applications Using Connector to get an UBE state

This use case example will add an control to the previous example to get an UBE state from JDE Enterprise Server after Submit UBE.

Step 1

Back to the Message Flow view, you need to Locate the Session Variable on the right hand-side palette:

sts step01

Step 2

Drag the Transformer over to the canvas after JDE Connector:

sts step02

We use this transformer to save the JOB ID generated by the previous UBE Submit.

Edit Session Variable and add the following values:

Display Name: Save JOB ID

Name: JobIDSaved

Value: #[message.payload._Job_ID]

sts step02b

Step 3

Back to the Message Flow view, you need to Locate the JDE Connector on the right hand-side palette:

sts step03a

Step 4

Drag the connector over to the canvas after Session Variable Save JOB ID:

sts step04

Step 5

You need to select the same Connector Configuration as previous connector.

sts step05

Step 6

You need to select the operation Get batch process information

sts step06

Step 7

Refresh metadata and select Get Job Status

sts step07

Step 8

You will need to populate the parameters. To do this, you need to select the option: Create Object manually and press the button […​]:

sts step08a

Populate the parameters:

Set Job_ID to value: #[sessionVars.JobIDSaved]

sts step08b

Step 9

Update the last "Set Payload" with the following value:

The UBE Id is #[sessionVars.JobIDSaved] and the status is: #[payload.Job_Status]

sts step09

Step 10

Finally, run the example as a Mule application

sts step10

Step 11

Test the Mule Application

Write the URL:

sts step11

The possible values of job status are:

Status Description

S

In Queue

W

Waiting

P

Processing

D

Done

E

Error

H

Hold

Demo Mule Applications Using Connector to capture outbound events

This use case example will create a simple flow to get outbound events that it come from an application that uses a Master Business Function to generate transactions.

JDE outbound transactions requires that you set a Processing Option specifying a transaction type. Additionally, some entry programs enable you to specify a version of the Master Business Function Processing Options program that, in turn, enables you to specify a version of the Interoperability Processing Options program.

For example, to get customer entered by the application Customer Master information (P03013) is necessary setup the following Processing Options:

     Versions -> Customer Master MBF (P0100042) Version with the value ZJDE0002
event jde01

Then, the P0100042 version ZJDE0002 needs to have the following value in

     Outbound -> Transaction Type with the value JDECM
event jde02

The last configuration that is needed is inform to JDE connector the outbound table used by the MBF to inform the event:

Using "Flat File Cross-Reference (P47002)" form "Work With Flat File Cross-Reference" adds the following record:

Table Record Type

F03012Z1

1 Header

Follow next steps to create a flow that it will capture Customers that it added using Customer Master information (P03013)*

For more Outbound Interoperability alternatives from JDE you need to read JD Edwards EnterpriseOne Applications Interoperability Fundamentals Implementation Guide

Step 1

Use Mule Project created in the Section 4.2 Create Mule Project.

Step 2

Locate the Poll Endpoint connector on the right hand-side palette:

event step02

Step 3

Drag the JDE connector over to the canvas:

event step03b

Step 4

You need to select the operation "Poll Events"

event step13

Step 5

Now, you need to select "Capture Event Transactions" in the Entity Type field and press ENTER:

event step14

Step 6

Now, You will need to populate the parameters. To do this, you need to select the option: Create Object manually

event step15

Press the button […​] and populate the parameters:

Transaction Code Enter JDECM value

Max Qty Transactions to Read Enter 3 value

Last Batch Number (EDBT): #['']

event step15c

Press OK button to return to JDE Connector configuration. Save the project.

Step 7

Back to the Message Flow view, and you need to Locate the Set Payload on the right hand-side palette to return the address book name.

Drag the component over to the canvas and write this value:

event step16

Step 8

Back to the Message Flow view, and you need to Locate the Filter Expression on the right hand-side palette to return the address book name.

Drag the component over to the canvas and write this value:

event step17

Step 9

Back to the Message Flow view, and you need to Locate the For Each on the right hand-side palette to return the address book name.

Drag the component over to the canvas and write this value:

event step18

Step 10

Back to the Message Flow view, and you need to Locate the Dom to XML on the right hand-side palette to return the address book name.

Drag the component over to the canvas:

event step19

Step 11

Back to the Message Flow view, and you need to Locate the Variable on the right hand-side palette to return the address book name.

Drag the component over to the canvas and write this variable Name and its value:

Name:

ediID

Value:

#[xpath3('//TRANSACTION[1]/@ETYPE',payload,'STRING')]_#[xpath3('//TRANSACTION[1]/@EDBT',payload,'STRING')]
event step20

Step 12

Back to the Message Flow view, and you need to Locate the File on the right hand-side palette to return the address book name.

Drag the component over to the canvas and write this values:

Folder: demo File Name: events_outbound_#[ediID].xml Connector: create a new connector configuration

event step21

Step 13

Finally, run the example as a Mule application

Step 14

Enter a Customer using Customer Master information (P03013)

Step 15

Check file generated

event step24
event step24b

Demo Mule Applications Using Connector to capture EDI outbound events

This use case example will create a simple flow to generate a Order Acknowledgments (855/ORDRSP) document in a local folder.

It’s important to read the guide: JD Edwards EnterpriseOne Applications Data Interface for Electronic Data Interchange Implementation Guide

First, you need to create a new UBE version for R42565 or use standard XJDE0003 version.

edi 01

and configure Processing Options:

edi 02

The last configuration that is needed is inform to JDE connector the EDI outbound:

Using "Flat File Cross-Reference (P47002)" form "Work With Flat File Cross-Reference" adds the following record:

edi 03
Table Record Type

F47026

1 Header

F47027

2 Detail

F4706

6 Address

F4714

7 Header Text

F4715

8 Detail Text

Follow next steps to create a flow that it will capture EDI outbound to generate EDI doc in a local folder.

Step 1

Use Mule Project created in the Section 4.2 Create Mule Project.

Step 2

Locate the Poll Endpoint connector on the right hand-side palette:

event step02

Step 3

Drag the JDE connector over to the canvas:

event step03b

Step 4

You need to select the operation "EDI Outbounds"

edi step13

Step 5

Now, you need to select "Capure EDI Transactions" in the Entity Type field and press ENTER:

edi step14

Step 6

Now, You will need to populate the parameters. To do this, you need to select the option: Create Object manually

edi step15

Press the button […​] and populate the parameters:

EDI Code Enter 855 value

EDI Document Type Enter SO value

EDI Last EDI Document: Enter #[0L] value

EDI UBE-VERSION to update Transaction Enter R47027-XJDE0001 value. Standard UBE to update Order Acknowledgments

Max Qty Transactions to Read: Enter 10 value

edi step15d

Press OK button to return to JDE Connector configuration. Save the project.

Step 7

Back to the Message Flow view, and you need to Locate the Set Payload on the right hand-side palette to return the address book name.

Drag the component over to the canvas and write this value:

edi step16

Step 8

Back to the Message Flow view, and you need to Locate the Filter Expression on the right hand-side palette to return the address book name.

Drag the component over to the canvas and write this value:

edi step17

Enter this filter expression:

#[xpath('fn:count(//TRANSACTIONS/TRANSACTION)') != 0]

Step 9

Back to the Message Flow view, and you need to Locate the For Each on the right hand-side palette to return the address book name.

Drag the component over to the canvas and write this value:

edi step18

Enter this Collection Expression:

#[xpath3('/TRANSACTIONS/TRANSACTION',payload,'NODESET')]

Step 10

Back to the Message Flow view, and you need to Locate the Dom to XML on the right hand-side palette to return the address book name.

Drag the component over to the canvas:

edi step19

Step 11

Back to the Message Flow view, and you need to Locate the Variable on the right hand-side palette to return the address book name.

Drag the component over to the canvas and write this variable Name and its value:

Name:

ediID

Value:

#[xpath3('//TRANSACTION[1]/@ETYPE',payload,'STRING')]_#[xpath3('//TRANSACTION[1]/@EDOC',payload,'STRING')]
event step20

Step 12

Back to the Message Flow view, and you need to Locate the X12 on the right hand-side palette to return the address book name.

Drag the component over to the canvas and write this values:

edi step21e

Create a new Connector Configuration:

edi step21c

Select Schemas → Create Object manually and you need to add:

/x12/005010/855.esl
edi step21d

Then, you need to select Write Operation from Payload:

edi step21b

Now you need to configure Sender Identification and Receiver Identification:

edi step21f

Step 13

Back to the Message Flow view, and you need to Locate the Transform Message on the right hand-side palette.

Drag the component over to the canvas between Variable and X12 component:

edi step22

Switch to the XML view by clicking Configuration XML and replace CDATA element inside Transform Message definition with:

edi step22b

with

<![CDATA[%dw 1.0
%output application/java
%type mytime = :string { format: "HHMM" }
---
{
        TransactionSets: {
        v005010: {
                "855": [{
                        Interchange: {
                                ISA01: "00",
                                ISA03: "00",
                                ISA05: "ZZ",
                                ISA06: "ModusBox",
                                ISA07: "ZZ",
                                ISA08: "Customer",
                                ISA09: now,
                                ISA10: now as :mytime as :number,
                                ISA11: "^",
                                ISA12: "00501",
                                ISA13: payload.TRANSACTION.@EDOC,
                                ISA14: "0",
                                ISA15: "P",
                                ISA16: ">"
                        },
                        Group: {
                                GS01: "PR",
                                GS02: "DEMO",
                                GS03: "PARTNER",
                                GS04: now,
                                GS05: now as :mytime as :number,
                                GS06: 1111,
                                GS07: "X",
                                GS08: "005010"
                        },
                        SetHeader: {
                                ST01: "855",
                                ST02: "530006100"
                        },
                        Heading: {
                                "0200_BAK": {
                                        BAK01: "00",
                                        BAK02: "AD",
                                        BAK03: "PO01",
                                        BAK04: now
                                }
                        },
                        Detail: {
                                "0100_PO1_Loop": payload.TRANSACTION.TABLE_2.*FORMAT_TABLE_F47027 map ((fORMATTABLEF47027 , indexOfFORMATTABLEF47027) -> {
                                        "0100_PO1": {
                                                PO102: fORMATTABLEF47027.COLUMN_UORG as :number,
                                                PO103: fORMATTABLEF47027.COLUMN_UOM,
                                                PO104: fORMATTABLEF47027.COLUMN_UPRC as :number,
                                                PO105: "CP",
                                                PO106: "CB",
                                                PO107: fORMATTABLEF47027.COLUMN_LITM as :string
                                        },
                                        "0500_PID_Loop": [{
                                                "0500_PID": {
                                                        PID01: "F",
                                                        PID05: fORMATTABLEF47027.COLUMN_DSC1 replace /,/ with ""
                                                }
                                        }]
                                })
                        },
                        Summary: {
                                "0100_CTT_Loop": {
                                        "0100_CTT": {
                                                CTT01: sizeOf payload.TRANSACTION.TABLE_2.*FORMAT_TABLE_F47027,
                                                CTT02: 1
                                        }
                                }
                        }
                }]
        }
}
}]]>

Step 14

Back to the Message Flow view, and you need to Locate the File on the right hand-side palette to return the address book name.

Drag the component over to the canvas and write this values:

Folder: demo File Name: events_outbound_#[ediID].edi Connector: create a new connector configuration

edi step23

Step 15

Finally, run the example as a Mule application

Step 16

Enter a Sales Order and invoke UBE R42565 XJDE0003 [ Batch EDI - P.O. Acknowledgment Transaction (855) ] for the order generated.

Step 17

Check file generated

edi step24
edi step25

Connector Performance

To define the pooling profile for the connector manually, access the Pooling Profile tab in the applicable global element for the connector.

For background information on pooling, see Tuning Performance.

Resources