Process Instance Attributes and Methods
This section summarizes the attributes and methods that are available for accessing information about process instances using the Process class.
| Attribute/Method | Example | Description |
|---|---|---|
| priority : Integer | priority = Process. priority; | Returns priority of the Process Instance |
| getName() : String | name = Process.getName(); | Returns Process Template name |
| getDescription() : String | description = Process. getDescription(); | Returns description of Process |
| getStartTime() : Datetimetz | start = Process. getStartTime(); | Returns date/time the Process Instance was started |
| getPriority() : Integer | priority = Process. getPriority(); | Returns priority of the Process Instance |
| getOriginator() : String | originator = Process. getOriginator(); | Returns originator of Process Instance, e.g.
uid=admin, ou=system |
| getId() : String | id = Process. getId(); | Returns Process Instance ID, for example,
pvm:0a128cu |
| getActivityLoopIndex() : Integer | index = Process. getActivityLoopIndex() |
|
| addActivityLoopAdditionalInstances: (String, Integer) | add = Process.addActivityLoopAdditionalInstances ("UserTask",1) | Adds additional instances to a multi-instance loop task while that task is in progress |
| getActivityType(String) : String | type = Process.getActivityType('UserTask2'); | Returns task type, for example,
userTask |
| getActivityState(String) : String | state = Process.getActivityState('UserTask2'); | Returns task state, for example,
done.state |
| getActivityStartTime(String) : Datetimetz | started = Process.getActivityStartTime('UserTask2'); | Returns time task was started |
| getActivityCompletionTime(String) : Datetimetz | completed = Process. getActivityCompletionTime('UserTask2'); | Returns time task was completed |
| getActivityDeadline(String) : Datetimetz | deadtime = Process.getActivityDeadline('UserTask2'); | Returns task deadline time |
| getActivityAttribute(String, String) : String | workItemId = Process.getActivityAttribute('UserTask2','WorkItemId');
completer = Process.getActivityAttribute('UserTask2','Completer'); |
Returns value of attribute, for example,
430Only WorkItemId and Completer are supported as attribute names. |
| getActivityArrayAttribute(String, String) : List<String> | attrs = Process.getActivityArrayAttribute('UserTask2','Participant'); | Returns array of attribute values. Only Participant is supported as an attribute name.** |
| setPriority() : Integer | priority = Process.setPriority(); | Once a process instance has been created, it can change its own priority.
The default value is 200. Valid entries are 100, 200, 300 and 400. |
| getOriginatorName(): String | name = Process.getOriginatorName() | Returns the process instance originator login name. For use with a pageflow or business process. |
| setContextVariable (String varName, BusinessObject data) | contextVariable = Process.setContextVariable (cargoType, steel); | For use with pageflow processes. Enables a BDS context variable to be created as an attribute on the main process. These context variables can be accessed by the main process or any of its sub-processes.
For a pageflow process, there is only one thread of execution so a single script can access a context variable in a thread-safe manner. These methods are not intended for use in a business process. |
| getContextVariable (String varName, String className) | contextVariable = Process.getContextVariable (cargoType, "className"); | For use with pageflow processes. Gets a BDS context variable created as in the previous method. |
| auditLog (String message) | Process.auditLog ("Unknown Cargo Type " + cargoType.name) ; |
Adds a simple text entry to the audit log (process-instance related event log entry). Use of the Process.auditLog() method is not supported for in-memory process instances (service processes, pageflow processes, or business services). If the Process.auditLog() method is used on one of these processes (whether started from within a parent business process or independently), no audit entries are generated. |