Oracle by Example brandingCreating an Orchestration for Adding Multiple Records to EnterpriseOne

section 0Before You Begin

This tutorial shows you how to create an orchestration that uses an array input to create multiple inventory items in EnterpriseOne.

Background

In the Orchestrator Studio, you can create an orchestration that uses an array input to pass repeating values to EnterpriseOne. Used in conjunction with the “Iterate Over” feature, you can configure the orchestration to repeatedly invoke a form request to pass a set of data in the array to create multiple records in EnterpriseOne.

What Do You Need?


section 1Using the Process Recorder to Create a Form Request

In this task, you will use the Process Recorder in EnterpriseOne to create a form request.

  1.  Access the EnterpriseOne web client.
    You can access the EnterpriseOne web client from the Tools page in the JD Edwards EnterpriseOne Orchestrator Studio.
  2. 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.
  3. In the Process Recorder, click the Start button.
  4. Using Fast Path or the Navigator menus, access the Item Master (P4101) application, version ZJDE0002.
  5. On Work With Item Master Browse, click Add.
  6. On Item Master Revisions, complete the following required fields:
    • Item Number = Enter a unique item.
    • Description =Enter a description.
    • Stocking Type = Enter a valid code.
      You may enter data in additional optional fields, which makes these fields available as additional inputs to the form request.
  7. Press OK.
    For version ZJDE0002, the Additional System Information screen displays. For this example, no data is required.
  8. Click OK to proceed.
  9. On Item/Branch Plant Info, enter a valid Branch/Plant.
  10. On Primary Location, no data is required. Click OK to proceed.
    The Item Master Revisions screen is displayed with the Previous Item Number.
  11. In the Process Recorder, click Stop.
  12. Complete these fields:
    • Name = Add Item.
    • Description = Add a new item.
    • Product Code = Select a customer product code, 55 – 59.
  13. Before clicking save, you can click any controls that contain values that you want the form request to return. For this example, click the Previous Item Number field, which the Process Recorder adds to the Return Controls box.
  14. Click Save.
    EnterpriseOne saves the recording as a service request UDO.
  15. Close the Process Recorder.

section 2Creating the Add Items Orchestration

Add the new form request to a new orchestration called “Add Items.”

  1. Access the Orchestrator Studio.
  2. Click the Orchestration icon and then on the Orchestrations page, click the New Orchestration button.
  3. On the Orchestration design page, complete these fields:
    • Orchestration = Add Items
    • Enter Short Description = Add multiple inventory items.
  4. Click the Product Code drop-down list and select a customer product code, 55 - 59.
  5. Change the Input Format to Generic.
    The generic JSON input format is simpler to produce, especially when an orchestration includes an array as an input, as in this example. Later in this exercise, you will use the JSON to test this orchestration in the Orchestrator Client.
  6. Add a step to the orchestration: click Add Step (+), select Service Request, and then click OK (+).
  7. At the end of the Service Request row, click the down arrow and select the new Add Item form request that you created in the previous task using the Process Recorder.
  8. Expand the Orchestration Inputs section located below the Orchestration Steps grid.
  9. In a row in that section, add an input called Item List and set the Type to Array.
    The Orchestrator Studio displays indented rows after the array, so you can define the inputs for the array.
  10. Add the following inputs for the Item List array:
    • Item
    • Description
    • Stocking Type
    • Branch
  11. If not already selected, select the Add Item step in the Orchestration Steps grid, and then in the Transformations area, select Item List from the Iterate Over drop-down list.
  12. In the Transformation grid, use the Available Values drop-down list to map the orchestration inputs to the form request (service request) inputs:
    Service Request Input Available Values
    Product No Item
    Description Description
    Stocking Type Stocking Type
    Branch/Plant Branch
  13. For the P4101_Version input, which is a variable to give the orchestration designer the option to pass in a specific version, enter ZJDE0002 in the Default Value column.
  14. Click Save.
    The orchestration should look like this:
    Add Items Orchestration
  15. Click the Orchestration Output button.
  16. Click Add All.
    This adds the Previous Item Number column, which was the last control selected when you recorded the form request in the Process Recorder.
  17. Change the Output column to Item Number.
    You have to enter a name for this column because this column is initially hidden in the form, so therefore no description is available.
  18. Click Close to return to the Orchestration design page.
  19. Click Save.

section 3Testing the Add Items Orchestration

  1. In the Orchestrator Studio, access the Tools page and then click the Orchestrator Client icon.
  2. Sign in to the Orchestrator Client with the same credentials used to access the Orchestrator Studio.
  3. Click XML Cache Refresh.
  4. In the Orchestrator Name drop-down list, select Add Items.
  5. Enter valid data for all of the inputs and click Run.
    This initial run will not add an item since the Add Item step is run only for rows inside an Item List array.
  6. Copy the JSON code in the Input section, select the JSON Input check box, and then paste the JSON in the box below.
  7. Wrap the message in an Item List array, as shown in the following example, which will add two items:
    {
     "Item List": 
      [
       {
        "Stocking Type" : "S",
        "Branch" : "30",
        "Description" : "test 1",
        "Item" : "Item 1"
       },
       {
        "Stocking Type" : "S",    
        "Branch" : "30",
        "Description" : "test 2",
        "Item" : "Item 2"
       }
      ]
    }
    
  8. Click Run.
    If successful, the Output section displays a green check mark and a response in JSON.
    Output Section

more informationWant to Learn More?