How to control on sub-workflow, which sub-workflow should be started first when executed from master-workflow?

8 views
Skip to first unread message

Hastimal Jangid

unread,
Apr 20, 2017, 5:30:37 PM4/20/17
to Hue-Users
Hi All,
I have one master-workflow and this work has 12 sub-workflows. I want to have a capability for a user to start from any workflows. Say for an example I have -
<workflow-app name="${destinationEnvironmentName}_test_master_workflow" xmlns="uri:oozie:workflow:0.4">
   <global>
    <job-xml>/user/hjangid/test_master_workflow/config-default.xml</job-xml>
   </global>
    <start to="vehicles_inc"/>
<action name="vehicles_inc">
        <sub-workflow>
            <app-path>${vehicles_inc_path}/workflow.xml</app-path>
            <propagate-configuration/>
        </sub-workflow>
        <ok to="locations_full"/>
        <error to="kill"/>
    </action>
    <action name="locations_full">
        <sub-workflow>
            <app-path>${locations_full_path}/workflow.xml</app-path>
             <propagate-configuration/>
                <configuration>
                <property>
                    <name>destinationEnvironmentName</name>
                    <value>hjangid_test</value>
                </property>
            </configuration>
        </sub-workflow>
        <ok to="end"/>
        <error to="kill"/>
    </action>
    <kill name="kill">
        <message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
    </kill>
    <end name="end"/>
</workflow-app>

I want to have capabilty for user, from where he wants to start he could start-
like below-(but unfortunately shows error :(Error submitting job /user/hjangid/test_master_workflow/workflow.xml
E0701: XML schema error, cvc-pattern-valid: Value '${start_point}' is not facet-valid with respect to pattern '([a-zA-Z_]([\-_a-zA-Z0-9])*){1,39}' for type 'IDENTIFIER'.)
<workflow-app name="${destinationEnvironmentName}_test_master_workflow" xmlns="uri:oozie:workflow:0.4">
   <global>
    <job-xml>/user/hjangid/test_master_workflow/config-default.xml</job-xml>
   </global>
    <start to="${start_point}"/>
    <action name="vehicles_inc">
        <sub-workflow>
            <app-path>${vehicles_inc_path}/workflow.xml</app-path>
            <propagate-configuration/>
        </sub-workflow>
        <ok to="locations_full"/>
        <error to="kill"/>
    </action>
    <action name="locations_full">
        <sub-workflow>
            <app-path>${locations_full_path}/workflow.xml</app-path>
             <propagate-configuration/>
                <configuration>
                <property>
                    <name>destinationEnvironmentName</name>
                    <value>hjangid_test</value>
                </property>
            </configuration>
        </sub-workflow>
        <ok to="end"/>
        <error to="kill"/>
    </action>
    <kill name="kill">
        <message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
    </kill>
    <end name="end"/>
</workflow-app>
Please let me know. Thanks

Reply all
Reply to author
Forward
0 new messages