AnsweredAssumed Answered

How to triggers an Object (WF) based on results of SQL Query

Question asked by JohnO'Mullane on Mar 21, 2018
Latest reply on Mar 22, 2018 by JohnO'Mullane
Hi all,
I currently have a simple Workflow (WF1) with 2 Jobs.

Job 1 a SQL Job that returns a "TRUE" or "FALSE" value from a table.
I then use PREP_PROCESS_REPORT in my Post Process to populate a Variable with the result  of my Job. (:PSET &DATA_FOUND# = 'TRUE" or "FALSE")

Job 2 checks &DATA_FOUND#. If = "FALSE" and it's before a certain time (X), I need to re-check in (Y) minutes. I do this by using the WAIT command and then using UC_ACTIVE_OBJECT, kicking off my parent Workflow (WF1) again.

If "TRUE"  or after time (X) I proceed by calling a different Workflow (WF2).

As I hope you can see, this results in many of my parent WF running at a given time.

This has worked fine up to now but a recent restriction put in place to prevent infinite loops means I can no longer loop more that 8 times.

I know there is a File Event that could easily trigger my WF2 when a file arrives in a file location, but I don't think there is something similar for data changing within a DB table.

I'm sure there is a simpler solution out there that will allow me to trigger a Workflow when data arrives in my table, but I can't think of it.