Contents

  1. XPath in evQueue
  2. evQueue specific functions

XPath in evQueue

evQueue uses XPath for loops and conditions. If you don't know the XPath language, you can find some documentation on a certain number of websites, so we wont cover this subject here.

However, there are some concepts that are specific to evQueue that we are going to explain here.

evQueue specific functions

evqGetWorkflowParameter(<parameter name>)

This function returns the value of a workflow parameter, given his name.

evqGetCurrentJob(<parameter name>)

Returns the current job node. This function is not really useful by itself. It is used to set the current node in XPath paths.

To retrieve the current job's input named 'filename', use:

evqGetCurrentJob()/evqGetInput('filename')

evqGetOutput(<task name>)

Get the output node of a task found by its name. This function is used with a context function at its left side:

evqGetParentJob()/evqGetInput('unzip')

Will position the current node to the output node of the task 'unzip' found in the parent job. You can then continue the path to find a specific node:

evqGetParentJob()/evqGetInput('unzip')/result/@errorcode

Will return the attribute 'errorcode' of the root node returned by the unzip task.

evqGetInput(<task name>, <input name>)

This is essentially the same as evqGetOutput() function but it looks for an input by its name.

evqGetParentJob( [ <ancestor position> | < job name > ] )

If called with no arguments, return the parent job.

If called with an integer argument, it returns the nth ancestor. 0 is the parent, 1 is the parent's parent and so on.

If called with a string agrument, it will look all ancestors up to find a specific job by its name and return the first one found.

evqGetContext()

This function returns a job's context node. This is mostly used with loops, to determine on which element a specific job has been launched. It can be followed by a path:

evqGetParentJob()/evqGetContext()/subnode

evqWait(<expression>)

Wait for the specified XPath expression to become true. This expression will be re-evaluated each time a task starts or ends. The task that has this condition will not be launched unless the condition is true. If all tasks are terminated and this condition is still false, the workflow will end and the condition will never become true.

This is a very advanced functionality. It can be used to synchronize separate (parallel) branches of the workflow, that would normally not be.