Oracle by Example brandingCreating a Table from a Data Set in an Orchestration Message

section 0Before You Begin

This 40-minute OBE (Oracle By Example) shows you how to create an orchestration that sends a message with a list of orders awaiting approval from the Work With Orders Awaiting Approval (P43081) application.

In this OBE, you will create an orchestration with:

  1. A form request to get the list of current users and their orders waiting to be approved.
  2. A logic extension to get the count of orders that are waiting to be approved.
  3. A message with a data table that displays the list of orders awaiting approval and a link to the Work With Orders Awaiting Approval (P43081) application.

Note: The tasks in this OBE rely on having specific data in the Work With Orders Awaiting Approval (P43081) application for the Address Book Number 533095. You can use the data available in your system.

Background

Because of its powerful abilities to collect data, evaluate data, and send messages, Orchestrator can function as an effective Notify and Alert mechanism, giving users an automated way to keep track of important events and conditions and to take action quickly. Many usage patterns call for the Orchestrator to collect not just a single piece of data but rather a set of data, for example, a list of purchase orders to be approved, and to present that list in tabular form in a message to an approver.
This new feature enhances Orchestrator messages and notifications with the ability to pass in a data set (array) and format that data as a table in the message.

What Do You Need?

  • JD Edwards EnterpriseOne test environment with a minimum of EnterpriseOne Tools 9.2.8.3.
  • Access to Process Recorder, which is enabled through user-defined object (UDO) Feature Security and Action Security.

    Important: The orchestration uses the "User's Address Book Number" to find the orders that are awaiting approval. So, you have to change your address number in your EnterpriseOne profile (User Profile Revisions form) to 533095 to see the orders for that address book number.

section 1Recording the Form Request Using Process Recorder

In this section, you will create a form request using Process Recorder to get a list of orders that are waiting for approval. 

  1. Sign in to the JD Edwards EnterpriseOne application.
    You can access the JD Edwards EnterpriseOne application from the Orchestrator Studio home page or from the Tools drop-down menu on any of the pages.
  2. On the EnterpriseOne page, click the drop-down list next to your user name and select Record a Process.
  3. In the Process Recorder window, click the Start button.
  4. Access the Work With Orders Awaiting Approval (P43081) application from the Fast Path or open the application from the Navigator menu.
  5. In the Approver field, enter 533095.
  6. Click Find.
  7. In the Process Recorder window, click Return Values.
  8. In the grid, click in the Order Number, Or Ty, and Days Old fields.
    Note: Make sure to click the header rows of the grid and not the grid records.
  9. Click Resume in the Process Recorder window.
  10. Click Stop in the Process Recorder window and complete these fields: 
    • Name: Orders Awaiting Approval
    • Description: List the number of users and their orders waiting to be approved.
    • Product Code: 55
  11. Click Save.
  12. Click Close to close the Process Recorder window.

section 2Creating the Orchestration Using the Form Request

  1. Log in to Orchestrator Studio.
  2. Click Form Requests.
  3. Select the Orders Awaiting Approval form request in the left panel.
  4. In the Default Value field, delete the default value.
  5. Form Request Window
  6. In the Available Actions section, expand Work With Orders Awaiting Approval - Grid.
  7. Enable the Return option for Include Count.
  8. Enable Include Count
  9. Similarly, to include more values, scroll down and enable the Return option for Order Amount, Order Date, and Supplier Name.
  10. In the Variable field of Change the variable for Work With Orders Awaiting Approval - Grid, change the value from GridOut_1_1 to Orders Awaiting Approval_1.
  11. Click Save.
  12. From the Manage menu, select Create Orchestration.
    The system creates an orchestration with inputs, transformations, and outputs to call the form service request. Verify the orchestration.
  13. Orders Awaiting Approval Orchestration
  14. Click Save.
  15. Click the Orders Awaiting Approval form request and select Transformations.
  16. From the Available Values drop-down list, for Approver_Number, select User's Address Book Number.
  17. For the P43081_Version input, blank out the value P43081_Version from the Available Values field.
  18.  
    Form Request - Transformations
  19. Click the Start icon, and click Inputs and Values. Enter the default value for Approver_Number as 533095.
  20. Click Save.

section 3Adding the Logic Extension

In this section, you will understand how to add a Logic Extension to retrieve the count of orders that are waiting for approval.

  1. On the Orders Awaiting Approval orchestration window, click Design Mode.
    Note:
    You can also double click the arrow line between the form request and End icon to add a new step.
  2. Click the Add (+) icon between the form request and End icon.
  3. Add icon
  4. In the New Step Type window, select Logic Extension.
  5. New Step Type Window
  6. Click New. The system displays the Data Structure tab of the logic extension window.
  7. Complete the following fields:
    • Name: Awaiting Orders Count
    • Description: This logic extension gets the count of orders that are waiting for approval.
    • Logic Extension Window
  8. In the Data Structure tab, click the + Data Dictionary button.
  9. In the Data Dictionary window, in the Alias field, enter MATH01, and then click the + icon.
    The system adds the data dictionary MATH01 to the Data Dictionary window.
  10. Data Dictionary Window
  11. Change the value in the Name field from MathNumeric01 to CountAwaitingApprovals.
  12. From the IO Type drop-down list, select Both.
  13. Click Save.
  14. Logic Extension
  15. Click Close.
  16. Click Exit Design Mode.
  17. Verify the orchestration and click Save.
  18. Orders Awaiting Approval Orchestration
  19. Click the newly added logic extension step, and select Transformations.
  20. From the Available Values drop-down list, select W3081A_count for CountAwaitingApprovals input.
  21. Form Request - Transformations
  22. Click Save.
  23. Click the End icon. The Outputs and Assertions window is displayed.
  24. Verify that the Return All Grid Rows option is enabled and the Select option is enabled for these fields.
  25. Output and Assertions Window
  26. Enable the Select option for the CountAwaitingApprovals field.
  27. Outputs and Assertions Window
  28. Click Save.

section 4Adding the Message Request

In this section, you will understand how to add a message request and add a data table to list the number of orders waiting for approval.

  1. On the Orders Awaiting Approval orchestration window, click Design Mode.
  2. Click the Add (+) icon between the logic extension and End icon.
  3. In the New Step window, click Message.
  4. Click New.
  5. In the Name field, enter Awaiting Orders Message.
  6. In the Description field, enter This message lists the number of orders that are waiting for approval.
  7. From the To drop-down list, select Address Book.
  8. In the Address Book field, enter ${usersAB}.
  9. In the Subject field, enter ${CountAwaitingApprovals} Orders Awaiting Your Approval.
  10. Click the arrow to the left of Links to expand the Links section.
  11. Next to Application Links - 0, click Add, and complete these fields:
    1. In the Application link ID field, enter P43081, and click Apply.
    2. In the Applications field, enter P43081 and press Tab. You can click the Search icon and then search for and select this application.
    3. From the Form drop-down list, select W43081A - Work With Orders Awaiting Approval.
    4. By default, the value for Version field is set as ZJDE0001. You can use the default value to add the application link.
    5. By default, the value for Link Text is set as Work With Orders Awaiting Approval. You can use the default value to add the application link.
  12. Next to the Data Tables section, click Add.
  13. In the Add Data Table window, verify that the Include Header Row option is selected, and click Add.
    Add Data Table
  14. In the Data Set Name field, enter Orders Awaiting Approval_1 and click Apply.
    Note:
    The value you enter in the Data Set Name field must match the data set name in the orchestration step that is the source of the data. For example, the value in the Data Set Name field must be the same as the data set name defined in the data request, form request, or connector output. If there is no matching data set from a previous step, you will not be able to map the individual fields for the table in the transformation for the message step.
  15. Click Edit. The system displays the Edit Data Table window with a table template. 
  16. Change the header values to Order Number, Order Type, and Days Old.
  17. Change the variables to ${order number},${or ty}, and ${days old}.
  18. You can click the table and select the options, such as Column, Merge Cells, and so on, to change the table properties. You can also use the Font Color, Font Size, Paragraph, Bold, Italics, Underline, Strikethrough, Bulleted and Numbered List options from the toolbar to format your text in the table. You can also add more columns
    For this example, let us add a new column to the table.

    Place the cursor on the last column, click Column, and click Insert Column Right. The system inserts a new column to the right.
  19. Orchestration Message - Edit Data Table
  20. Change the header value and the variable in the new column to Order Amount and ${order amount}.
  21. Edit Data Table Window
  22. Click OK.
  23. Go back to the Message section.
  24. Place the cursor in the Body field of the Message section, and enter:
    Hello,
    Here is the list of orders that are waiting for your approval:
  25. Press Enter to place the cursor in a new line.
  26. From the Placeholder drop-down list, select {Orders Awaiting Approval_1.Table}.
    The system adds a link to the table defined in the Data Tables section.
  27. In a new line, enter Click this link to approve or reject the orders: 
  28. Make sure to verify that the cursor is at the end of the above line and then, from the Placeholder drop-down list, select {P43081.Link}. The system adds a link to the application defined in the Application Links section.
  29. Verify that your message looks like the following screenshot:
  30. Orchestration Message
  31. Click Save.
  32. Click Close.
  33. In the Orchestration diagram, click the newly created message step and click Transformations.
  34. Map the inputs to the available values as shown in the following table:

    Input
    Available Values
    CountAwaitingApprovals CountAwaitingApprovals
    Orders Awaiting Approval_1.order number Order_Number
    Orders Awaiting Approval_1.or ty Or_Ty
    Orders Awaiting Approval_1.days old Days_Old
    Orders Awaiting Approval_1.order amount Order Amount
    usersAB User's Address Book Number
  35. Message Transformations
  36. Click Save.

section 5Testing the Orchestration

  1. In the Orders Awaiting Approval orchestration, click Start, and select Run Orchestration.
    You can also double click the Start icon to open the Run Orchestrations window.
  2. Click Run.
  3. Verify that your orchestration is successful.
  4. Run Orchestrations
  5. To view the message, access the JD Edwards EnterpriseOne application.
    You can access the JD Edwards EnterpriseOne application from the Orchestrator Studio home page or from the Tools drop-down menu on any of the pages.
  6. From the drop-down list under your user name in the top right corner, under Manage Notifications, select Message Center.
  7. In Message Center, click the Work Center tab. Your Personal In Basket will display a new message: “3 Orders Awaiting Your Approval.”
    Note: If your system is configured with an email server, and if your Address Book number is configured to have messages sent to that email server, you will see this message in your email client instead of in Work Center.
  8. Click the message to view it. Verify that the message looks like the following screenshot:
  9. Message Center

more informationWant to Learn More?