org.apache.lenya.workflow
Interface Condition

All Known Implementing Classes:
RoleCondition

public interface Condition

A condition can prevent a transition from firing, based on the current situation. Examples:


Method Summary
 boolean isComplied(Workflow workflow, Workflowable workflowable)
          Returns if the condition is complied in a certain situation.
 void setExpression(java.lang.String expression)
          Sets the expression for this condition.
 

Method Detail

isComplied

boolean isComplied(Workflow workflow,
                   Workflowable workflowable)
                   throws WorkflowException
Returns if the condition is complied in a certain situation.

Parameters:
workflow - The workflow to use.
workflowable - The workflowable to check the condition on.
Returns:
if the condition is complied.
Throws:
WorkflowException - when the expression could not be evaluated.

setExpression

void setExpression(java.lang.String expression)
                   throws WorkflowException
Sets the expression for this condition.

Parameters:
expression - The expression.
Throws:
WorkflowException - when the expression is not valid.


Copyright 1999-2006 Apache Software Foundation. All Rights Reserved.