Interface IWorkflowCondition<T extends IWorkflowObject>
- Type Parameters:
T
- type of the target object, seeICallContext.getTarget()
; useIWorkflowObject
if the condition is general, or specific prototype interface if the condition is specific for that prototype
- All Superinterfaces:
ICondition<T>
Workflow conditions assigned to a particular workflow action are
checked to determine, whether the action is permitted at given time.
The conditions determine, whether the workflow action is even listed in the set of available actions.
The custom conditions can be contributed using the
com.polarion.alm.tracker.workflow.conditions
configuration
point. The contribution looks like this:
<contribution configuration-id="com.polarion.alm.tracker.workflow.conditions"> <condition name="Your-unique-condition-name" clazz="com.your.ConditionClassName" prototype="prototype like WorkItem or *" /> </contribution>
Important Note: When condition Object implements this interface, then inherited method ICondition.passesCondition(ICallContext, IArguments)
is not used anymore. In other words, if condition passes or not, depends on result of the passesConditionWithFailureMessage(ICallContext, IArguments)
- Since:
- 3.9.0
-
Method Summary
Modifier and TypeMethodDescriptionpassesConditionWithFailureMessage
(ICallContext<T> context, IArguments arguments) Checks, whether the given workflow Action is permitted.Methods inherited from interface com.polarion.alm.tracker.workflow.ICondition
passesCondition
-
Method Details
-
passesConditionWithFailureMessage
@Nullable String passesConditionWithFailureMessage(@NotNull ICallContext<T> context, @NotNull IArguments arguments) Checks, whether the given workflow Action is permitted.- Parameters:
context
- theICallContext
object representing the context for this executionarguments
- theIArguments
object representing the arguments specified in the workflow configuration- Returns:
null
if the action is allowed or message which describes, why condition is not passed.
-