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 create and configure job task wait action services, which are specialized job action services designed to block the execution of a collaboration job until a specified event takes place.
To create a job action service:
To configure a job action service:
"actions": [
{
"name": "Individual Tasks",
"type": "Job Task Assign",
"properties": [
{ "name": "Task Assign Repeating", "value": "true" },
{ "name": "Task Assign Repeat Item", "value": "$func.invoke('Repeating Get Item', ${formDataMap.itemDelimited}, ${assignRepeatIndex})" },
...
{ "name": "Task Type", "value": "Review" }
]
}
The $func.invoke
method executes the Repeating Get Item service (invoking it by the name) with two parameters.
import com.avoka.tm.util.*
import com.avoka.tm.vo.*
import groovy.transform.TypeChecked
import javax.servlet.http.*
import org.apache.commons.lang3.StringUtils
@TypeChecked
class FluentGroovyService {
// Injected at runtime
public Logger logger
/*
* Perform a groovy service invocation
*
* return: the result object
*/
Object invoke(SvcDef svcDef, HttpServletRequest request, User user, Map params) {
JobAction jobAction = (JobAction) params.jobAction
return invoke(svcDef, request, user, jobAction, params)
}
Object invoke(SvcDef svcDef, HttpServletRequest request, User user, JobAction jobAction, Map params) {
logger.info params
List<String> args = (List<String>) params.args
def result = "Not Found"
if( StringUtils.isNotEmpty(args[0]) &&
StringUtils.isNotEmpty(args[1]) &&
args[1].isNumber()) {
def itemDelimited = args[0]
// note repeat index from TM is 1 based not 0 based
def repeatIndex = args[1].toInteger() - 1
logger.info "itemDelimited: " + itemDelimited
logger.info "repeatIndex: " + repeatIndex
def items = itemDelimited.tokenize('|')
logger.info "items: " + items
result = items[repeatIndex.toInteger()]
logger.info "result Item: " + result
}
return result
}
}
Next, learn how to view all job services.