Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

How to sync the workflow after deploying?

Avatar

Level 5

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.

10 Replies

Avatar

Community Advisor

Hi @keerthana_hn,

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"/>

Avatar

Level 5

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. 

Avatar

Employee Advisor

@keerthana_hn 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

Avatar

Employee Advisor

Hi @keerthana_hn,

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"/>

Avatar

Community Advisor

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

Avatar

Level 2

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 

Avatar

Community Advisor

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



Arun Patidar

Avatar

Level 2

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.jso...

 

Avatar

Level 2

Hi,

 

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

Avatar

Level 2

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