Open topic with navigation

TIBCO Business Studio™ - BPM Edition 5.4.0

# Process Instance Attributes and Methods

This section provides additional information (that is not available in content assist) about some of the attributes and methods that are available for accessing information about process instances using the `bpm.process` class.

Attribute/Method | Example | Description
--- | --- | ---
Datetimetz getActivityStartTime() | startTime = bpm.process.getActivityStartTime() | Returns the time the current task was started.
Datetimetz getActivityDeadline() | deadlineTime = bpm.process.getActivityDeadline() | Returns the current task deadline time.
getActivityLoopIndex() : Number | index = bpm.process. getActivityLoopIndex() | Retrieves the most local loop index. Index starts from 0 (zero) for first loop/multi-instance instance. In a parallel loop/multi-instance task or embedded sub-process, all loop instances run concurrently. To pass the loop index of a particular loop instance to a task: Use the input mapping functionality if this is available. If it is not, use a local data field. Use a process-level data field only as a last resort. Each loop instance tries to set the field with the index of that particular loop instance; but the field is common to all loop instances in the process and can only contain a single value. A task can successfully get and set the index in the same transaction, but if there is any delay in getting the index the field might have been overwritten by another instance. For a non-multi-instance task, this is the loop index for the nearest multi-instance embedded sub-process ancestor (defaulting to 0 if no multi-instance ancestor found). In nested multi-instance situations, the user can transfer an embedded sub-process loop index into an embedded sub-process local data field.
getActivityAttribute(String, String) : String | workItemId = bpm.process.getActivityAttribute('UserTask2','WorkItemId'); completer = bpm.process.getActivityAttribute('UserTask2','Completer'); | Returns value of attribute, for example, `430` Only WorkItemId and Completer are supported as attribute names.
Priority : Number | priority = bpm.process.priority; | 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.
auditLog (String message) | bpm.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 bpm.process.auditLog() method is not supported for in-memory process instances (service processes, pageflow processes or business services). If the bpm.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.
Long getWorkItemId() | workitemID = bpm.process.getWorkItemId() | Returns the work item for the current user task. Returns null if not called from a user task Complete script.
String getWorkItemCompleter() | WICompleter = bpm.process.getWorkItemCompleter() | Returns the GUID of the user that completed the work item. Returns null if not called from a user task Complete script.
List<String> getWorkItemParticipants() | participants = bpm.process.getWorkItemParticipants() | Returns an array of GUIDs for the participants for the work item. Returns null if not called from a user task Complete, Cancel, or Timeout script.

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO Business Studio™ - BPM Edition

Copyright © 2015-2023. Cloud Software Group, Inc. All Rights Reserved.