Job Functions

   Journey Manager (JM) Previously known as Transact Manager (TM).  |    System Manager / DevOps  |  v5.1 & Higher This feature is related to v5.1 and higher.

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.

"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.