How do you get "restart" on a custom Playbook action to restart the flow attached to the activity?

Matt Jones3
Tera Expert

I'm trying to figure out this whole playbooks thing, and create some custom Activities to use in a Playbook.

 

I've got the basics down.  Created a sub-flow that the activity calls.  Created the activity (modeled after "Instruction" OOTB activity).  Figured out how to adjust the flow so that Mark Complete triggers the action I want, and Skip skips it.  That's all working.

 

What I can't figure out how to do is get the Restart button to actually restart the Flow.  Currently it puts the Activity state back to In Progress, but when you Mark Complete the activity on the playbook, the flow isn't triggered.

 

I can see that this works with some OOTB activities like Update Record.  If I have an Update Record activity in my playbook, and it's complete, I can restart that activity and Mark Complete again, and the record is updated with the new values.  I'd like to do something similar in my custom activity, though instead of updating a record I want to call a REST service.  If the activity is initially skipped, or something went wrong, I'd like the end-users to have the ability to restart the Activity and complete it again.

1 ACCEPTED SOLUTION

Yes, you need to add a restart Declarative Action to your custom Activity definition. Scroll to the bottom of the activity definition form and click add in the Playbook Actions related list. Choose the restart_activity as the declarative action and the Playbook Experience field as Global Playbook Experience. 

View solution in original post

14 REPLIES 14

Bimschleger
ServiceNow Employee
ServiceNow Employee

@Matt Jones3 To confirm, are you already on the Washington DC release and attempting to use the new Restart feature?

 

You can only restart an activity that has ended (completed, skipped, canceled, etc.)

Yes, exactly.  That's what I'm trying to do.  Someone skips the activity, then decides later on that it is needed, and restarts it.  How do I get the Flow that's connected to the activity to re-start, when the activity is restarted?

Oh, no, not on Washington DC yet, still on Vancouver.

Truly restarting an activity as you describe was only added in Washington DC release. Prior to that, we offered a way to change the visual state of an activity to "In Progress" using a restart button. This allows users to edit forms in previous activities but does not actually re-run the underlying flow. It also requires that your activity take advantage of Activity State Mapping.