en en en en en en en en en zh la en en en en en en en en en en en en en en en en en zh en en la en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en pt en sv fr fr en en en en zh la en en en en en en en en en en en
At runtime, the parameter $context will be injected into an execution context that allows the retrieval of some information from the execution as well as adding notifications to the context.
Some properties of the $context are relevant to all types of logic (i.e., Decision Table, Natural Language, Flow, etc.), but some of them are specific to a particular type of logic.
This refers to the name of the logic document. This is the name attribute of the root tag of the logic document. During the load, if ruleset is used it will be the name of the file that has the logic content.
In both Decision Table and Natural language, this refers to the rule name.
For example, when we have a Rule Name column, we can use the value in Rule Name using $context.LogicName.
In Natural Language, a when-then-end logic can have a UID attribute and is going to be set in the context as the business rule unique identifier.
This property holds the exception on the execution.
This information (properties) is relevant only in the execution of a Workflow.
When a workflow instance is loaded or stored this refers to the persistent identifier of the instance in the database.
On both human and receive tasks, this refers to the outcome of a chosen task
This is the history of Flow execution, which is an instance of IHistoryQuery
You can use built-in functions to write and retrieve notifications.
Built-in functions are not supported in JavaScript Engine, instead, use below $context method for JavaScript environment.