Custom Workflow Launcher Configurations Per Environment in Source Code
We're using AEM 6.3.3.2. Is it possible to customize configurations in our source code for individual workflow launchers on a per environment basis, similar to OSGI configs? The goal is that each Maven build will apply the custom settings to each workflow on a per environment basis. We'd like to avoid manually changing settings after deployment.
With OSGI configs, we have various config folders in our ui.apps project that might apply to individual servers (DEV, QA, etc.). Each server uses custom configurations based on naming conventions used for folder names and the server's run mode(s). It's easy and works great, but we haven't had any luck figuring out how to do something similar for workflows.
We saved the configuration for a sample AEM Workflow Launcher under this folder in the ui.content project:
ui.content/src/main/content/jcr_root/etc/workflow/launcher/config/my_custom_workflow/.content.xml
It works great, but the same settings apply to all environments. In the .content.xml file, we want the enabled property set to true in our QA, CERT, and PROD environments, but set to false in our DEV environment and local sandboxes. We'd like to avoid enabling or disabling all workflow launchers per server, since we have other workflows that we always want enabled in all environments. Here's what our current .content.xml file looks like.
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="cq:WorkflowLauncher"
condition=""
conditions="[\0]"
description=""
disabledFeatures="[]"
enabled="{Boolean}true"
eventType="{Long}16"
excludeList=""
features="[]"
glob="/content/myapp/us/en/mynode/"
nodetype="nt:base"
runModes="author"
workflow="/etc/workflow/models/my_custom_workflow/jcr:content/model"/>
Thanks in advance for any possible solutions you can share, and really appreciate you taking the time to ponder this.
-Nestor