org.camunda.bpm.engine.impl.scripting
Class ScriptCondition

java.lang.Object
  extended by org.camunda.bpm.engine.impl.scripting.ScriptCondition
All Implemented Interfaces:
Condition

public class ScriptCondition
extends Object
implements Condition

A Condition which invokes a ExecutableScript when evaluated.

Author:
Sebastian Menski

Field Summary
protected  ExecutableScript script
           
 
Constructor Summary
ScriptCondition(ExecutableScript script)
           
 
Method Summary
 boolean evaluate(DelegateExecution execution)
          Evaluates the condition and returns the result.
 boolean evaluate(VariableScope scope, DelegateExecution execution)
          Evaluates the condition and returns the result.
 ExecutableScript getScript()
           
 boolean tryEvaluate(VariableScope scope, DelegateExecution execution)
          Tries to evaluate the condition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

script

protected final ExecutableScript script
Constructor Detail

ScriptCondition

public ScriptCondition(ExecutableScript script)
Method Detail

evaluate

public boolean evaluate(DelegateExecution execution)
Description copied from interface: Condition
Evaluates the condition and returns the result. The scope will be the same as the execution.

Specified by:
evaluate in interface Condition
Parameters:
execution - the execution which is used to evaluate the condition
Returns:
the result

evaluate

public boolean evaluate(VariableScope scope,
                        DelegateExecution execution)
Description copied from interface: Condition
Evaluates the condition and returns the result.

Specified by:
evaluate in interface Condition
Parameters:
scope - the variable scope which can differ of the execution
execution - the execution which is used to evaluate the condition
Returns:
the result

tryEvaluate

public boolean tryEvaluate(VariableScope scope,
                           DelegateExecution execution)
Description copied from interface: Condition
Tries to evaluate the condition. If the property which is used in the condition does not exist false will be returned.

Specified by:
tryEvaluate in interface Condition
Parameters:
scope - the variable scope which can differ of the execution
execution - the execution which is used to evaluate the condition
Returns:
the result

getScript

public ExecutableScript getScript()


Copyright © 2017 camunda services GmbH. All rights reserved.