How to sync the workflow after deploying? | Community
Skip to main content
Adobe Employee
April 4, 2022

How to sync the workflow after deploying?

  • April 4, 2022
  • 4 replies
  • 4087 views

Hi,

 

I have created a workflow. Added the workflow and workflow path in the filter.xml as

<filter root="/apps/settings/workflow/notification/email/content-review" mode="update"/>

but every time I deploy the code, the workflow doesn't sync automatically. It has to synced manually. Is there any way to make it sync automatically? should I use different mode?

 

Thank you.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

lukasz-m
Community Advisor
Community Advisor
April 4, 2022

Hi @keerthana_h_n,

The reason of the issue is the fact that you are keeping your workflow model under incorrect path. According to Adobe documentation, you should use below 2 location:

  • /conf/global/settings/workflow/models/ - this is location for your custom workflow models design
  • /var/workflow/models/ - this is place where you should keep runtime models - this location is used after sync.

To solve your issue, you should move your model under /conf location, but also use /var. In other words your package should keep both design model and runtime model. This will assure that you will not need to do any sync after deployment and your workflow model will be always up to date.

Your filter could look like this (assuming you have your workflow model design and runtime version under appropriate paths)

<filter root="/conf/global/settings/workflow/models/your-workflow-model"/>
<filter root="/var/workflow/models/your-workflow-model"/>
Adobe Employee
April 4, 2022

Hi @lukasz-m ,

 

Sorry. The path I have used is this 

<filter root="/conf/global/settings/workflow/models/awsevents" mode="update"/>
<filter root="/var/workflow/models/awsevents" mode="update"/>

above I have given wrong path. After giving the correct path not able to sync the workflow. 

milind_bachani
Adobe Employee
Adobe Employee
April 4, 2022

@keerthana_h_n hi,

 

I dont think that its a good approach to put runtime models in the codebase:

var/workflow/models/**

 The runtime model should be synced in each instance as it is a one time activity.

Thanks,

Milind

Anish-Sinha
Adobe Employee
Adobe Employee
April 5, 2022

Hi @keerthana_h_n,

There is no additional step for you to automatically sync up the workflow when deployed. I did try the same on AEM 6.5.0 and I see the workflow is in sync state. Can you try just by overriding the model, by using belwo one. Just remove the mode update completely and try:

<filter root="/conf/global/settings/workflow/models/awsevents"/>
<filter root="/var/workflow/models/awsevents"/>
arunpatidar
Community Advisor
Community Advisor
April 5, 2022

Ideally, it should work, can you try syncing in your local and package model again from both var and conf folder and deploying using the below filters

<filter root="/conf/global/settings/workflow/models/awsevents"/>
<filter root="/var/workflow/models/awsevents"/>
Arun Patidar
Level 3
September 20, 2024

Hi @arunpatidar 
I have a similar requirement where I want to remove the thumbnail renditions from asset_processing_on_sdk WF but this I need to deploy the changes using the code
its updating in the /conf location but not sync in the /var
After I add below filter still the /var location is not updating with the latest changes.

    <filter root="/conf/global/settings/workflow/models/dam/asset_processing_on_sdk"/>
<filter
root="/var/workflow/models/dam/asset_processing_on_sdk/* "/>

please help me solve above requirement
Thanks

@arunpatidar 
@abhishekanand_ 
@estebanbustamante 
@harwinder-singh 
@sravs 
arunpatidar
Community Advisor
Community Advisor
September 20, 2024

Hi @vishal33 
If you are using cloud then synching is done automatically, no need to add nodes in /var

Arun Patidar
Level 2
October 21, 2022

After package deployment a sync needs to take place so it is correctly located under /var/workflows which is where the active workflows are placed.

Also as others also commented, having a duplicate is not good.

Here is where you place your workflows:

/conf/global/settings/workflow/models/

 

Here is how you sync the Dam Update Assets workflow after deployment:

 

curl -X POST -u admin:admin http://localhost:4502/conf/global/settings/workflow/models/dam/update_asset/jcr:content.generate.json

 

Level 2
April 12, 2023

Hi,

 

Just found this. Is this suppose to be a manual process or part of the CICD pipeline? 

Level 2
April 12, 2023

If you deploy via a package you should have a step after deployment to sync the WF.

How you do it is up to you.

 

/Peter