incubator-oozie-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexey Yakubovich <alexe...@gmail.com>
Subject Passing parameters between Oozie actions, including workflow
Date Fri, 20 Apr 2012 20:22:10 GMT
I have question about passing parameters between Oozie actions, including
workflow case.

1. The <capture-output/> element in java action allows to save key-value
pairs (all string) into "output property file" Oozie provides for java
action (and ssh action).

String ooziePropFileName =
System.getProperty("oozie.action.output.properties");
File file = new File(ooziePropFileName);
Properties props = new Properties();
props.setProperty("key1", "value1")
OutputStream os = new FileOutputStream(file);
props.store(os, "");
os.close();

and then access that in workflow with EL:

${wf:actionData('prev-action')['key1']}

Is it possible to get the values from that "output property file" in java
code in one of following (java) actions? Is there any API for that?


2. It seem you can't call an action defined in main workflow from
sub-workflow actions directly, using <ok to="actionName"/> or <error
to="actionName"/> clauses.
So, supposing you want to implement the simple common error-handling
pattern:
//==============
error handler action (/ sub-workflow) should be called from any "data
processing"
action in <error to=""/> clause. That "data processing" action can be in
sub-workflow.
//==============
How you can do that?

2. Can you see in main workflow a content of <capture-output /> from
sub-workflow actions?
And vice versa, can you in sub-workflow action access the <capture-output
/>
from main workflow actions? I mean, are they visible?

Thanks
Alexey

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message