You are viewing limited content. For full access, please sign in.

Question

Question

Checking if a workflow has already run

asked on July 12, 2016

Currently, it appears we can only have a workflow run if a scheduled time has passed, or a specific condition has been reached with respect to an entry.  Does anyone know of a way to say, "If this condition has already been met today, and this workflow has already run once, don't run this workflow again"?  I was setting up a workflow to check and see if a folder had been created on a given day (and notify me when it appears), but I didn't want this workflow to run every hour if the folder had already been created (and keep getting these same notifications).

Please let me know if you have any thoughts on how to accomplish this, or if I'm thinking about this completely wrong, and there's another way to look at taking care of this - thanks!

Marty Gaffney - Network Technician

Town of Okotoks

0 0

Answer

SELECTED ANSWER
replied on July 12, 2016

Marty,

If the folder is in a specific directory or group of folders, you could have that BE the initiating condition for the workflow.  In other words, if you are running a workflow to check if a folder was created in a certain directory, maybe even with a certain name, it would run every hour to check.  BUT...if you made the workflow condition to be enacted when a new folder is created in a specific directory or subfolder group, by using the greater than or less than folder path, it would never run UNLESS that new folder was created.  Something like this:

0 0

Replies

replied on July 12, 2016 Show version history

I don't believe you currently can.  However, when your workflow runs every hour can you just do a Search and then a Routing Decision?  Check to see if the folder is there.  If not, run the branch that sends a notification.  If the folder is there, do nothing in the branch or End Workflow.  The workflow would still run every hour but only notify if the folder is not there.

0 0
replied on July 12, 2016

I wanted to have the notification happen when that new folder showed up, but once I received notification once for that day, not get notified every hour past that - I'm starting to think I might be thinking about this wrong... indecision

0 0
replied on July 12, 2016 Show version history

No, that is about right.  It depends if the folder in question is created by a workflow too.  If the folder is created via a workflow then you can put your notification in that workflow and be done.  

However, if the folder is just created by a person at some point during the day, then you would need just a simple check workflow.  Does the folder have metadata?  You could put a 'notify' field on the template or as a separate field or something.  Then when you find the folder, check to see if the Notify is Yes or No.  If Yes, get the email and then switch the Notify to No.  If No, do nothing.

Not sure if that is fits or not.  You could also tag it with an info tag when you find it the first time.  Then your routing decision becomes a tag check or not.

1 0
replied on July 12, 2016

Then it would run and email you....otherwise it would never run.  That way if you don't get the email, you know it wasn't created.  You could also specify a name as the "Entry Name = " and then have everyone follow the naming convention so you wouldn't have to worry about other folders being created in that path and kicking off the workflow as well.

0 0
replied on July 12, 2016

I think that might work - hadn't thought of doing it that way.  Have the workflow kick in whenever a new folder is created in that directory.  (And actually tagging the located folder would probably work too, that would be one way to flag it as well.)

I'll play with it and let you know how I make out!

Marty

0 0
replied on July 13, 2016

Yep, that worked - I have the workflow now running only when a new folder is created, so it now only runs when the condition is met, not on an hourly schedule.

Thanks much!

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.