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

SOLVED

Packaging workflows for maven build not working as expected

RobertInfosys
Level 2
Level 2

I'm trying to include a custom workflow and launcher in my maven package. I've created an archetype using the aem-project-archetype 27 settings for AEM 6.5. I have created a custom workflow that has one step which is a process step. I have also added a launcher for this workflow as well. I then created a package with the settings for the workflow and launcher held in the /var/workflows/models/custom-workflow, /conf/global/settings/workflow/launcher/config/[workflow-id] and /conf/global/setting/workflow/models/custom-workflow. I then downloaded the package and expanded it and added the files to my project.

I added the paths to the filter.xml and set the mode to merge. Then when I build, all of the OOTB workflows are deleted and only my custom workflow is left.

Including the path all the way to the custom workflow name only generates build errors due to rules violations. 

Does someone know of an example of including a workflow in a build package that I could review to correct mine?

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution
davidjgonzalezzzz
Correct answer by
Level 6
Level 6

Can you post your package's filter.xml definition?

 

It sounds like your filter.xml is too broad, and thus wiping out everything in the JCR at these paths, and only adding what is in your project.

View solution in original post

0 Replies
davidjgonzalezzzz
Correct answer by
Level 6
Level 6

Can you post your package's filter.xml definition?

 

It sounds like your filter.xml is too broad, and thus wiping out everything in the JCR at these paths, and only adding what is in your project.

View solution in original post

RobertInfosys
Level 2
Level 2

<?xml version="1.0" encoding="UTF-8"?> <workspaceFilter version="1.0"> <filter root="/conf/mysite" mode="merge"/> <filter root="/content/mysite" mode="merge"/> <filter root="/content/dam/mysite/asset.jpg" mode="merge"/> <filter root="/content/experience-fragments/mysite" mode="merge"/> <filter root="/conf/global/settings/workflow/launcher/config/1765574124" mode="merge"/> <filter root="/conf/global/settings/workflow/models/custom-workflow" mode="update"/> <filter root="/var/workflow/models/custom-workflow" mode="update"/> </workspaceFilter>

 

The thing I find odd is that it should only add the /var/workflow/models/custom-workflow or modify children. It is wiping out everything at /var/workflow/models and adding the new one.

RobertInfosys
Level 2
Level 2
Now I feel **bleep**. I found that I had the path listed in two sub projects. The first one that would be built, didn't have the path so it would delete the tree and then my custom workflow would be added. Problem solved. Remove the filter that was deleting the tree and things work as expected.