Class WorkflowTest

    • Field Detail

      • manager

        protected WorkflowManager manager
        Reference to the manager instance.
      • testTemplate

        protected WorkflowTemplate testTemplate
        Template instance created at each set up.
      • testWorkflow

        protected Workflow testWorkflow
        workflow instance created at each set up.
    • Constructor Detail

      • WorkflowTest

        public WorkflowTest()
    • Method Detail

      • setUp

        public void setUp()
                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testTemplateActionsSize

        public void testTemplateActionsSize()
        check actions template size
      • testActionsSize

        public void testActionsSize()
        check actions size
      • createWorkflowTemplate

        protected WorkflowTemplate createWorkflowTemplate​(User user)
        Creates a workflow template with given user assigned.
        Parameters:
        user - user instance to use for template
        Returns:
        new created template instance
      • createUser

        protected User createUser​(java.lang.String userName)
        Creates a user instance using given uid.
        Parameters:
        userName - user id used for user creation
        Returns:
        created user
      • createWorkflowTemplate

        protected WorkflowTemplate createWorkflowTemplate​(User owner,
                                                          java.lang.String code,
                                                          java.lang.String desc)
        Creates new workflow template using given user, code, and description.
        Parameters:
        owner - user assigned to new template
        code - code of new template
        desc - description assigned to template
        Returns:
        created template
      • createWorkflowTemplate

        protected WorkflowTemplate createWorkflowTemplate​(User owner,
                                                          java.lang.String code,
                                                          java.lang.String desc,
                                                          java.lang.String activationScript)
        Creates new workflow template using given user, code, description and activation script.
        Parameters:
        owner - user assigned to new template
        code - code of new template
        desc - description assigned to template
        activationScript - code of the activation script
        Returns:
        created template
      • createWorkflowActionTemplate

        protected WorkflowActionTemplate createWorkflowActionTemplate​(User user,
                                                                      java.lang.String code,
                                                                      EnumerationValue actionType,
                                                                      WorkflowTemplate workflow)
        Creates new action template.
        Parameters:
        user - user assigned to template
        code - code of template
        workflow - workflow assigned to action template
        Returns:
        created action template
      • createAutomatedWorkflowActionTemplate

        protected AutomatedWorkflowActionTemplate createAutomatedWorkflowActionTemplate​(User user,
                                                                                        java.lang.String code,
                                                                                        EnumerationValue actionType,
                                                                                        WorkflowTemplate workflow,
                                                                                        java.lang.Class jobClass)
        Creates new automated action template.
        Parameters:
        user - user assigned to template
        code - code of template
        workflow - workflow assigned to action template
        Returns:
        created action template
      • createWorkflowDecisionTemplate

        protected WorkflowDecisionTemplate createWorkflowDecisionTemplate​(java.lang.String code,
                                                                          WorkflowActionTemplate actionTemplate)
        Creates new decision template.
        Parameters:
        code - code of template
        actionTemplate - action template assigned to decision template
        Returns:
        created decision template
      • createWorkflowActionTemplateLinkTemplateRelation

        protected void createWorkflowActionTemplateLinkTemplateRelation​(WorkflowDecisionTemplate decisionTemplate,
                                                                        WorkflowActionTemplate toAction,
                                                                        java.lang.Boolean hasAndConnection)
        Parameters:
        decisionTemplate -
        toAction -
        hasAndConnection -
      • getAction

        protected WorkflowAction getAction​(java.lang.String code)
        Gets the action with given code from test workflow instance.
        Parameters:
        code - code of needed action
        Returns:
        action of test workflow with given code
      • getDecision

        protected WorkflowDecision getDecision​(java.lang.String code,
                                               WorkflowAction action)
        Gets the decision with given code from test workflow instance.
        Parameters:
        code - code of needed decision
        Returns:
        decision of test workflow with given code
      • getActionTemplate

        protected WorkflowActionTemplate getActionTemplate​(java.lang.String code)
        Gets the action template with given code from test workflow template.
        Parameters:
        code - code of needed action
        Returns:
        action template of test workflow template with given code