Restart a Process after it is Closed?

This may seem a little odd... 

I have a number of processes that need to be restarted when the logic in the workflow results in the process ending.

Does anyone know of a way this could be set up in Process Manager?  I'm sure this could be done with some simple internal coding, but we're in the On-Demand environment and we don't have or want any custom coding!  

I'm currently sending a message sent that says "Restart the Process" with a link to the record.  A simple "Edit/Save" without making any change will start it again.

Parents
  • Hi Bud Hartley,

    Automations in Sugar all trigger each other by design. For this reason, making loops on accident is definitely a risk.

    What you are describing here is intentionally making a loop, having one process trigger another process that then re-triggers the first process.

    Process author allows for looping within the process itself. I recommend putting a loop within the process instead of making a loop with multiple automations. Still, what you ask can certainly be done.

    Consider the following example of two processes that are designed to re-trigger Process 1:

    Process 1

    Start Event: Fires for All Updates and criteria: <your original criteria> AND "triggerProcessOne_c" equals "Yes".

    Events and other Elements that do what you want.

    Action to Update Fields: Set "triggerProcessOne_c" = "No" AND "triggerProcessTwo_c" = "Yes"

    End Event

     

    Process 2

    Start Event: Fires for All Updates and criteria: "triggerProcessTwo_c" equals "Yes".

    Wait Event*

    Action to Update Fields: Set "triggerProcessTwo_c" = "No" AND "triggerProcessOne_c" = "Yes"

    End Event

    I strongly recommend the Wait Event because if you do not wait, you could create an infinite loop that will crash your instance and cause unwanted stress for the host server.

     

    In this example, when Process 2 sets "triggerProcessOne_c" = "Yes", this will trigger Process 1.

  • SUCCESS!

    I created a simple process (start if the "Restart?" field = "yes" - Wait 10 minutes - Change the "Restart?" field to "no" - Terminate the process).

    In the original process, I added a step to change the "Restart?" field to "yes" before it was terminated.  (I'm still sending the alert to myself for now so I may monitor the activity).

    I'll test the possible "loop back to the beginning" this week to see if it works.

    Thanks again Patrick!

    Bud Hartley | Cape Foulwind, NZ (and Oregon, USA)

Reply
  • SUCCESS!

    I created a simple process (start if the "Restart?" field = "yes" - Wait 10 minutes - Change the "Restart?" field to "no" - Terminate the process).

    In the original process, I added a step to change the "Restart?" field to "yes" before it was terminated.  (I'm still sending the alert to myself for now so I may monitor the activity).

    I'll test the possible "loop back to the beginning" this week to see if it works.

    Thanks again Patrick!

    Bud Hartley | Cape Foulwind, NZ (and Oregon, USA)

Children
No Data