Automation
Functions to access the automation runtime environment
current user()
Function that returns the user currently calling the automation API.
automation.current user().name => "John Smith"
automation.current user().email => "john.smith@trisotech.com"
initiator()
Function that returns the service initiator (user who started process or case instance). NOTE: applies only to BPMN and CMMN.
automation.initiator().name => "John Smith"
automation.initiator().email => "john.smith@trisotech.com"
instance info()
Function that returns the information about current instance. NOTE: applies only to BPMN and CMMN.
automation.instance info().name => "\"Order 12345\""
automation.instance info().tags => "[\"Ordered\"]"
automation.instance info().initiator.email => "\"john.smith@trisotech.com\""
service info()
Function that returns the information about the current service.
automation.service info().environment => "\"test\""
automation.service info().version => "\"1.1\""
automation.service info().artifact => "\"decision\""
automation.service info().group => "\"bpmn\""
task assignees(name)
Function that returns performers of the user/manual task. NOTE: applies only to BPMN and CMMN.
Name | Required | Type | Description |
---|---|---|---|
name |
Yes |
Text |
Task’s name |
automation.task assignees("Approval").name => "[\"John Smith\"]"
automation.task assignees("Approval").email => "[\"john.smith@trisotech.com\"]"
task history([name])
Function that returns the automation history (previously completed tasks). NOTE: applies only to BPMN and CMMN.
Name | Required | Type | Description |
---|---|---|---|
name |
No |
Text |
Task’s name |
automation.task history().name => "John Smith"
automation.task history("Previous Activity").completed by => "John Smith"
automation.task history().completed on => "[2021-01-07T12:00:00]"
Data Types
InstanceInfo
Information about process/case instance
Properties
Name | Type | Description |
---|---|---|
initiator |
User who initiated the instance |
|
instanceId |
Text |
Unique instance identifier |
name |
Text |
Name of the instance |
parentInstanceId |
Text |
Parent instance identifier if this is a sub instance |
started on |
Text |
Date and time when the instance was started |
tags |
array |
Instance tags |
ServiceInfo
Information about service
Properties
Name | Type | Description |
---|---|---|
artifact |
Text |
Artifact Identifier |
environment |
Text |
Environment Identifier |
group |
Text |
Group Identifier |
version |
Text |
Version Identifier |
TaskHistory
Array of objects with these properties
Name | Type | Description |
---|---|---|
completed by |
Text |
Completed by |
completed on |
Text |
Completed on |
name |
Text |
Name |
started on |
Text |
Started on |
type |
Text |
Type |
User
Current user
Properties
Name | Type | Description |
---|---|---|
cost center |
Text |
Cost center |
department |
Text |
Department |
division |
Text |
Division |
Text |
||
employee number |
Text |
Employee number |
manager |
Manager |
|
name |
Text |
Name |
organization |
Text |
Organization |
Users
Collection of User