All Implemented Interfaces:
Application, OnDemandValueProcessor.ValueProvider

public class ValueStateMachine extends StateMachine
A StateMachine, which is Activate, when certain value is reacched, or bz monitoring it or by setting it.
Author:
igor@scictrl.com
  • Constructor Details

    • ValueStateMachine

      public ValueStateMachine()

      Constructor for ValueStateMachine.

  • Method Details

    • configure

      public void configure(String name, org.apache.commons.configuration.HierarchicalConfiguration config)
      Configures the internals of this application, provides reference to configuration with root inside applications tag. Server structure is not yet initialized, so does not have reference to Database, the Database reference will be available during activate call.
      Specified by:
      configure in interface Application
      Overrides:
      configure in class StateMachine
      Parameters:
      name - a String object
      config - configuration with room inside application tag.
    • notifyLinkChange

      protected void notifyLinkChange(String name)
      This method is called whenever record value changed for any record, which belongs to this application (it was added to the application AbstractApplication.addRecord(String, Record)). Implementation class should override this method to intercept the update.
      Overrides:
      notifyLinkChange in class AbstractApplication
      Parameters:
      name - the name of record, that triggered change.
    • stateMachineActivate

      public void stateMachineActivate(boolean dryrun)

      Activates state machine. If this state machine is in dry-run mode or dry-run parameter with true is called, then this step is activate in dry-run mode.

      Overrides:
      stateMachineActivate in class StateMachine
      Parameters:
      dryrun - dry-run mode request
    • stateMachinePrepare

      public void stateMachinePrepare()

      stateMachinePrepare.

      Overrides:
      stateMachinePrepare in class StateMachine
    • stateMachineAbort

      public void stateMachineAbort()

      stateMachineAbort.

      Overrides:
      stateMachineAbort in class StateMachine
    • getConditionActive

      public Checks.Check getConditionActive()

      Getter for the field conditionActive.

      Returns:
      a Checks.Check object
    • getConditionSet

      public Object getConditionSet()

      Getter for the field conditionSet.

      Returns:
      a Object object