Class AbstractActivitiTestCase

    • Field Detail

      • deploymentIdFromDeploymentAnnotation

        protected java.lang.String deploymentIdFromDeploymentAnnotation
      • deploymentIdsForAutoCleanup

        protected java.util.List<java.lang.String> deploymentIdsForAutoCleanup
      • exception

        protected java.lang.Throwable exception
    • Constructor Detail

      • AbstractActivitiTestCase

        public AbstractActivitiTestCase()
    • Method Detail

      • setUp

        protected void setUp()
                      throws java.lang.Exception
        Overrides:
        setUp in class junit.framework.TestCase
        Throws:
        java.lang.Exception
      • initializeProcessEngine

        protected abstract void initializeProcessEngine()
      • closeDownProcessEngine

        protected void closeDownProcessEngine()
      • runBare

        public void runBare()
                     throws java.lang.Throwable
        Overrides:
        runBare in class junit.framework.TestCase
        Throws:
        java.lang.Throwable
      • validateHistoryData

        protected void validateHistoryData()
      • assertAndEnsureCleanDb

        protected void assertAndEnsureCleanDb()
                                       throws java.lang.Throwable
        Each test is assumed to clean up all DB content it entered. After a test method executed, this method scans all tables to see if the DB is completely clean. It throws AssertionFailed in case the DB is not clean. If the DB is not clean, it is cleaned by performing a create a drop.
        Throws:
        java.lang.Throwable
      • initializeServices

        protected void initializeServices()
      • assertProcessEnded

        public void assertProcessEnded​(java.lang.String processInstanceId)
      • waitForJobExecutorToProcessAllJobs

        public void waitForJobExecutorToProcessAllJobs​(long maxMillisToWait,
                                                       long intervalMillis)
      • waitForJobExecutorOnCondition

        public void waitForJobExecutorOnCondition​(long maxMillisToWait,
                                                  long intervalMillis,
                                                  java.util.concurrent.Callable<java.lang.Boolean> condition)
      • executeJobExecutorForTime

        public void executeJobExecutorForTime​(long maxMillisToWait,
                                              long intervalMillis)
      • waitForJobExecutorToProcessAllJobsAndExecutableTimerJobs

        public void waitForJobExecutorToProcessAllJobsAndExecutableTimerJobs​(long maxMillisToWait,
                                                                             long intervalMillis)
      • createOneTaskTestProcess

        public org.activiti.bpmn.model.BpmnModel createOneTaskTestProcess()
        Since the 'one task process' is used everywhere the actual process content doesn't matter, instead of copying around the BPMN 2.0 xml one could use this method which gives a BpmnModel version of the same process back.
      • createTwoTasksTestProcess

        public org.activiti.bpmn.model.BpmnModel createTwoTasksTestProcess()
      • deployOneTaskTestProcess

        public java.lang.String deployOneTaskTestProcess()
        Creates and deploys the one task process. See createOneTaskTestProcess().
        Returns:
        The process definition id (NOT the process definition key) of deployed one task process.
      • deployTwoTasksTestProcess

        public java.lang.String deployTwoTasksTestProcess()
      • assertHistoricTasksDeleteReason

        protected void assertHistoricTasksDeleteReason​(ProcessInstance processInstance,
                                                       java.lang.String expectedDeleteReason,
                                                       java.lang.String... taskNames)
      • assertHistoricActivitiesDeleteReason

        protected void assertHistoricActivitiesDeleteReason​(ProcessInstance processInstance,
                                                            java.lang.String expectedDeleteReason,
                                                            java.lang.String... activityIds)