locked
Change delay amount while workflow is running (snooze button) RRS feed

  • Question

  • Is there a way to change a delay or reschedule a delay on the fly?  For example if a notification is sent after a period of time I would like to give the person notified the ability to put it off for a short period of time to address it before it gets escalated to their supervisor.  Basically hit the snooze button.  Is this possible?

    Thanks,

    John

    Tuesday, February 22, 2011 8:34 PM

Answers

  • Elaborating on Alan's suggestion:

     

    Variable delay_in_min (assign default to be 24 * 60)

    Variable snoozed (assign default to be true)

    While snoozed == true

    {

    Pick

    {

    PickBranch1: Delay (delay_in_min)

    {

      Assign snoozed = false

    }

    PickBranch2: Receive (regular_response)

    {

      Assign snoozed = false

    }

    PickBranch3: Receive (snooze_response)

    {

      Assign delay_in_min = 60

      Assign snoozed = true
    }

    }
    }

    • Proposed as answer by Tim Lovell-Smith Wednesday, February 23, 2011 9:04 PM
    • Marked as answer by John Hennesey Wednesday, February 23, 2011 9:42 PM
    Wednesday, February 23, 2011 5:07 PM

All replies

  • Hi,

    I would look at implementing this using a While and a Pick activity. If the person sends a "Snooze" message, the workflow will execute the delay, and then loop round again.

    Regards,

    Alan


    http://www.CloudCasts.net - Community Webcasts Powered by Azure
    Wednesday, February 23, 2011 7:47 AM
  • Thank you for the idea.  Lets say the normal delay is 24 hours to respond to an event, and 10 minutes before they have to respond they want to buy an additional hour - the snooze part.  is it possible to change the delay to 1 hour then send it back through the loop again?  I apologize if this doesn't make sense - I'm new to workflow.

    thanks,

    John

    Wednesday, February 23, 2011 1:45 PM
  • Elaborating on Alan's suggestion:

     

    Variable delay_in_min (assign default to be 24 * 60)

    Variable snoozed (assign default to be true)

    While snoozed == true

    {

    Pick

    {

    PickBranch1: Delay (delay_in_min)

    {

      Assign snoozed = false

    }

    PickBranch2: Receive (regular_response)

    {

      Assign snoozed = false

    }

    PickBranch3: Receive (snooze_response)

    {

      Assign delay_in_min = 60

      Assign snoozed = true
    }

    }
    }

    • Proposed as answer by Tim Lovell-Smith Wednesday, February 23, 2011 9:04 PM
    • Marked as answer by John Hennesey Wednesday, February 23, 2011 9:42 PM
    Wednesday, February 23, 2011 5:07 PM
  • Thanks guys!
    Wednesday, February 23, 2011 9:42 PM