Interface IWorkflowCondition<T extends IWorkflowObject>

Type Parameters:
T - type of the target object, see ICallContext.getTarget(); use IWorkflowObject if the condition is general, or specific prototype interface if the condition is specific for that prototype
All Superinterfaces:
ICondition<T>

public interface IWorkflowCondition<T extends IWorkflowObject> extends 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 Details

    • passesConditionWithFailureMessage

      @Nullable String passesConditionWithFailureMessage(@NotNull ICallContext<T> context, @NotNull IArguments arguments)
      Checks, whether the given workflow Action is permitted.
      Parameters:
      context - the ICallContext object representing the context for this execution
      arguments - the IArguments 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.