Oracle by Example brandingCreating an Orchestration to Enter Sales Orders in EnterpriseOne

section 0Before 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 Orchestrator Studio and permissions to create orchestration and service request components, which are managed as user defined objects (UDO) in EnterpriseOne. See “Managing Orchestrator Studio Security” in the JD Edwards EnterpriseOne Tools Orchestrator Studio Guide.
  • Access to the Process Recorder in EnterpriseOne, which is enabled through UDO feature security.

section 1Using the Process Recorder to Create a Form Request for Entering a Sales Order

  1. Sign in to the JD Edwards EnterpriseOne Orchestrator Studio.
  2. 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.
  3. In EnterpriseOne, using Fast Path or the Navigator menus, access the Sales Order Detail (P4210) application.
  4. 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.
  5. In the Process Recorder, click the Start button.
  6. In Customer Service Inquiry, click Add.
  7. In Sales Order Detail Revisions, complete the following fields in the header area:
    Branch/Plant = 30
    Sold To = 4242
  8. In the first row of the grid, complete the following fields:
    Quantity Ordered = 1
    Item Number = 220
  9. Click OK to save the order.
  10. In the Process Recorder, click Return Values.
  11. 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.
  12. In the Process Recorder, click Resume and then click Stop.
  13. 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.
    Process Recorder
  14. Click Save.
    EnterpriseOne saves the recording as a Form Request UDO.
  15. Close the Process Recorder.

section 2Creating the Enter Sales Orders Orchestration

  1. 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.
  2. On the Orchestrator Studio Home page, click the Orchestrations icon.
  3.  On the Orchestrations side panel, click New.
  4.  On the Orchestration design page, complete the following fields:
    Orchestration = Enter Sales Orders
    Description = Enter sales orders.
    Product Code = 55
  5. In the orchestration canvas area, click the plus sign (+) in between the Start and End nodes.
  6. 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.
  7. Click the Form Request icon in the orchestration flow and then click the Transformations icon.
  8. 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.
  9.  Click the Start icon in the orchestration flow and then click Inputs and Values icon.
  10. 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.
  11. In the Orchestration Inputs tab, click the triangle next to GridData to expand the list of inputs.
    Inputs and Values
  12. For the Quantity Ordered and Item Number GridData, change the Value Type option from “String” to “Numeric.”
  13. Click the Form Request icon in the orchestration flow and then click the Transformations icon.
  14. 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.
  15. Click the End icon in the orchestration flow and then click the Orchestration Outputs icon.
  16. 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.
  17. In the Output column, change the following values:
    Previous Order = Order Number
    Previous Order Type = Document Type
  18. In the Value Type column, change the value for Order Number from “String” to “Numeric.”
    The Orchestration Outputs dialog box should look like this:
    Orchestration Output
  19. On the Orchestration design page, click Save to save the orchestration.

section 3Testing the Enter Sales Order Orchestration

  1. On the Orchestration design page, click the Start icon in the orchestration flow and then click the Run Orchestration icon.
  2. On the Run Orchestrations page, click the Refresh Cache button.
  3. In the input fields on the left, enter the following:
    Business Unit
    = 30
    Long Address Number = 4242
    Quantity Ordered = 20
    Item Number = 220
  4. 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.
    Run Orchestration
  5. Sign in to the EnterpriseOne application.
  6. 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.
  7. 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.
  8. 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.
    Array
  9. Click Run.
    Run Orchestrations
    In the EnterpriseOne application, access the sales order and confirm it has the sales order with three items you just created.
    EnterpriseOne Sales Order

more informationWant to Learn More?