Interface IWorkflowTriggerLocator
public interface IWorkflowTriggerLocator
Handler for locating triggers when a task is executed. Triggers are uniquely identifier by their
ID, use the ID if possible. The name is unique at
most within a WorkflowTask - occasionally there may be different triggers with the same name. The
TriggerKey is guaranteed to be unique within a WorkflowProcess.- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptionbyId(long triggerId) Finds the trigger by the given ID in the current workflow execution context.default List<WorkflowTrigger> byIds(long... triggerIds) Finds the triggers by the given ID in the current workflow execution context.default List<WorkflowTrigger> Finds the triggers by the given ID in the current workflow execution context.default WorkflowTriggerbyUuid(TriggerKey triggerKey) Finds the trigger by the given UUID in the current workflow execution context.Finds the trigger by the given UUID in the current workflow execution context.default WorkflowTriggerDeprecated.default List<WorkflowTrigger> byUuids(TriggerKey... triggerKeys) Finds the triggers by the given UUID in the current workflow execution context.default List<WorkflowTrigger> byUuids(Iterable<TriggerKey> triggerKeys) Finds the triggers by the given UUID in the current workflow execution context.current()Gets the workflow trigger that initiated the current task execution, ornullwhen no trigger is currently beingcurrentByName(String name) Finds a trigger that is firing currently and possesses the given name.currentByUuid(UUID triggerUuid) Finds a trigger that is firing currently and possesses the given UUID.currents()Gets a list of all triggers currently firing, ordered by the time their execution was started, in order from the node trigger that fired most recently to the trigger that fired least recently.firedByName(String triggerName) Finds a fired trigger with the given name.default List<WorkflowTrigger> firedByNames(Iterable<String> triggerNames) Finds fired triggers by the given names in the current workflow execution context.default List<WorkflowTrigger> firedByNames(String... triggerNames) Finds fired triggers by the given names in the current workflow execution context.default booleanisCurrentlyFiring(WorkflowTrigger trigger) Whether the given trigger initiated the current task execution.default booleanisCurrentlyFiring(TriggerKey triggerKey) Whether the trigger with the given key initiated the current task execution.booleanisCurrentlyFiring(UUID triggerUuid) Whether the trigger with the given UUID initiated the current task execution.default booleanisCurrentlyFiring(UUID taskUuid, UUID triggerUuid) Deprecated.UseisCurrentlyFiring(UUID)instead.props(WorkflowTrigger trigger) Retrieves the properties of the given trigger and deserializes them into the trigger's properties model.default <T> Tprops(WorkflowTrigger trigger, Class<T> expectedType) Retrieves the properties of the given trigger and deserializes them into the trigger's properties model.
-
Method Details
-
byId
Finds the trigger by the given ID in the current workflow execution context.- Parameters:
triggerId- ID of the trigger.- Returns:
- The trigger with the given ID, or
nullwhen no such trigger exists.
-
byIds
Finds the triggers by the given ID in the current workflow execution context.- Parameters:
triggerIds- IDs of the triggers.- Returns:
- The triggers with the given IDs, possibly an empty list when no triggers were found.
-
byIds
Finds the triggers by the given ID in the current workflow execution context.- Parameters:
triggerIds- IDs of the triggers.- Returns:
- The triggers with the given ID, possibly an empty list when no triggers were found.
-
byUuid
Finds the trigger by the given UUID in the current workflow execution context.- Parameters:
triggerKey- UUID of the trigger to find, and the UUID of the task to which it belongs. Note that triggers in different tasks may have the same UUID.- Returns:
- The trigger with the given UUID, or
nullwhen no such trigger exists.
-
byUuid
Deprecated.UsebyUuid(UUID)instead. The task UUID is not needed anymore, as the trigger UUID is already unique.Finds the trigger by the given UUID in the current workflow execution context.- Parameters:
taskUuid- UUID of the task of the trigger to find.triggerUuid- UUID of the trigger to find.- Returns:
- The trigger with the given UUID, or
nullwhen no such trigger exists.
-
byUuid
Finds the trigger by the given UUID in the current workflow execution context.- Parameters:
triggerUuid- UUID of the trigger to find.- Returns:
- The trigger with the given UUID, or
nullwhen no such trigger exists.
-
byUuids
Finds the triggers by the given UUID in the current workflow execution context.- Parameters:
triggerKeys- UUIDs of the triggers to find.- Returns:
- The triggers with the given UUIDs, possibly an empty list when no triggers were found.
-
byUuids
Finds the triggers by the given UUID in the current workflow execution context.- Parameters:
triggerKeys- UUIDs of the triggers to find.- Returns:
- The triggers with the given UUIDs, possibly an empty list when no triggers were found.
-
current
WorkflowTrigger current()Gets the workflow trigger that initiated the current task execution, ornullwhen no trigger is currently being- Returns:
- The trigger that initiated the current task execution.
-
currentByName
Finds a trigger that is firing currently and possesses the given name. When multiple such triggers exists, the trigger that fired most recently is returned.- Parameters:
name- Name of a trigger.- Returns:
- The most recently fired trigger with the given name, that is still firing.
-
currentByUuid
Finds a trigger that is firing currently and possesses the given UUID. When multiple such triggers exists, the trigger that fired most recently is returned.- Parameters:
triggerUuid- UUID of a trigger.- Returns:
- The most recently fired trigger with the given UUID, that is still firing.
-
currents
List<WorkflowTrigger> currents()Gets a list of all triggers currently firing, ordered by the time their execution was started, in order from the node trigger that fired most recently to the trigger that fired least recently.- Returns:
- A list of all triggers currently firing.
-
firedByName
Finds a fired trigger with the given name. If multiple triggers with the same name exist, returns the trigger that most recently fired.- Parameters:
triggerName- Name of a trigger.- Returns:
- The most recently fired trigger with the given name, or
nullwhen no such trigger exists.
-
firedByNames
Finds fired triggers by the given names in the current workflow execution context. If multiple triggers with the same name exists, returns the trigger that most recently fired.- Parameters:
triggerNames- Names of the triggers to find.- Returns:
- The triggers with the given names, possibly an empty list when no triggers were found.
-
firedByNames
Finds fired triggers by the given names in the current workflow execution context. If multiple triggers with the same name exists, returns the trigger that most recently fired.- Parameters:
triggerNames- Names of the triggers to find.- Returns:
- Fired triggers with the given names, possibly an empty list when no triggers were found.
-
isCurrentlyFiring
Whether the trigger with the given key initiated the current task execution.- Parameters:
triggerKey- The key of a trigger to check.- Returns:
- Whether the given trigger is currently firing.
-
isCurrentlyFiring
Deprecated.UseisCurrentlyFiring(UUID)instead. The task UUID is not needed anymore, as the trigger UUID is already unique.Whether the trigger with the given UUID initiated the current task execution.- Parameters:
taskUuid- UUID of the trigger's task.triggerUuid- UUID of a trigger to check.- Returns:
- Whether the given trigger is currently firing.
-
isCurrentlyFiring
Whether the trigger with the given UUID initiated the current task execution.- Parameters:
triggerUuid- UUID of a trigger to check.- Returns:
- Whether the given trigger is currently firing.
-
isCurrentlyFiring
Whether the given trigger initiated the current task execution.- Parameters:
trigger- A trigger to check.- Returns:
- Whether the given trigger is currently firing.
-
props
Retrieves the properties of the given trigger and deserializes them into the trigger's properties model.- Parameters:
trigger- Trigger to process.- Returns:
- The deserialized properties model instance
-
props
Retrieves the properties of the given trigger and deserializes them into the trigger's properties model.- Type Parameters:
T- Type of the expected properties model.- Parameters:
trigger- Trigger to process.expectedType- Expected type of the properties model.- Returns:
- The deserialized properties model instance, or
nullwhen the properties model is not of the expected type.
-
byUuid(UUID)instead.