Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

How to sync the workflow after deploying?

Avatar

Level 4

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.

0 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 4

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

Level 10

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

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