我想創建一個應該可用於Oozie工作流程中所有操作的變量。我試圖創建它,如下所示。但是EL表達式並沒有得到評估,導致EL表達式本身的可變current_ts值。有人可以請點亮這個嗎?如何用EL表達式創建一個變量用於所有動作oozie工作流?
<workflow-app xmlns="uri:oozie:workflow:0.4" name="no-op-wf">
<parameters>
<property>
<name>current_ts</name>
<value>${replaceAll((replaceAll((replaceAll((timestamp()),"-","")),"T","_")),":","")}</value>
</property>
</parameters>
<start to="test"/>
<kill name="test">
<!--message Just to show that this expression works if used here>Timestamp - [${replaceAll((replaceAll((replaceAll((timestamp()),"-","")),"T","_")),":","")}</message-->
<message>Timestamp - ${current_ts}</message> <!-- this will print expression but not evaluate it -->
</kill>
<end name="end"/>
</workflow-app>
你可以嘗試使用全局或配置標籤,那麼該屬性是跨越workflow.xml –