Can we use one workflow for multiple use case? | Community
Skip to main content
June 26, 2025
Solved

Can we use one workflow for multiple use case?

  • June 26, 2025
  • 2 replies
  • 464 views
Hi All, I have a use case where one workflow is used to activate a list of pages . This workflow is getting triggered by a servlet api. Now we have another use case where a scheduler is running to modify some pages and those pages need to be activated. Can we use the same workflow for both use case to activate pages? Thanks
Best answer by Shashi_Mulugu

Hi @swetab,

 

Sure you can use that way. Workflow technically is a set of tasks configured together and executed together instead of manually doing it everytime.

 

Just make sure that, both workflow running time is not overlapped or you implement enough checks to see if page is already under workflow and wait till it gets published etc..

 

Are you using any approval mechanism in these workflow? If not pls evaluate to use Sling Jobs as they guarantee the execution.

2 replies

June 26, 2025

Yes, one AEM workflow can be designed and reused for multiple use casesif those use cases share similar process steps or logic. This is done using dynamic workflow models with conditional steps, process arguments, and configuration-driven behavior.

You design a generic workflow model and use:

  • Process step arguments to pass different logic

  • ECMA scripts or custom Java code that read metadata

  • Conditionally executed steps using workflow metadata 

SwetaBAuthor
June 30, 2025

Thank you @user1576 

Shashi_Mulugu
Community Advisor
Shashi_MuluguCommunity AdvisorAccepted solution
Community Advisor
June 26, 2025

Hi @swetab,

 

Sure you can use that way. Workflow technically is a set of tasks configured together and executed together instead of manually doing it everytime.

 

Just make sure that, both workflow running time is not overlapped or you implement enough checks to see if page is already under workflow and wait till it gets published etc..

 

Are you using any approval mechanism in these workflow? If not pls evaluate to use Sling Jobs as they guarantee the execution.

SwetaBAuthor
June 30, 2025

Thank you @shashi_mulugu