Class ActionDef

  • All Implemented Interfaces:
    IDefJsonSerializer

    public class ActionDef
    extends Object
    implements IDefJsonSerializer
    Provides an immutable Action configuration class.

    Action JSON Configuration

     {
        "name" : "Handle Submission",
        "type" : "Task Wait",
        "serviceName" : "Review And Approval Handle Submission",
        "serviceVersion" : "0.1.0",
        "preCondition" : "$formDatMap.type == 'Home Insurance'"
     }
     
    Since:
    4.0.0
    • Constructor Detail

      • ActionDef

        public ActionDef​(Map actionMap,
                         String stepName,
                         String jobJson,
                         int sequence)
        Create an Action configuration object from the given action configuration map (JSON). A validation exception is returned if the Action JSON (String):
        • action must contain an non empty name
        • action must contain an valid type @see JobAction.TYPE_VALUES
        • action must contain an non empty serviceName
        • action can contain an expiryServiceName
        • if specified the expiryServiceName if specified cannot be empty.
        Parameters:
        actionMap - the action configuration map JSON (required)
        stepName - the name of the step (required)
        jobJson - this job definition JSON source (required)
        sequence - the job action sequence in the parent job step
      • ActionDef

        public ActionDef​(Map actionMap,
                         String stepName,
                         String jobJson,
                         int sequence,
                         boolean useJobJsonErrorChecking)
        Create an Action configuration object from the given action configuration map (JSON). A validation exception is returned if the Action JSON (String):
        • action must contain an non empty name
        • action must contain an valid type @see JobAction.TYPE_VALUES
        • action must contain an non empty serviceName
        • action can contain an expiryServiceName
        • if specified the expiryServiceName if specified cannot be empty.
        Parameters:
        actionMap - the action configuration map JSON (required)
        stepName - the name of the step (required)
        jobJson - this job definition JSON source (required)
        sequence - the job action sequence in the parent job step
        useJobJsonErrorChecking - boolean if set to true will use the JobJson Error Checking.
        Since:
        4.3.4
    • Method Detail

      • getName

        public String getName()
        Returns:
        the action name
      • getType

        public String getType()
        Returns:
        the action type
      • getSequence

        public int getSequence()
        Returns:
        the action sequence in the parent step
        Since:
        4.3.0
      • getServiceName

        public String getServiceName()
        Returns:
        the service name
      • getServiceVersion

        public String getServiceVersion()
        Returns:
        the service version String
        Since:
        5.1.0
      • getPreCondition

        public String getPreCondition()
        Returns:
        the action creation pre-condition
      • isRedirectNext

        public boolean isRedirectNext()
        Returns:
        true if the action should redirect the user to the next form
        Since:
        4.3.0
      • getPropertyValue

        public String getPropertyValue​(String propertyName)
        Parameters:
        propertyName - the name of the property
        Returns:
        the value(String) for the corresponding property name
      • isPropertyTemplateEvaluation

        public Boolean isPropertyTemplateEvaluation​(String propertyName)
        Return true if the property value should be evaluated with a Velocity template or false otherwise
        Parameters:
        propertyName - the name of the property
        Returns:
        true if the property value should be evaluated with a Velocity template or false otherwise
        Since:
        4.1.0
      • getPropertyMap

        public Map<String,​String> getPropertyMap()
        Returns:
        a map of step property values
      • toString

        public String toString()
        Overrides:
        toString in class Object
        Returns:
        the string representation of this object