Oracle by Example brandingCreating a Table from a Data Set in a Notification Message

section 0Before You Begin

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

In this OBE, you will:

  1. Create an orchestration that processes a form request to get the list of current users and their orders waiting to be approved, as well as a count of them.
  2. Create a notification (run as a subscriber) that calls the orchestration. This notification will include a data table that displays the list of orders awaiting approval from the orchestration, and it will also include 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 1Creating the Orchestration

In this section, you will create a form request using Process Recorder to get a list of orders that are waiting for approval. You will then create an orchestration using this form request and add a logic extension to get the count of the number of records waiting for approval.

Recording the Form Request Using Process Recorder

  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: This form request gets the list of current users and their orders waiting to be approved.
    • Product Code: 55
  11. Click Save.
  12. Click Close to close the Process Recorder window.

Creating 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.

Adding a 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. Logic Extension - 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 2Creating the Notification

In this section, you will understand how to create a rule to check if there are orders awaiting approval and how to design a notification that includes a table with the records that are awaiting approvals. The notification message also includes a link to the Work With Orders Awaiting Approval (P43081) application, enabling you to directly access the application from the notification message. 

Creating the Rule

  1. Log in to Orchestrator Studio.
  2. Click Rules.
  3. Click New and select Standard.
  4. Complete these fields:
    • Name: Countgreaterthanzero
    • Description: Check if the number of orders waiting for approval is greater than zero.
  5. From the Match Type drop-down list, select Match All.
  6. From the Rule Type drop-down list, select Numeric.
  7. In the Value 1 field, enter input.
  8. From the Operator drop-down list, select >.
  9. Enable the Literal option.
  10. In the Value 2 field, enter 0.
  11. From the Literal Value Type drop-down list, select Numeric.
  12. Click Save.
  13. Rule
  14. Click Close.

Creating the Notification

  1. Log in to Orchestrator Studio.
  2. Click Notifications.
  3. Click New.
  4. Complete these fields:
    • Name: Orders Awaiting Approval
    • Description: This notification sends a message along with the list of orders that are waiting for approval.
  5. From the Type drop-down list, select Orchestration.
  6. Enable the Run As Subscriber option.
  7. Click the arrow to the left of Orchestration to expand the Orchestration section.
  8. Click Select Orchestration, and then search for and select the Orders Awaiting Approval orchestration.
  9. Orchestration Section
  10. Click the arrow to the left of Rule to expand the Rule section.
  11. Click Select Rule, and then search for and select the CountGreaterthanZero rule.
  12. In the Rule Input section, from the Mapped From drop-down list, select CountAwaitingApprovals.
  13. Rule Input Field
  14. Click Save.
  15. Click the arrow to the left of Message to expand the Message section.
  16. From the Output drop-down list, select CountAwaitingApprovals. Leave the default value of Watchlist in the Output Type field.
  17. Message Output Field
  18. Click the arrow to the left of Actions to expand the Actions section.
  19. 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.
    Application Links Section
  20. Click Save.
    The system creates an application link ID in the Placeholder drop-down list in the Body section enabling you to add it as a placeholder in your notification message.
  21. Next to Data Tables - 0, Click Add.
  22. In the Add Data Table window, verify that the Include Header Row option is selected, and click Add.
  23. Add Data Table
  24. From the Data Set Name drop-down list, select Orders Awaiting Approval_1 and click Apply.
  25. Click Edit. The system displays the Edit Data Table window with a table template. The table template is pre-populated with all the known fields from the array in the orchestration output.
    Note: If the orchestration output changes and a new field is added to the output array, you can add another column to the table and use the Placeholder drop-down list to insert the newly available field into the table.
    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.

    For this OBE, we will not make any changes to the table.
  26. Edit Data Table Window
  27. Click OK.
    The system creates a table link ID in the Placeholder drop-down list in the Body section enabling you to add it as a placeholder in your notification message.
  28. Go back to the Message section.
  29. In the Subject field, enter ${CountAwaitingApprovals} Orders Awaiting Your Approval.
  30. 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:
  31. Press Enter to place the cursor in a new line.
  32. 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.
  33. In a new line, enter Click this link to approve or reject the orders: 
  34. 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.
  35. Verify that your message looks like the following screenshot:
  36. Message

Note: You can create orchestration and notification messages that include formatted text, tables, images, and links that are interspersed with the text. For more information, see Understanding Rich Formatting of Messages.

Adding a Subscription to the Notification

  1. If you are still on the Notifications page, click the Tools menu and select My Subscriptions.
    You can also click the drop-down list next to your user name in the upper-right area of the EnterpriseOne Home page, select Manage Notifications, My Subscriptions.
  2. Click Add Subscription.
  3. Select the notification name that you used to create the notification in Orchestrator Studio:
    Orders Awaiting Approval
    Note: If your notification name does not appear in the list, you might have to sign out of EnterpriseOne and sign back in.
  4. You can accept all the default values and click Save.
  5. Click Close.



section 3Testing the Notification

  1. Access the Orders Awaiting Approval notification.
  2. Click Test.
  3. Enable the Dispatch Notifications option.
  4. Click Execute.
  5. Verify that you get a success message.
  6. Success Message
  7. 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.
  8. Click the Notification List (Bell) icon. Click the new notification. If you do not see a new notification, click Refresh at the bottom left of the Notification List window.
  9. Notifications
  10. Verify that the notification message contains a table with the list of order numbers that are awaiting approval. The message also contains a link to the Work With Orders Awaiting Approval application.
  11. Notification Message

more informationWant to Learn More?