Job Functions

   Journey Manager (JM) The transaction engine for the platform.  |    System Manager / DevOps  |  All versions This feature is related to all versions.

Manager allows you to use job functions in a job definition of a collaboration job. A job action service can use the following job functions, if they are available:

  • Action property values
  • Step preConditions
  • Action preConditions

For more information on job functions, see JobFunctions API.

The job function invokes a Groovy service, passes a list of arguments, and waits for it to return a result. For example, the function below invokes the Manager Lookup Groovy service with an empty parameter map.

"properties": [ 
   { "name": "Task Assign User",  "value": "$func.invoke('Manager Lookup')" }, 
   ... 
 ]

The next function invokes the Reviewer Lookup Groovy service passing a list of arguments. You can invoke this environment configuration service directly from a collaboration job definition when various parameters and their values have been resolved.

"properties": [ 
   { "name": "Task Assign User",  "value": "$func.invoke('Reviewer Lookup', $formDataMap.state, $formDataMap.email)" }, 
   ... 
 ]

You can pass the invoke function parameters as an args list object, as shown below.

// Groovy Script args parameter. 
def state = args[0] 
def email = args[1]

You can also pass a current collaboration job as job and a job action as jobAction parameters to access all the properties of the currently executing collaboration job.

// Job and JobAction parameters. 
 def jobName = job.getName() 
 def stepName = jobAction.getJobStep().getName() 
 def actionName = jobAction.getName() 
 
 println jobName + ' : ' + stepName + ' : ' + actionName

For more information on available Groovy services, see form services.

Next, learn how to view all job services.