I may be missing something since propagate-configuration
does not seem to be working for me.
I have a base workflow base.xml
, with configuration:
<global>
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<job-xml>application-config.xml</job-xml>
<configuration>
<property>
<name>paths.prefix.metadata</name>
<value>${nameNode}${fimProcessingMetadataPath}</value>
</property>
</configuration>
</global>
And in this very file, I have sub-workflows defined like this:
<action name="srv_a">
<sub-workflow>
<app-path>${nameNode}${workflowPath}/a.xml</app-path>
<propagate-configuration />
</sub-workflow>
<ok to="b" />
<error to="kill" />
</action>
<action name="srv_b">
<sub-workflow>
<app-path>${nameNode}${workflowPath}/b.xml</app-path>
<propagate-configuration />
</sub-workflow>
<ok to="c" />
<error to="kill" />
</action>
// Here there are many sub-workflows like these.
But then in my code, I cannot find the paths.prefix.metadata
property - it fails to find it.
java.lang.IllegalArgumentException: Mandatory property property is not set.
Please provide paths.prefix.metadata
If I define it again in a.xml
as its own property, I can access it OK.
So, how can I propagate this variable from base.xml
definition to the sub-workflows? As I understand from the documentation:
The propagate-configuration flag, if present, indicates that the workflow job configuration should be propagated to the child workflow.
But it does not seem to reach the child workflow. Why? Is it not an expected behaviour that the global configuration is not propagated to the child sub-workflows?