Core Triggers and Actions - Audit Trail Trigger

Fires when an audit trail event that matches certain criteria is reported to the audit trail. Useful when one workflow needs to wait for other workflows to reach milestones or for other workflows to finish.

The properties on this trigger act as search criteria on the audit trail. The wildcard character “*” can be used in any property.

This trigger waits for an audit trail event that matches its properties before firing. When it fires, this trigger returns the details about the specific audit trail event that caused it to fire.

Each time this trigger fires, it returns an audit trail event that is no older than its previous firing’s audit trail event.

Properties

Action Name

Sets the action name filter.

Engine Name

Sets the engine name filter.

Event Message

Sets the event message filter.

Event Name

Sets the event name filter.

Namespace

Sets the namespace filter.

Username

Sets the username filter.

Results

The Audit Trail Trigger returns its results in the flow context variable “result”. These results include the message associated with the audit trail event, the timestamp of the event, the user who generated the event, the engine where the event occurred, and (for events associated with workflows) the workflow name and trigger or action name that generated the event. You can access the audit trail trigger results from the following fields:

Flow Context Variable Field Java Type Description Prescript / Postscript Example
RESULT username String The name of the user that generated the event.
For audit trail events that are not generated by user actions, this will be empty.
String username = flowContext.get("RESULT").username; System.out.println("User: " + username);
RESULT timestamp Date The date that the audit trail event was recorded. Date timestamp = flowContext.get("RESULT").timestamp; System.out.println("Timestamp: " + timestamp);
RESULT actionName String The name of the trigger or action that generated this audit trail event.
For audit trail events that are not associated with an action, this will be empty.
String actionName = flowContext.get("RESULT").actionName; System.out.println("Action: " + actionName);
RESULT engineName String The name of the engine that reported this audit trail event. String engineName = flowContext.get("RESULT").engineName; System.out.println("Engine: " + engineName);
RESULT eventMessage String This audit trail event’s message. String eventMessage = flowContext.get("RESULT").eventMessage; System.out.println("Message: " + eventMessage);
RESULT eventName String This audit trail event’s name. String eventName = flowContext.get("RESULT").eventName; System.out.println("Event: " + eventName);
RESULT namespace String The fully-qualified name of the workflow that generated this audit trail event.
For audit trail events that are not associated with a workflow, this will be empty.
String namespace = flowContext.get("RESULT").namespace; System.out.println("Namespace: " + namespace);

Passing Results with a Runtime Data Map

You can use a Runtime Data Map to copy one of the result fields into a new variable (for future reference or to reuse the data later in the workflow).

To copy a result field, you can use a data map like:

Instruction 1 of 1