Class WorkflowTest

All Implemented Interfaces:
JaloSessionHolder
Direct Known Subclasses:
WorkflowAutomatedTest, WorkflowBasicTest, WorkflowIterationTest

@DemoTest public class WorkflowTest extends ServicelayerTransactionalBaseTest
Test for extension Workflow.
  • Field Details

  • Constructor Details

    • WorkflowTest

      public WorkflowTest()
  • Method Details

    • setUp

      public void setUp() throws Exception
      Throws:
      Exception
    • testTemplateActionsSize

      public void testTemplateActionsSize()
      check actions template size
    • testActionsSize

      public void testActionsSize()
      check actions size
    • createWorkflowTemplate

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

      protected UserModel createUser(String userName)
      Creates a user instance using given uid.
      Parameters:
      userName - user id used for user creation
      Returns:
      created user
    • clearCache

      protected void clearCache()
    • createWorkflowTemplate

      protected WorkflowTemplateModel createWorkflowTemplate(UserModel owner, String code, 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 WorkflowTemplateModel createWorkflowTemplate(UserModel owner, String code, String desc, 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
    • createWorkflowActionTemplateModel

      protected WorkflowActionTemplateModel createWorkflowActionTemplateModel(UserModel user, String code, WorkflowActionType actionType, WorkflowTemplateModel 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
    • createAutomatedWorkflowActionTemplateModel

      protected AutomatedWorkflowActionTemplateModel createAutomatedWorkflowActionTemplateModel(UserModel user, String code, WorkflowActionType actionType, WorkflowTemplateModel workflow, 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 WorkflowDecisionTemplateModel createWorkflowDecisionTemplate(String code, WorkflowActionTemplateModel actionTemplate)
      Creates new decision template.
      Parameters:
      code - code of template
      actionTemplate - action template assigned to decision template
      Returns:
      created decision template
    • createWorkflowActionTemplateModelLinkTemplateRelation

      protected void createWorkflowActionTemplateModelLinkTemplateRelation(WorkflowDecisionTemplateModel decisionTemplate, WorkflowActionTemplateModel toAction, Boolean hasAndConnection)
      Parameters:
      decisionTemplate -
      toAction -
      hasAndConnection -
    • getAction

      protected WorkflowActionModel getAction(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 WorkflowDecisionModel getDecision(String code, WorkflowActionModel 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 WorkflowActionTemplateModel getActionTemplate(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