I would like to know the best method to go about implementing a Test activity to 4 of my technical workflows.
I currently have 4 different workflows (one for each Newsletter subscription type, health, pets, etc) When they run I sometimes get deadlocks and my workflow fails. I figured if I put a 'Test' activity right after my scheduler to check if any of the other 3 workflows are currently running to try again later would help solve this issue?
is there a way about implementing this? How would l be able to add some sort of variable that can communicate between my technical workflows that it is currently running? I hope I was able to communicate my thought processes clearly?
Can you please explain if your workflows have got any dependency on each other?
If not then
Let me know if this helps or if you can elaborate it more for us to understand your problem better.
In addition of kapscool advice, you can also consider the usual way, well, it is called the semaphores method in IT area (not restricted to AC).
(The same idea is to use an instance variable saved to true at end of worfklow and initially set to false, and test it at the early beginning of the wkf to see if the wkf is running... but last execution datetime is more powerful, see below).
The same method can be used for several workflows: so in your case you would have 4 xtk:options records, with testing 4 values at each wkf start, and setting the getDate() value at the very end of wkfs.
But this last execution date is also useful to take into considerations only date from the last execution date, in order to not treat records already processed.
Try to use
task.wait function before starting your next technical workflow with checking the status of next workflow using queryDef . I
f status is Inprogress then move otherwise alert Error !
vars.recCount > 0
How would I check to see if there is a record or not using the test activity? I like this idea as I was thinking to myself, not every cycle will have a result. so if there are no results this time 'end' query. but when I select conditions under the test activity not sure what field to use?