Creating
an Orchestration to Enter Sales Orders in EnterpriseOne
Before You Begin
This 20-minute tutorial shows you how to create an
orchestration that populates a grid in EnterpriseOne with
multiple sales order lines. It shows how to use the Orchestrator
Process Recorder in EnterpriseOne to capture the form request
for the orchestration.
With the Process Recorder, you record the steps that you want a
form request to perform and then save it. The Process Recorder
saves the recording as a form request, which you can add to an
orchestration in the Orchestrator Studio.
Background
When you use the Process Recorder to capture a process that
adds a row to a grid, each field that you update in the row is
captured as an input to an array in the form request. The array
captured in the form request is automatically named GridData.
In the Orchestrator Studio, when you add this type of form
request to an orchestration, you can automatically generate the
GridData array as an input to the orchestration. You then map
the GridData array inputs in the orchestration to the inputs in
the form request, the orchestration repeatedly invokes the form
request to add multiple records to a grid in EnterpriseOne..
What Do You Need?
Orchestrator Studio 9.2.4 or higher deployed in a JD Edwards
EnterpriseOne test environment with a minimum of EnterpriseOne
Tools 9.2.4.rm request to add multiple records to a grid in
EnterpriseOne.
Data for customers, items, and branches in the database.
Access to the Process Recorder in EnterpriseOne, which is
enabled through UDO feature security.
Using
the Process Recorder to Create a Form Request for Entering a
Sales Order
Sign in to the JD Edwards EnterpriseOne Orchestrator Studio.
Access the EnterpriseOne application by clicking the JD
Edwards EnterpriseOne icon on the Orchestrator
Studio Home page.
Note: Ensure you sign
in as the same user that you used to sign in to the
Orchestrator Studio.
In EnterpriseOne, using Fast Path or the Navigator menus,
access the Sales Order Detail (P4210)
application.
With the Customer Service Inquiry form launched, click your
User ID in the upper right corner to access the Personalization
menu, select Record a Process.
In the Process Recorder, click the Start button.
In Customer Service Inquiry, click Add.
In Sales Order Detail Revisions, complete
the following fields in the header area: Branch/Plant = 30 Sold To = 4242
In the first row of the grid, complete the following fields: Quantity Ordered = 1 Item Number =220
Click OK to save the order.
In the Process Recorder, click Return Values.
In Sales Order Detail Revisions, click the two fields to the
right of the Previous Order field, which
display the order number and order type (SO) of the order that
you just entered.
The Process Recorder adds these fields to the Return
Controls box. When you run an orchestration that
uses this form request to add a sales order, these values can
be returned in the orchestration output.
In the Process Recorder, click Resume and
then click Stop.
Complete the following fields in the Process Recorder: Name = Enter
Sales Order
Description = Enter Sales Order. Product Code = 55
NOTE: If you leave the
Product Code field blank, the Orchestrator will assign 55 as
the default value.
Click Save.
EnterpriseOne saves the recording as a Form Request UDO.
Close the Process Recorder.
Creating
the Enter Sales Orders Orchestration
Access the Orchestrator Studio.
If the existing session has NOT timed out already, you need to
sign off and sign in again for the cache to update so you can
work with the newly added form request UDO.
On the Orchestrator Studio Home page, click the
Orchestrations icon.
On the Orchestrations side panel, click New.
On the Orchestration design page, complete the
following fields: Orchestration =Enter Sales Orders Description = Enter sales orders. Product Code =55
In the orchestration canvas area, click the plus sign (+) in between the Start
and End nodes.
In the New Step Type drop-down list, select Form
Request, and then select the Enter Sales
Order form request that you created in the previous
task using the Process Recorder.
Click the Form Request icon in the
orchestration flow and then click the Transformations
icon.
In the Transformations dialog, click the Add Inputs
to Orchestration button.
This automatically adds inputs defined in the form request as
inputs to the orchestration, which includes an array called “GridData”
to facilitate adding multiple rows to the grid.
Click the Start icon in the
orchestration flow and then click Inputs and Values
icon.
In the Inputs and Values dialog, ensure Input
Format is set to Generic.
The generic JSON input format is simpler to produce and easier
to use when testing an orchestration that includes an array as
an input, as in this example.
In the Orchestration Inputs tab, click the
triangle next to GridData to expand the
list of inputs.
For the Quantity Ordered
and Item Number GridData,
change the Value Type option from “String”
to “Numeric.”
Click the Form Request icon in the orchestration flow and
then click the Transformations icon.
In the Transformations dialog,
click the Auto Map button.
This maps the orchestration inputs to the form request inputs,
as long as the input names are matching.
Click the End icon in the orchestration
flow and then click the Orchestration Outputs
icon.
In the Orchestration
Output dialog box, slide the Select All
toggle button to right.
This adds the two Previous
Order fields, which were selected as return fields
when the form request was recorded in the Process Recorder.
This refines the orchestration response to return only the
values in the selected return fields. If you do not specify
output mappings here, the entire response from the form
request will be returned.
In the Output column,
change the following values: Previous Order = Order Number Previous Order Type = Document Type
In the Value Type column, change the
value for Order Number from “String”
to “Numeric.”
The Orchestration Outputs dialog box should look like this:
On the Orchestration design page, click Save to
save the orchestration.
Testing
the Enter Sales Order Orchestration
On the Orchestration design page, click the Start icon
in the orchestration flow and then click the Run
Orchestration icon.
On the Run Orchestrations page, click the Refresh
Cache button.
In the input fields on the left, enter the following:
Business Unit = 30 Long Address Number = 4242 Quantity Ordered = 20 Item Number = 220
Click Run.
If successful, the Output section
displays a green checkmark and a response in the JSON format.
To display the output data in the XML format, select
application/xml option in the Accept
drop-down list in the Output area.
A sales order is automatically entered in the EnterpriseOne
application. In the Output section, note the Order Number
value that the orchestration created.
Sign in to the EnterpriseOne application.
Fast path to the P4210 application and
locate the new sales order by entering the order number value
that you have noted in the QBE column for Order Number.
Verify that the orchestration automatically entered the new
sales order.
Back in the Run Orchestrations page, click
the </>Raw button.
The Run Orchestrations page transforms the inputs you that you
entered to JSON format. JSON stands for JavaScript Object
Notation. It is an industry-standard way for web applications
to exchange input and output data. The </> Raw option
enables you to use raw JSON or XML input to test the
orchestration instead of entering inputs into the input
fields.
Add multiple rows inside the GridData array
as shown below. Ensure that the JSON is valid.
This input contains the JSON format for an array. The array is
named “GridData,” and it includes a set of 3 items to be
included on the sales order. The two inputs of the JSON,
Business Unit and Long Address Number, are in the sales order
header. You need to specify them only once for a single sales
order.
Click Run.
In the EnterpriseOne application, access the sales order and
confirm it has the sales order with three items you just
created.