1
0
Fork 0

when reuseContent, reset ${workingPath}/all_entities

This commit is contained in:
Claudio Atzori 2020-03-17 17:17:06 +01:00
parent 2f0c85eeb3
commit 19746ad308
1 changed files with 20 additions and 11 deletions

View File

@ -48,25 +48,16 @@
</property> </property>
</parameters> </parameters>
<start to="ResetGraphPath"/> <start to="ReuseContent"/>
<kill name="Kill"> <kill name="Kill">
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message> <message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill> </kill>
<action name="ResetGraphPath">
<fs>
<delete path="'${graphBasePath}/graph_raw'"/>
<mkdir path="'${graphBasePath}/graph_raw'"/>
</fs>
<ok to="ReuseContent"/>
<error to="Kill"/>
</action>
<decision name="ReuseContent"> <decision name="ReuseContent">
<switch> <switch>
<case to="ResetWorkingPath">${wf:conf('reuseContent') eq false}</case> <case to="ResetWorkingPath">${wf:conf('reuseContent') eq false}</case>
<case to="GenerateEntities">${wf:conf('reuseContent') eq true}</case> <case to="ResetAllEntitiesPath">${wf:conf('reuseContent') eq true}</case>
<default to="ResetWorkingPath"/> <default to="ResetWorkingPath"/>
</switch> </switch>
</decision> </decision>
@ -122,6 +113,15 @@
<arg>-l</arg><arg>store</arg> <arg>-l</arg><arg>store</arg>
<arg>-i</arg><arg>cleaned</arg> <arg>-i</arg><arg>cleaned</arg>
</java> </java>
<ok to="ResetAllEntitiesPath"/>
<error to="Kill"/>
</action>
<action name="ResetAllEntitiesPath">
<fs>
<delete path="'${workingPath}/all_entities'"/>
<mkdir path="'${workingPath}/all_entities'"/>
</fs>
<ok to="GenerateEntities"/> <ok to="GenerateEntities"/>
<error to="Kill"/> <error to="Kill"/>
</action> </action>
@ -150,6 +150,15 @@
<arg>-pguser</arg><arg>${postgresUser}</arg> <arg>-pguser</arg><arg>${postgresUser}</arg>
<arg>-pgpasswd</arg><arg>${postgresPassword}</arg> <arg>-pgpasswd</arg><arg>${postgresPassword}</arg>
</spark> </spark>
<ok to="ResetGraphPath"/>
<error to="Kill"/>
</action>
<action name="ResetGraphPath">
<fs>
<delete path="'${graphBasePath}/graph_raw'"/>
<mkdir path="'${graphBasePath}/graph_raw'"/>
</fs>
<ok to="GenerateGraph"/> <ok to="GenerateGraph"/>
<error to="Kill"/> <error to="Kill"/>
</action> </action>