Class MicroflowExecutionContext

java.lang.Object
com.seagullsw.appinterface.server.backend.hostconnector3.MicroflowExecutionContext

public class MicroflowExecutionContext extends Object
An object that represents a microflow execution, provides access to things like input and output variables.
  • Constructor Details

    • MicroflowExecutionContext

      public MicroflowExecutionContext(com.seagullsw.appinterface.server.backend.hostconnector3.BasicHCTransaction basicHCTransaction)
      Constructor is not typically used because the system provides instances.
  • Method Details

    • getFieldVariable

      public com.seagullsw.appinterface.model.data.Field<?> getFieldVariable(String variableName) throws com.seagullsw.appinterface.server.backend.BackEndException
      Gets a Field variable. First, the input variables are examined for the named variable. If not an input variable, then output variables are examined. If not an output variable, then so-called transaction variables are examined.
      Parameters:
      variableName - The name of the variable.
      Returns:
      the found Field, or null if not found.
      Throws:
      com.seagullsw.appinterface.server.backend.BackEndException - If anything goes wrong on the host system, such as losing the connection.
    • getFieldVariableValue

      public String getFieldVariableValue(String variableName) throws com.seagullsw.appinterface.server.backend.BackEndException
      Gets a Field variable value as a String. First, the input variables are examined for the named variable. If not an input variable, then output variables are examined. If not an output variable, then so-called transaction variables are examined.
      Parameters:
      variableName - The name of the variable.
      Returns:
      the found Field's value as a String, or null if not found.
      Throws:
      com.seagullsw.appinterface.server.backend.BackEndException - If anything goes wrong on the host system, such as losing the connection.
    • getStatusDetailsMap

      public SortedMap<String,String> getStatusDetailsMap()
      Gets the map of status details, empty by default.
      Returns:
      the map of status details.
    • getTimeLevelInMilliseconds

      public long getTimeLevelInMilliseconds(int delayLevel)
      Gets the time in milliseconds corresponding to the given delay level. The times are read from the connector configuration file.
      Parameters:
      delayLevel - The time delay level, between 0 and 9.
      Returns:
      the milliseconds setting for the delayLevel'th time delay.
    • getVariable

      public com.seagullsw.appinterface.model.data.DataElement getVariable(String variableName) throws com.seagullsw.appinterface.server.backend.BackEndException
      Gets a variable -- a Field, Structure, or Sequence. First, the input variables are examined for the named variable. If not an input variable, then output variables are examined. If not an output variable, then so-called transaction variables are examined.
      Parameters:
      variableName - The name of the variable.
      Returns:
      the found element, or null if not found.
      Throws:
      com.seagullsw.appinterface.server.backend.BackEndException - If anything goes wrong on the host system, such as losing the connection.
    • setStatusCode

      public MicroflowExecutionContext setStatusCode(int statusCode)
      Sets the standardized public status code, usually an HTTP status code. This is optional.
      Parameters:
      statusCode - the standardized public status code, usually an HTTP status code.
      Returns:
      this
    • toString

      public String toString()
      Returns a string suitable for debug logging.
      Overrides:
      toString in class Object
    • unwrap

      public com.seagullsw.appinterface.server.backend.hostconnector3.BasicHCTransaction unwrap()
      For internal use only. Returns the underlying transaction object.