Packaging workflows for maven build not working as expected | Community
Skip to main content
Level 2
June 9, 2021
Solved

Packaging workflows for maven build not working as expected

  • June 9, 2021
  • 1 reply
  • 1614 views

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?

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

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.

1 reply

davidjgonzalezzzzAdobe EmployeeAccepted solution
Adobe Employee
June 9, 2021

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.

Level 2
June 9, 2021

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