Hi Himanish,

There are a couple of other alternatives to this as well. Say if either of your 
preceding actions A or AA is a

 *   java action, using <capture-output> tag, you will get all the action's 
data, accessible via wf:actionData(actionNode)

http://incubator.apache.org/oozie/docs/3.2.0-incubating/docs/WorkflowFunctionalSpec.html#a4.2.1_Basic_EL_Constants

 *   Map-reduce action, you can access mr counters (hadoop EL functions) of 
that node, and retrieve the information about this node

http://incubator.apache.org/oozie/docs/3.2.0-incubating/docs/WorkflowFunctionalSpec.html#a4.2.5_Hadoop_EL_Functions


Maybe you can elaborate on this use-case a bit more? We can think about 
supporting it if the current options are not solving it in entirety.

Thanks and Regards,
--
Mona Chitnis



On 8/31/12 11:09 AM, "Mona Chitnis" 
<[email protected]<mailto:[email protected]>> wrote:

Hi Himanish,

I believe the EL function that would be of use in this case is
wf:transition(String node). You can check through the various action nodes
preceding your java action (say called "java-node"), to check which holds
the value "java-node" as a transition. Once you have that answer, is your
Java action code handling it in some way to put it in the output
properties? Or you could make this comparison as part of your decision
node switch-case too.

Hope that helps,
--
Mona Chitnis




On 8/31/12 7:27 AM, "Himanish Kushary" 
<[email protected]<mailto:[email protected]>> wrote:

Hi

I am trying to define a workflow where I could come into a java action
node
from either Action A or Action AA.Depending on whether I come from Action
A
or Action AA I would like to write different values into the properties
file (capture-output) that will be generated from the java action.
Subsequently a decision node will take different route based on the
different properties (key-value) set through the java action.I was
thinking
of implementing the different properties key using the action id for
Action
A / Action AA.

Is there any way to know the previous action id from the Java action
Node.Is there any EL function like wf:lastActionId ? Is there any
alternative way to define similar workflow ?


<action A> ----------
                           ------------------- <action B>
                           |------------ <java action node>
----------<decision node 1>--|
<action AA>---------
                           ------------------ <action BB>


---------------------------
Thanks & Regards
Himanish


Reply via email to