Subflows | To update or not to update

Paula Alejandra
Mega Guru
Mega Guru

Hi,

 

I have recently completed the Flow Designer trainign and I am fascinated with subflows leverage capacity. I couldn't avoid jumping into the conclusion that once a Subflow is Activated and starts being used by other people it shouldn't be updated/deactivated unless, of course, there is a way to assess the extent of the usage and reach out for the process owners to discuss the change... but I can't avoid thinking that such a thing is hard to do/guarantee.

 

So my question is: Subflows rule #1 is "once published, never touch it, nor deactivate it? Or there is some knowledge gap that is preventing me to see the due dilligence?

 

Any help will be truly appreciated.

 

Paula Alejandra Portal
CSA - CIS PA
1 ACCEPTED SOLUTION

Shreya Wani
Tera Guru
Tera Guru

Hi @Paula Alejandra,

 

Flow designer indeed is a fascinating topic!

Let's start by understanding Subflow.

- Subflows are a sequence of reusable actions to use in a flow.

 

- A good programmer writes code in functions not only to reuse but also for unit testing. The same principle can and should be applied while creating Flows. Creating a subflow allows you to easily test smaller components of your overall flow, with the added bonus of being able to reuse it in other flows.

- The only real difference between a Flow and a Subflow is that Flow has a trigger. So think of the Flow as being the trigger, and your actions just being one or more Subflow.

 

Now coming back to your question, because of the subflow's reusable functionality, it is always a best practice to not edit or deactivate a subflow as you never know in how many flows it is getting leveraged.

But still, if you want to edit the existing subflow, creating a copy of the original one and then editing it would be my suggestion.

 

For further information on best practices related to flow designer, check out the below article.

https://www.servicenow.com/community/workflow-automation-articles/flow-designer-best-practices-gener...

You can also go through the ServiceNow product doc about subflows.

https://docs.servicenow.com/bundle/rome-servicenow-platform/page/administer/flow-designer/concept/su...

If you feel that I have assisted you in any manner, please mark my comment as helpful/correct.

 

Thanks,

Shreya

View solution in original post

2 REPLIES 2

Shreya Wani
Tera Guru
Tera Guru

Hi @Paula Alejandra,

 

Flow designer indeed is a fascinating topic!

Let's start by understanding Subflow.

- Subflows are a sequence of reusable actions to use in a flow.

 

- A good programmer writes code in functions not only to reuse but also for unit testing. The same principle can and should be applied while creating Flows. Creating a subflow allows you to easily test smaller components of your overall flow, with the added bonus of being able to reuse it in other flows.

- The only real difference between a Flow and a Subflow is that Flow has a trigger. So think of the Flow as being the trigger, and your actions just being one or more Subflow.

 

Now coming back to your question, because of the subflow's reusable functionality, it is always a best practice to not edit or deactivate a subflow as you never know in how many flows it is getting leveraged.

But still, if you want to edit the existing subflow, creating a copy of the original one and then editing it would be my suggestion.

 

For further information on best practices related to flow designer, check out the below article.

https://www.servicenow.com/community/workflow-automation-articles/flow-designer-best-practices-gener...

You can also go through the ServiceNow product doc about subflows.

https://docs.servicenow.com/bundle/rome-servicenow-platform/page/administer/flow-designer/concept/su...

If you feel that I have assisted you in any manner, please mark my comment as helpful/correct.

 

Thanks,

Shreya

Paula Alejandra
Mega Guru
Mega Guru

Thank you SO MUCH Shreya! Now I do get it 🙂

Paula Alejandra Portal
CSA - CIS PA