Reply
Explorer
Posts: 21
Registered: ‎09-09-2015

how to get oozie coordinator id in the workflow

My requirement is to kill or stop coordinator which initiated a workflow in case any workflow action fails.

 

wf:id gives the id for the workflow.

 

is there any such fuction for coord??

 

if not, please suggest ways to pass coord it to workflow.

Explorer
Posts: 21
Registered: ‎09-09-2015

Re: how to get oozie coordinator id in the workflow

The only I think is by redirecting the "oozie job  -oozie.... " to a file and accessing the from workflow to get the coordinate id.

Is there any other way to access the coordinate id in the instance workflow??

Explorer
Posts: 7
Registered: ‎04-07-2017

Re: how to get oozie coordinator id in the workflow

            
1) use the following config in the coordinator xml

        <configuration>
            <property>
                <name>coord_id</name>
                <value>${coord:actionId()}</value>
            </property>
        </configuration>
        
        
2) specify as following in worflow xml as similar to ${wf:id()}  for getting workflow id

       Coordinator ID:${coord_id}

Announcements