Before You Begin
This 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 open in the Orchestrator Studio, where you can modify it and add it to an orchestration.
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, using the orchestration Iterate Over feature so that when executed, the orchestration repeatedly invokes the form request to add multiple records to a grid in EnterpriseOne.
What Do You Need?
- Orchestrator Studio 6.1.0.0 or higher deployed in a JD Edwards EnterpriseOne test environment with a minimum of EnterpriseOne Tools 9.2.2.4.
- Data for customers in the database, including a customer with a credit limit who has sales orders with unpaid lines.
- Access to the Orchestrator Studio and permissions to create orchestration and service request components, which are managed as user defined objects (UDO) in EnterpriseOne. See “Setting Up User Access to the Orchestrator Studio” in the JD Edwards EnterpriseOne Tools Orchestrator Studio Guide.
- Access to the Process Recorder in EnterpriseOne, which is enabled through UDO feature security.
Using
the Process Recorder to Create a Form Request
- Access the EnterpriseOne web client.
You can access the EnterpriseOne web client from the Tools page in the JD Edwards EnterpriseOne Orchestrator Studio. - Click the drop-down menu next to your user name and select
Record a Process.
If this option is not available, see the “What Do You Need” section in this OBE. - In the Process Recorder, click the Start button.
- Using Fast Path or the Navigator menus, access the Sales Order Entry (P42101) application.
- On Manage Existing Order, click Add.
- On Enter New Order, complete the following fields in the header area:
- Sold To = Enter a valid customer.
- Branch/Plant = Enter a valid branch.
- In the first row in the grid, complete the following fields:
- Item Number = Enter a valid item.
- Quantity Ordered = Enter a quantity.
- Requested Date = Enter a valid date.
- Click Submit and Close to save the order.
- Make sure that EnterpriseOne returns you to the Manage Existing Order form. If it does not, click the Submit and Close button again.
- On the Manage Existing Order form, click Stop in the Process Recorder.
- Click the three fields next to Previous Order,
which display the order number, type, and company of the order
that you just entered.
The Process Recorder adds these fields to the Return Controls field. When an orchestration invokes this form request to add a sales order, these values will be returned in the orchestration response. - In the Process Recorder, complete these fields:
- Name =
Create Sales Order - Description =
Create a sales order. - Product Code = Select a customer product
code, 55 – 59.
Process Recorder - Click Save.
EnterpriseOne saves the recording as a form request. - Close the Recorder.
Creating
the Create Sales Order Orchestration
Add the new form request to a new orchestration called “Create Sales Order”.
- Access the Orchestrator Studio.
If your previous session is still active, you must close it and sign in again for the form request created in the previous task to be available. - Click the Orchestration icon and then on the Orchestrations page, click the New Orchestration button.
- On the Orchestration design page, complete these fields:
- Orchestration =
Create Sales Order - Enter Short Description =
Create a sales order. - Click the Product Code drop-down list and select a customer product code, 55 – 59.
- Click the Input Format drop-down list and
select 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, which you will do in the next task. - Add a step to the orchestration: click Add Step (+), select Service Request, and then click OK (+).
- At the end of the Service Request row, click the down arrow and select the new Create Sales Order form request that you created in the previous task using the Process Recorder.
- At the end of the Service Request step row, click Add
Inputs to Orchestration.
This automatically adds inputs defined in the step as inputs to the orchestration, which includes an array for the grid mappings to facilitate adding multiple rows to the grid. - In the Orchestration Inputs section, click the X button
next to the P42101_Version input to delete it.
You do not need to use this variable to pass in the orchestration version; this orchestration will use the default version of this application. - Find the Requested Date input in the GridData array and change the Value Type to Date – yyyy/MM/dd.
- Click the Auto Map button above the
Transformations grid.
This maps the orchestration inputs to the form request inputs, as long as the input names are matching. - Click Save.
The orchestration should look like this:
Create Sales Order Orchestration - Click the Orchestration Output button.
- Click Add All.
This adds the three 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. - Navigate back to the Orchestration via the Close button or the breadcrumb link.
- Click Save.
Testing
the Create Sales Order Orchestration
- In the Orchestrator Studio, access the Tools page and then click the Orchestrator Client icon.
- Sign in to the Orchestrator Client with the same credentials used to access the Orchestrator Studio.
- Click XML Cache Refresh.
- In the Orchestrator Name drop-down list, select Create Sales Order.
- Enter valid data for all of the inputs. For the Requested Date, enter the date in yyyy/MM/dd format.
- Click Run to execute the orchestration.
If successful, the Output section displays a green checkmark and a response in JSON.
Output Section - In EnterpriseOne, access the new sales order to confirm it has the expected values.
- Back in the test client, select the JSON Input check box, then copy the Input JSON in the top right box and paste it into the box on the left.
- Use an array to send multiple lines:
- Add the GridData array (to match the name of the Array defined in the orchestration inputs defined in Orchestrator Studio).
- Then add multiple rows inside the GridData array as shown below. Take care to ensure the JSON is valid. There are many tools available to validate JSON.
- Click Run.
- In EnterpriseOne, access the sales order and confirm it has all the rows with the expected values.
{
"GridData":
[
{
"Item Number" : "210",
"Quantity Ordered" : "1",
"Requested Date" : "2018/12/31"
},
{
"Item Number" : "210",
"Quantity Ordered" : "2",
"Requested Date" : "2018/11/30"
},
{
"Item Number" : "210",
"Quantity Ordered" : "3",
"Requested Date" : "2018/10/31"
}
],
"Long Address Number Sold To" : "4242",
"HdrBusinessUnit" : "30"
}
Creating
an Orchestration to Add Multiple Rows to an EnterpriseOne Grid