Interface IProcessEvaluator

All Known Implementing Classes:
ProcessEvaluator

public interface IProcessEvaluator
Interface for the process evaluator as exposed to the node handlers.
Since:
7.1
Author:
O. Kerpershoek
  • Method Details

    • continueFromNode

      void continueFromNode(ITaskModel task, String exitState, boolean caseDataChanged)
      This method will assume the task as completed, and continue the process from that point.
      Parameters:
      task - The task that was completed, and from which the processing should continue.
      exitState - The exit state/result of the completed task.
      caseDataChanged - true if case data may have been changed, if true then conditional nodes and adhoc nodes will also be reevaluated
      Throws:
      AppException - This exception is thrown when the process could not continue.
    • continueWithEvent

      void continueWithEvent(IMessageEvent messageEvent)
      This method will check if any task is waiting for an event, and activated those tasks if needed. An event that has been triggered will stay active during the evaluation, but will be discarded once this evaluator has completed.
      Parameters:
      messageEvent - The definition of the event that occurred.
      Throws:
      AppException - This exception is thrown when the event could not be processed.
    • continueWithCaseDataChange

      void continueWithCaseDataChange()
      This method may be invoked to force the process to be evaluated after a change in the case data. A change in case data is mainly relevant for adhoc tasks and condition nodes.
      Throws:
      AppException - This exception is thrown when the evaluation of the process failed.
    • evaluate

      IValue evaluate(IExpression expression)
      This method will evaluate the expression and return its result.
      Parameters:
      expression - The expression that should be evaluated.
      Returns:
      The result of the expression.
      Throws:
      RuleEngineException - This exception is thrown when the expression could not be evaluated.
    • evaluate

      boolean evaluate(ICondition condition, boolean defaultResult)
      This method will evaluate the condition and returns it's boolean result. If the condition evaluates to false, or if no condition was available (null), the default result will be returned.
      Parameters:
      condition - The condition that should be evaluated (may be null).
      defaultResult - The result that should be returned if the condition could not be evaluated.
      Returns:
      Boolean containing the result of the condition.
      Throws:
      RuleEngineException - This exception is thrown when the condition could not be evaluated.
    • evaluate

      IValue evaluate(AttributeReference attributeReference)
      This method will the evaluate the value of the given attribute reference.
      Parameters:
      attributeReference - The attribute reference that should be evaluated, may not be null
      Returns:
      IValue representing the value, never null
    • evaluateDecision

      DMNDecisionTree evaluateDecision(String description, IExpression expression)
      This method will evaluate the expression and return its result as a DMN decision tree.
      Parameters:
      description - the description
      expression - The expression that should be evaluated.
      Returns:
      The result of the decision.
      Throws:
      RuleEngineException - This exception is thrown when the expression could not be evaluated.
    • evaluateDecision

      DMNDecisionTree evaluateDecision(String description, ICondition condition, boolean defaultResult)
      This method will evaluate the condition and returns its boolean result as a DMN decision tree. If the condition evaluates to false, or if no condition was available (null), the default result will be returned.
      Parameters:
      description - the description
      condition - The condition that should be evaluated (may be null).
      defaultResult - The result that should be returned if the condition could not be evaluated.
      Returns:
      DMNDecisionTree containing the result of the decision.
      Throws:
      RuleEngineException - This exception is thrown when the condition could not be evaluated.
    • isMessageEventTriggered

      boolean isMessageEventTriggered(String messageEventName)
      This method returns a boolean indicating if the specified event has been raised/signaled/triggered during the current process evaluation.
      Parameters:
      messageEventName - The event that should be checked.
      Returns:
      Boolean indicating if the event was triggered during the current evaluation.
    • isProcessCaseLocked

      boolean isProcessCaseLocked()
      Checks whether the process case being evaluated is locked.
      Returns:
      true if the case is locked, false otherwise
      Since:
      9.6
    • getTriggeredMessageEvent

      TriggeredMessageEvent getTriggeredMessageEvent(String messageEventName)
      This method returns the content of a triggered event.
      Parameters:
      messageEventName - The name of the message event.
      Returns:
      The data content of the messageevent, or null.
    • handleCaseUpdates

      boolean handleCaseUpdates(IProcessCaseUpdates updates)
      This method allows updates to the case model
      Parameters:
      updates - Interface handling the updates,
      Returns:
      Indicator whether the case data was updated.
      Throws:
      ProcessException - general process exception
      UnknownAttributeException - when an attribute is unknown
      UnknownEntityException - when an entity is unknown
    • handleCaseUpdates

      boolean handleCaseUpdates(IProcessCaseUpdates updates, ICaseUpdatesContext context)
      This method allows updates to the case model
      Parameters:
      updates - Interface handling the updates,
      context - interface to provide context about the updates
      Returns:
      Indicator whether the case data was updated.
      Throws:
      ProcessException - general process exception
      UnknownAttributeException - when an attribute is unknown
      UnknownEntityException - when an entity is unknown
    • notifyCaseDataChanged

      void notifyCaseDataChanged()
      Notify the evaluator that case data has been changed so that cached data may be cleared
    • notifyAutomaticTaskFinished

      void notifyAutomaticTaskFinished()
      Notify the evaluator that the execution of an automatic task has finished so that it may queue delayed events created by the automatic task.
    • getUserData

      IUserData getUserData()
      Returns:
      The current active user
      Since:
      9.2
    • getTraceEngine

      ITraceEngine getTraceEngine()
      Returns:
      The trace engine
      Since:
      9.2
    • getApplicationId

      String getApplicationId()
      Returns:
      The application id of the current applicaiton
      Since:
      9.2
    • getProcessName

      String getProcessName()
      Returns:
      The name of the process for this evaluator, may be null if the case was not started for a predefined process
      Since:
      9.2
    • getProcessCaseId

      long getProcessCaseId()
      Returns:
      the ID of the process for this evaluator
      Since:
      9.6