Me Functions
Me Functions
Overview
The Me object encompasses a group of functions that retrieve information related to the active case, task, or element where the rule is executed. This means that the information retrieved by the object is context-dependent, referring to the process, case, and task or element where the function is invoked. The Me object represents the Workitem, or the active BPMN element in the rule execution.
For example, if you have two processes and execute a rule using the Me object at different elements, the information retrieved will differ depending on where the rule is executed. In one case, the rule might be executed in a task, and in another case, it might be executed in a timer of a different process. Each invocation contains the relative information of the element based on its context.
The following figure explains the difference in both situations.
See our Bizagi Business Rules API
Me Object Functions
Within the Me object, several functions are available to retrieve different types of information about the item where the rule is invoked. The following table lists the functions you can use within the Me object.
FUNCTION | DESCRIPTION | SYNTAX |
---|---|---|
Me | This function returns the current object. | Me |
Assignees | This function returns the current assignee. | Me.Assignees |
Case | This function returns the properties of the current case. | Me.Case |
Case Creator | This function returns the case creator. | Me.Case.Creator |
Organization | Returns the organization of the current case. | Me.Case.Organization |
ProcessDefinition | Returns the metadata of the current case. | Me.Case.ProcessDefinition |
WorkingCredential | This function returns the current user's credentials for the case. | Me.Case.WorkingCredential |
Context | This function is useful in rules that handle a different context than the Process entity. | Me.Context |
Task | This function returns the metadata of the current activity/workitem. | Me.Task |