Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Integration Hub / Spokes

abdelkadergh
Mega Contributor

I’m designing a Flow with more than 10 actions, but I know there’s a 10-item limit in Flow Designer. I’ve heard Subflows can help, but I’m not sure how to structure them for reuse across different Flows. Can someone provide a best practice example?

1 ACCEPTED SOLUTION

AnjalPDijo
Mega Guru

Hi @abdelkadergh ,

When designing a Flow with more than 10 actions, you can overcome the limit by using Subflows.

sub2.png

 

flow.png

 

 

Best Practice Approach:

  • Create a Main Flow for the overall process logic.
  • Identify steps or tasks that are repetitive or logically grouped and move them into a Subflow.
  • Subflows allow you to define inputs and outputs, making them reusable across different Flows.
  • This modular design improves maintainability, readability, and avoids hitting the 10-action limit.

For detailed guidance, refer to the official documentation: Subflows in Flow Designer

Hope this helps!


Best regards,
Anjal

View solution in original post

5 REPLIES 5

Bhimashankar H
Mega Sage

Hi @abdelkadergh ,

 

Action limit in flow is configured in system property called sn_flow_designer.max_actions. It may vary on this prorperty.

 

Subflows are the reusable logic components (can be called from flows). Create subflows as your primary building blocks, then compose them into flows

 

Example:

Requisition to PO Flow

Trigger -> Requisition created

->Subflow : Validate Requisition 

Decision Yes/No

Subflow: Check Approvals

Subflow : Create PO from requisition

Subflow : Notify requestor

 

Like this you make make your flow understandable and easy to maintain.

 

Go through below reference for more detail:

Flow Designer - Best Practises & Reusable functionalities! 

Exploring ServiceNow Flow Designer: Best Practices & Insights 

Building subflows  ->Good documentation to understand subflows.

 

Thanks,
Bhimashankar H

 

-------------------------------------------------------------------------------------------------
If my response points you in the right directions, please consider marking it as 'Helpful' & 'Correct'. Thanks!

Srinidhik
Tera Contributor

Hey Abdel,

To get past the 10-action limit, break your Flow into logical stages and put each stage into its own Subflow. Each Subflow should have its own logics, so that you can re-use those logics in any of the flows, and this is the scalable way to get pass all the 10 actions. also you can call this subflows in any of the flows.

 

But make sure you design Subflows like small services with clean inputs and outputs, each handling a single domain function.

 

If you find my answer is helpful, click on helpful!

AnjalPDijo
Mega Guru

Hi @abdelkadergh ,

When designing a Flow with more than 10 actions, you can overcome the limit by using Subflows.

sub2.png

 

flow.png

 

 

Best Practice Approach:

  • Create a Main Flow for the overall process logic.
  • Identify steps or tasks that are repetitive or logically grouped and move them into a Subflow.
  • Subflows allow you to define inputs and outputs, making them reusable across different Flows.
  • This modular design improves maintainability, readability, and avoids hitting the 10-action limit.

For detailed guidance, refer to the official documentation: Subflows in Flow Designer

Hope this helps!


Best regards,
Anjal

Srinidhik
Tera Contributor

Hey Abdel,

To get past the 10-action limit, break your Flow into logical stages and put each stage into its own Subflow. Each Subflow should have its own logics, so that you can re-use those logics in any of the flows, and this is the scalable way to get pass all the 10 actions. also you can call this subflows in any of the flows.

 

But make sure you design Subflows like small services with clean inputs and outputs, each handling a single domain function.

 

If you find my answer is helpful, click on helpful!