added a decision node to choose if to upload results in zenodo

This commit is contained in:
Miriam Baglioni 2021-04-23 12:42:06 +02:00
parent 952d6dc2fb
commit bcbadeb107
1 changed files with 12 additions and 1 deletions

View File

@ -1,6 +1,10 @@
<workflow-app name="dump_complete_graph" xmlns="uri:oozie:workflow:0.5"> <workflow-app name="dump_complete_graph" xmlns="uri:oozie:workflow:0.5">
<parameters> <parameters>
<property>
<name>upload</name>
<description>true if the dump should be upload in zenodo</description>
</property>
<property> <property>
<name>sourcePath</name> <name>sourcePath</name>
<description>the source path</description> <description>the source path</description>
@ -584,10 +588,17 @@
<arg>--nameNode</arg><arg>${nameNode}</arg> <arg>--nameNode</arg><arg>${nameNode}</arg>
<arg>--sourcePath</arg><arg>${workingDir}/collect</arg> <arg>--sourcePath</arg><arg>${workingDir}/collect</arg>
</java> </java>
<ok to="send_zenodo"/> <ok to="should_upload"/>
<error to="Kill"/> <error to="Kill"/>
</action> </action>
<decision name="should_upload">
<switch>
<case to="send_zenodo">${wf:conf('upload') eq true}</case>
<default to="End"/>
</switch>
</decision>
<action name="send_zenodo"> <action name="send_zenodo">
<java> <java>
<main-class>eu.dnetlib.dhp.oa.graph.dump.SendToZenodoHDFS</main-class> <main-class>eu.dnetlib.dhp.oa.graph.dump.SendToZenodoHDFS</main-class>