DWP Catalog Timer - check anything in real time

Version 5
    Share This:

    There was a question from my colleague:  Re: Pause DWP Cat WF until task #2 is invoked

    I found it interesting so I dug deeper and found a nice way how to observe anything using the DWP Catalog workflow. I wrote "in real time" but actually it is an Interval checking (smallest one minute). But let's say it's like real time



    The idea behing is of course the timer. Screenshot of my workflow which I used to test it with short description is here:


    My Use Case was pretty easy and should only prove the concept / solution:

    • Create Remedy Work Order With Identifier
      • Here I just create a WorkOrder in ITSM
    • Receive Task
      • There is no need to use Receive Task anymore from version 19.02 upwards. At least not for DWPC Request Status update. This is done already automatically. Of course if you need to update e.g. the Status Reason with each Status Change, you need it again
      • In my case I need this element to use the timer
    • Bottom Exclusive Gateway
      • I set the Exclusive Gateway behind the Receive Task to observe / continue to end if Work Status = Completed (which will be also OOTB behavior)
    • Timer
      • This is the important Element. A timer starts at defined Time or regularly according the Interval set (minimum is 1 Minute).
      • The documentation describes you can use it to e.g. Send Notification but why not to do whatever we want ?
      • The timer will run until the Receive Task doesn't finish the Ticket = in this case - The Ticket Status Changes to Completed.
    • Get Entry By Query
      • So each Minute the timer starts his arrow and does the Get Entry by Query.
      • In my case I get the content of the Work Order I created.
    • Upper Exclusive Gateway
      • I ask if the Status value of the Work Order which I just ask is "In Progress"
      • If No - Return to Receive Task and wait another minute
    • Build Input Set / Set Entry
      • This is already the main Workflow , the work I want to do (whatever it is)


    IMPORTANT NOTE: As the test shown there are two behaviors of this solution:

    1) If you connect the last Set Entry output to the End element, the Timer workflow will not fire again and the timer is actually stopped.

    2) If you connect the last Set Entry output back to the Receive Task, the timer will be triggered again and again until the Receive Task doesn't get the status update and finishes the workflow.



    Any notes are welcome.