Use Case: Building a Workflow in ThingWorx Workflow Builder
Complete the following steps to build a workflow in ThingWorx Workflow Manager using the MRI demonstration data that you have installed.
  1. From the ThingWorx Utilities Console, click the Workflow Builder tile.
  2. Drag two Service Task activities and one Receive Task activity onto the canvas and place them between the Start and End nodes.
  3. Rename the activities as follows:
    • Service task 1— Locate Distributor
    • Service task 2— Order Request
    • Receive task— Confirm Helium Level
  4. Connect the activities as shown below.
    Image
  5. Click on the Start node and enter the following in the Description field on the Information tab: Verify helium levels on MRI machines.
  6. Click the Events tab on for the Start node. Locate PTC.Demo.Assets.MRIMachineTemplate in the Select an item menu and select it.
  7. Click the arrow next to Alert to move it from the Available Events panel to the Selected Events panel.
  8. In the Selected Events panel, set the Property and Alert fields.
    • PropertyHeliumLevel
    • AlertLow
  9. Click on the Locate Distributor node and select the Services tab. Filter the list of available items with services by typing Dist in the Select an item menu and select DistributorNotifier.
  10. On the Available Services panel, use the Search Services box to narrow the list of services by typing locate. Click the arrow next to Distributor_Locate_Nearest to move it from the Available Services panel to the Selected Services panel.
  11. In the Selected Services panel, set the input and output parameters.
    • Asset (Input Parameter)— Select initiator
    • result (Output Parameter)—Enter Distributor in the search field and press Enter.
  12. Click on the Order Request node and select the Services tab. Filter the list of available items with services by typing Dist in the Select an item menu and select DistributorNotifier. From the list of available services, On the Available Services panel, use the Search Services box to narrow the list of services by typing locate. Click the arrow next to Email_Order_Request to move it from the Available Services panel to the Selected Services panel.
  13. In the Selected Services panel, set the input the parameters.
    • MRIMachine— Select initiator
    • Distributor— Select Distributor
  14. Click on the Confirm Helium Level node and select the Events tab. Locate PTC.Demo.Assets.MRIMachineTemplate in the Select an item menu and select it.
  15. Click the arrow next to Alert to move it from the Available Events panel to the Selected Events panel.
  16. In the Selected Events panel, set the Property and Alert fields.
    • PropertyHeliumLevel
    • AlertFull
  17. Click Validate on the toolbar above the canvas. A message appears notifying you that the workflow was successfully validated.
  18. Click Save. Enter Replenish Helium in the Workflow Name field and select the Activate Now checkbox. Click Save.
     Note
    The Description field is optional.