Question

Photo of Bronson Witting

1

Delay Workflow for a Time Period / Until Date

I've been working the (awesome!) Workflow decumentation and setting up Rock workflows based on workflows that currently happen in our organization.  I'm trying to figure out if I can delay an action for a set amount of time or until a certain date with the way workflows are currently setup.  (For example: wait for 1 week after a workflow is triggered, and then send an additional follow-up email).  

Here's what I've got so far: I'm trying to make a workflow activate another workflow.  In the second workflow, I set the Processing Interval to 86400 (1 day), and I want to set a Date attribute to the date the workflow was started.  I'm not seeing a way to set the default date value to the current date (I think I can do it with Liquid: {{ 'now' | date: "%D" }}, but the default field won't take that).  Then, want to create a filter on my action that will run if the date is 1 week past the start date value.  I don't think I can compare dates with the filter, but I'm trying to accomplish that with Liquid ({{now | date: "%s" | plus : 604800 | date: "%D" }}.  But it seems like the filter fields don't work with Liquid.

Am I on the right track? Is there a different way to accomplish this? Or should I add a feature request?  Thanks! 

  • Photo of Rock RMS

    2

    What you're describing sounds like it would be useful. I think the best couse of action would be for us to create a 'Delay Action' that would wait on a provided interval (defined in terms of days, hours or minutes). We could probably get that done in the next couple of weeks.

    In terms of using Liquid... the actions that you're probably using don't support liquid in their inputs. Also, your Liquid syntax is technically correct for Ruby based Liquid but we're using a .net variant which is a bit different especially when dealing with dates. We're working on some really cool documentation for Liquid which should be ready by next week sometime. We've actually added some extensions to Liquid that add power. I think you'll like the docs as they give you a bunch of cool tricks.

    Are you coming the the CITRT meeting in October? If so I'm wondering if we could not use your 'Delay Action' as a example for a class David Turner is doing on writing custom workflow actions. 

    • Bronson Witting

      Ok, great - you creating that 'Delay Action' makes sense. And I'm looking forward to the Liquid documentation. (And as an aside, I know writing docs can be boring, but your documentation has been great, and I really appreciate the time you guys spend on it)


      Yes, I'll be at CITRT with a few guys from my team. You are more than welcome to use the Delay Action stuff as an example, and I'm hoping to have some more experience in workflows (and other aspects of Rock) by then so I can contribute to the discussion.


      Thanks!