Example of using actions in workload package

Use this example to understand Insert work item and Update work item actions in the workload package.

Prerequisites

  1. Ensure that you have the queue Owner or Participant privileges to view the list of queues in the Workload package.
  2. For more prerequisites details, refer Using Insert work item action: Prerequisites and Using Update work item action : Prerequisites.

Let's consider you have an employee bonus EmpBonus queue with the following variables in a work item:
  • Employee ID empID
  • First Name first
  • Last Name last
  • Performance perf

Now, if you want to add a new work item in the EmpBonus queue, use the Insert work item action and then use Update work item action to update a work item.

Procedure

  1. Create the required variables such as empID, first, last, perf. For details, see Create a variable.
  2. Go to the Automation page, click the Create icon or click an existing Task Bot to open the editor screen.
  3. In the Actions palette, double-click or drag the Insert work item action from the Workload package.
    • Click Choose to select the EmpBonus queue name from the list of queues to insert as a work item.
    • Enter work item values in the work item fields.
  4. Click Save and run your automation.

    The Set input variables window opens.

  5. Select the empID, first, and last variables for which you want to supply a value and click Confirm.

    After the successful run of your automation, the work item is added to the EmpBonus queue.

    See the following video to understand how Insert work item action works:

  6. Double-click or drag the Update work item action from the Workload package.
  7. In the Queue name field, enter the EmpBonus queue name to update the work items.
  8. In the Work item ID field, enter the work item ID that you want to update.
  9. In the Work item values field, select the Record option, and click Get structure.

    Based on EmpBonus queue, the entire work item structure; key, type, and text-box for adding value is displayed.

  10. Click the Insert a value icon to select an existing record variable for each entry and click Insert.
    • first for First Name entry
    • last for Last Name entry
    • empID for Employee ID entry
    • perf for Performance Factor entry
  11. Click Save.

    When you run the automation, the Set input variables window opens.

  12. Enter the variable values that you want to update against the specified Work item ID.

    The EmpBonus queue is updated with the new variable values.

    See the following video to understand how Update work item action works: