Project

General

Profile

1
<workflow-app xmlns="uri:oozie:workflow:0.3" name="test-core_examples_subworkflow_cloners_my_subworkflow">
2
    <start to="cloner1"/>
3
    <action name="cloner1">
4
        <java>
5
            <job-tracker>${jobTracker}</job-tracker>
6
            <name-node>${nameNode}</name-node>
7
			<!-- The data generated by this node is deleted in this section -->
8
			<prepare>
9
				<delete path="${nameNode}${workingDir}/cloner1" />
10
				<mkdir path="${nameNode}${workingDir}/cloner1" />
11
			</prepare>
12
            <configuration>
13
                <property>
14
                    <name>mapred.job.queue.name</name>
15
                    <value>${queueName}</value>
16
                </property>
17
            </configuration>
18
            <!-- This is simple wrapper for the Java code -->
19
            <main-class>eu.dnetlib.iis.core.java.ProcessWrapper</main-class>
20
            <!-- The business Java code that gets to be executed -->
21
            <arg>eu.dnetlib.iis.core.examples.java.PersonCloner</arg>
22
            <!-- All input and output ports have to be bound to paths in 
23
            HDFS, working directory has to be specified as well -->
24
            <arg>-Iperson=${input_person}</arg>
25
            <arg>-Operson=${workingDir}/cloner1/person</arg>
26
        </java>
27
        <ok to="my_subsubworkflow"/>
28
        <error to="fail"/>
29
    </action>
30
    <action name="my_subsubworkflow">
31
        <sub-workflow>
32
            <app-path>${wf:appPath()}/my_subsubworkflow</app-path>
33
            <configuration>
34
                <property>
35
                    <name>jobTracker</name>
36
                    <value>${jobTracker}</value>
37
                </property>
38
                <property>
39
                    <name>nameNode</name>
40
                    <value>${nameNode}</value>
41
                </property>
42
                <property>
43
                    <name>queueName</name>
44
                    <value>${queueName}</value>
45
                </property>
46
                <!-- Working directory of the subworkflow -->
47
                <property>
48
                    <name>workingDir</name>
49
                    <value>${workingDir}/my_subsubworkflow/working_dir</value>
50
                </property>
51
                <!-- Input port "person" bound to given path -->
52
                <property>
53
                    <name>input_person</name>
54
                    <value>${workingDir}/cloner1/person</value>
55
                </property>
56
                <!-- Output port "person" bound to given path -->
57
                <property>
58
                    <name>output_person</name>
59
                    <value>${output_person}</value>
60
                </property>
61
                <!-- parameters of this workflow node -->
62
                <property>
63
                	<name>param_copies_count</name>
64
                	<value>${param_copies_count}</value>
65
                </property>
66
            </configuration>
67
        </sub-workflow>
68
        <ok to="end"/>
69
        <error to="fail"/>
70
    </action>
71
    <kill name="fail">
72
        <message>Unfortunately, the process failed -- error message: [${wf:errorMessage(wf:lastErrorNode())}]</message>
73
    </kill>
74
    <end name="end"/>
75
</workflow-app>
    (1-1/1)