Class JobTaskAssignActionBuilder


  • public class JobTaskAssignActionBuilder
    extends Object
    Provides a Job Task Assign Action Builder class using fluent interface design. Dynamically creates a JobAction or service type @see ServiceDefinition.SERVICE_TYPE_JOB_TASK_ASSIGN
    Since:
    4.3.4
    • Constructor Detail

      • JobTaskAssignActionBuilder

        public JobTaskAssignActionBuilder​(JobAction jobAction)
        Creates a JobTaskAssignActionBuilder from a related JobTaskAssign JobAction in the same JobStep This will use the sequence of the JobAction.
        Parameters:
        jobAction - a JobAction of type @see com.avoka.fc.core.entity.ServiceDefinition.SERVICE_TYPE_JOB_TASK_ASSIGN jobAction.jobStep instance you want to create the Task Job Action in. The jobStep.status must be "In Progress" @see com.avoka.fc.core.entity.JobStep.STATUS_IN_PROGRESS. The new job action will be assigned the same sequence number as the JobAction passed in
      • JobTaskAssignActionBuilder

        public JobTaskAssignActionBuilder​(JobStep jobStep)
        Construct a JobTaskAssignActionBuilder
        Parameters:
        jobStep - the JobStep that you are wanting to create the new Job Action in. The jobStep.status must be "In Progress" @see com.avoka.fc.core.entity.JobStep.STATUS_IN_PROGRESS.
    • Method Detail

      • name

        public JobTaskAssignActionBuilder name​(String name)
        Sets the jobAction name
        Parameters:
        name - the String name for the JobAction
        Returns:
        the JobTaskAssignBuilder
      • redirectNext

        public JobTaskAssignActionBuilder redirectNext​(String preCondition)
        Sets the redirectNext Job Action
        Parameters:
        preCondition - the String preCondition for the JobAction
        Returns:
        the JobTaskAssignBuilder
      • sequence

        public JobTaskAssignActionBuilder sequence​(int sequence)
        Sets the sequence for the Job Action
        Parameters:
        sequence - Integer value (optional)
        Returns:
        the JobTaskAssignBuilder
      • repeatIndex

        public JobTaskAssignActionBuilder repeatIndex​(int repeatIndex)
        Sets the assignRrepeatIndex for the Job Action
        Parameters:
        repeatIndex - Integer value (optional)
        Returns:
        the JobTaskAssignBuilder
      • redirectNext

        public JobTaskAssignActionBuilder redirectNext​(boolean redirectNext)
        Sets the redirectNext value for the JobAction
        Parameters:
        redirectNext - boolean (Optional default value is false)
        Returns:
        the JobTaskAssignBuilder
      • property

        public JobTaskAssignActionBuilder property​(String name,
                                                   String value)
        Adds a action property name-value pair to the propertyList for the Job Action
        Parameters:
        name - the property name
        value - the property value
        Returns:
        the JobTaskAssignBuilder
      • property

        public JobTaskAssignActionBuilder property​(String name,
                                                   String value,
                                                   String template)
        Adds a action property name-value pair to the propertyList for the Job Action
        Parameters:
        name - the property name
        value - the property value
        template - the property template
        Returns:
        the JobTaskAssignBuilder
      • propertyList

        public JobTaskAssignActionBuilder propertyList​(List<Map<String,​String>> propertyList,
                                                       boolean isReplace)
        Iterates over the propertyList parameter, list items are added to the actionProperty List for the Job Action
        Parameters:
        propertyList - the provided List<Map<String,String>> that is added to the action property list for the Job Action
        isReplace - if set to true it will empty the contents of the action property list for the Job Action
        Returns:
        the JobTaskAssignBuilder
      • execute

        public JobAction execute()
        Validates the inputs and builds the job action
        Returns:
        the new JobTaskAssign JobAction