Class StateTask

All Implemented Interfaces:
HasHandlers

public class StateTask extends Task
StateTask can either copy fields of Process.state to other fields, or apply hardcoded values to Process.state via value.

Some examples:

  • inputField: "a", outputField: "b" - copies "a" to "b"
  • inputField: "a", outputField: "b", type: "integer" - copies "a" to "b" converting "a" to an integer
  • inputFieldList: ["a","b"], outputField: ["c","d"] - copies "a" and "b" to "c" and "d" respectively.
  • Constructor Details

    • StateTask

      public StateTask()
    • StateTask

      public StateTask(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static StateTask getOrCreateRef(JavaScriptObject jsObj)
    • create

      public JavaScriptObject create()
      Overrides:
      create in class Task
    • setFailureElement

      public StateTask setFailureElement(String failureElement) throws IllegalStateException
      ID of the next sequence or element to proceed to if a failure condition arises, such as the output data not being convertible to the target type.
      Parameters:
      failureElement - New failureElement value. Default value is null
      Returns:
      StateTask instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getFailureElement

      public String getFailureElement()
      ID of the next sequence or element to proceed to if a failure condition arises, such as the output data not being convertible to the target type.
      Returns:
      Current failureElement value. Default value is null
    • setFieldListsLengthMismatchMessage

      public StateTask setFieldListsLengthMismatchMessage(String fieldListsLengthMismatchMessage) throws IllegalStateException
      The default message to be reported with getInvalidTaskMessage() when the inputFieldList and outputFieldList properties do not have the same length.
      Parameters:
      fieldListsLengthMismatchMessage - New fieldListsLengthMismatchMessage value. Default value is "outputFieldList should have same number of parameters as inputFieldList"
      Returns:
      StateTask instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getFieldListsLengthMismatchMessage

      public String getFieldListsLengthMismatchMessage()
      The default message to be reported with getInvalidTaskMessage() when the inputFieldList and outputFieldList properties do not have the same length.
      Returns:
      Current fieldListsLengthMismatchMessage value. Default value is "outputFieldList should have same number of parameters as inputFieldList"
    • setPassThruOutput

      public StateTask setPassThruOutput(Boolean passThruOutput) throws IllegalStateException
      Does this processElement pass through output from the last executed task (i.e. transient state)?

      See taskInputExpressions for details on the transient state outputs.

      Note that this property does not affect the task at all but is an indicator to the user and to the workflow editor of the behavior of the task as coded (See Process.passThruTaskOutput()).

      Overrides:
      setPassThruOutput in class ProcessElement
      Parameters:
      passThruOutput - New passThruOutput value. Default value is false
      Returns:
      StateTask instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getPassThruOutput

      public Boolean getPassThruOutput()
      Does this processElement pass through output from the last executed task (i.e. transient state)?

      See taskInputExpressions for details on the transient state outputs.

      Note that this property does not affect the task at all but is an indicator to the user and to the workflow editor of the behavior of the task as coded (See Process.passThruTaskOutput()).

      Overrides:
      getPassThruOutput in class ProcessElement
      Returns:
      Current passThruOutput value. Default value is false