assertNotNull(jobGet.getActivitiJobXml()); assertEquals(activitiXml, jobGet.getActivitiJobXml()); assertTrue(jobGet.getCompletedWorkflowSteps().size() > 0); assertEquals("usertask1", jobGet.getCurrentWorkflowStep().getId()); assertNull(jobGet.getActivitiJobXml()); assertTrue(CollectionUtils.isEmpty(jobGet.getCompletedWorkflowSteps())); assertEquals("usertask1", jobGet.getCurrentWorkflowStep().getId()); assertNotNull(jobGet.getStartTime()); assertNotNull(jobGet.getEndTime()); assertNotNull(jobGet.getActivitiJobXml()); assertEquals(activitiXml, jobGet.getActivitiJobXml()); assertTrue(jobGet.getCompletedWorkflowSteps().size() > 0); assertNull(jobGet.getCurrentWorkflowStep()); assertNotNull(jobGet.getStartTime()); assertNotNull(jobGet.getEndTime()); assertNull(jobGet.getActivitiJobXml()); assertTrue(CollectionUtils.isEmpty(jobGet.getCompletedWorkflowSteps())); assertNull(jobGet.getCurrentWorkflowStep());
@Test public void testGetJobIntermediateTimer() throws Exception { jobDefinitionServiceTestHelper.createJobDefinition(ACTIVITI_XML_HERD_INTERMEDIATE_TIMER_WITH_CLASSPATH); Job job = jobService.createAndStartJob(jobServiceTestHelper.createJobCreateRequest(TEST_ACTIVITI_NAMESPACE_CD, TEST_ACTIVITI_JOB_NAME)); String activitiXml = IOUtils.toString(resourceLoader.getResource(ACTIVITI_XML_HERD_INTERMEDIATE_TIMER_WITH_CLASSPATH).getInputStream()); // Job should be waiting at User task. // Get job status Job jobGet = jobService.getJob(job.getId(), true); assertEquals(JobStatusEnum.RUNNING, jobGet.getStatus()); assertNotNull(jobGet.getActivitiJobXml()); assertEquals(activitiXml, jobGet.getActivitiJobXml()); assertTrue(jobGet.getCompletedWorkflowSteps().size() > 0); // Current workflow step will be null assertNull(jobGet.getCurrentWorkflowStep()); org.activiti.engine.runtime.Job timer = activitiManagementService.createJobQuery().processInstanceId(job.getId()).timers().singleResult(); if (timer != null) { activitiManagementService.executeJob(timer.getId()); } // Get the job status again. job should have completed now. jobGet = jobService.getJob(job.getId(), false); assertEquals(JobStatusEnum.COMPLETED, jobGet.getStatus()); assertNull(jobGet.getCurrentWorkflowStep()); }
assertNull(jobGet.getActivitiJobXml()); assertTrue(CollectionUtils.isEmpty(jobGet.getCompletedWorkflowSteps())); assertEquals("usertask1", jobGet.getCurrentWorkflowStep().getId()); assertNull(jobGet.getActivitiJobXml()); assertTrue(CollectionUtils.isEmpty(jobGet.getCompletedWorkflowSteps())); assertEquals("usertask1", jobGet.getCurrentWorkflowStep().getId()); assertNull(jobGet.getActivitiJobXml()); assertTrue(CollectionUtils.isEmpty(jobGet.getCompletedWorkflowSteps())); assertEquals("usertask1", jobGet.getCurrentWorkflowStep().getId()); assertNotNull(jobGet.getStartTime()); assertNotNull(jobGet.getEndTime()); assertNull(jobGet.getActivitiJobXml()); assertTrue(CollectionUtils.isEmpty(jobGet.getCompletedWorkflowSteps())); assertNull(jobGet.getCurrentWorkflowStep());
assertNull(jobGet.getActivitiJobXml()); assertTrue(CollectionUtils.isEmpty(jobGet.getCompletedWorkflowSteps())); assertEquals("usertask1", jobGet.getCurrentWorkflowStep().getId()); assertNull(jobGet.getActivitiJobXml()); assertTrue(CollectionUtils.isEmpty(jobGet.getCompletedWorkflowSteps())); assertEquals("usertask1", jobGet.getCurrentWorkflowStep().getId()); assertNull(jobGet.getActivitiJobXml()); assertTrue(CollectionUtils.isEmpty(jobGet.getCompletedWorkflowSteps())); assertEquals("usertask1", jobGet.getCurrentWorkflowStep().getId()); assertNotNull(jobGet.getStartTime()); assertNotNull(jobGet.getEndTime()); assertNull(jobGet.getActivitiJobXml()); assertTrue(CollectionUtils.isEmpty(jobGet.getCompletedWorkflowSteps())); assertNull(jobGet.getCurrentWorkflowStep());
theActivitiJobXml = this.getActivitiJobXml(); strategy.appendField(locator, this, "activitiJobXml", buffer, theActivitiJobXml, (this.activitiJobXml!= null));
assertNull(jobGet.getActivitiJobXml()); assertTrue(CollectionUtils.isEmpty(jobGet.getCompletedWorkflowSteps())); assertEquals("usertask1", jobGet.getCurrentWorkflowStep().getId()); assertNull(jobGet.getActivitiJobXml()); assertTrue(CollectionUtils.isEmpty(jobGet.getCompletedWorkflowSteps())); assertEquals("usertask1", jobGet.getCurrentWorkflowStep().getId()); assertNull(jobGet.getActivitiJobXml()); assertTrue(CollectionUtils.isEmpty(jobGet.getCompletedWorkflowSteps())); assertEquals("usertask1", jobGet.getCurrentWorkflowStep().getId()); assertNotNull(jobGet.getStartTime()); assertNotNull(jobGet.getEndTime()); assertNull(jobGet.getActivitiJobXml()); assertTrue(CollectionUtils.isEmpty(jobGet.getCompletedWorkflowSteps())); assertNull(jobGet.getCurrentWorkflowStep());
theActivitiJobXml = this.getActivitiJobXml(); strategy.appendField(locator, this, "activitiJobXml", buffer, theActivitiJobXml, (this.activitiJobXml!= null));
lhsActivitiJobXml = this.getActivitiJobXml(); String rhsActivitiJobXml; rhsActivitiJobXml = that.getActivitiJobXml(); if (!strategy.equals(LocatorUtils.property(thisLocator, "activitiJobXml", lhsActivitiJobXml), LocatorUtils.property(thatLocator, "activitiJobXml", rhsActivitiJobXml), lhsActivitiJobXml, rhsActivitiJobXml, (this.activitiJobXml!= null), (that.activitiJobXml!= null))) { return false;
theActivitiJobXml = this.getActivitiJobXml(); strategy.appendField(locator, this, "activitiJobXml", buffer, theActivitiJobXml, (this.activitiJobXml!= null));
lhsActivitiJobXml = this.getActivitiJobXml(); String rhsActivitiJobXml; rhsActivitiJobXml = that.getActivitiJobXml(); if (!strategy.equals(LocatorUtils.property(thisLocator, "activitiJobXml", lhsActivitiJobXml), LocatorUtils.property(thatLocator, "activitiJobXml", rhsActivitiJobXml), lhsActivitiJobXml, rhsActivitiJobXml, (this.activitiJobXml!= null), (that.activitiJobXml!= null))) { return false;
lhsActivitiJobXml = this.getActivitiJobXml(); String rhsActivitiJobXml; rhsActivitiJobXml = that.getActivitiJobXml(); if (!strategy.equals(LocatorUtils.property(thisLocator, "activitiJobXml", lhsActivitiJobXml), LocatorUtils.property(thatLocator, "activitiJobXml", rhsActivitiJobXml), lhsActivitiJobXml, rhsActivitiJobXml, (this.activitiJobXml!= null), (that.activitiJobXml!= null))) { return false;
theActivitiJobXml = this.getActivitiJobXml(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "activitiJobXml", theActivitiJobXml), currentHashCode, theActivitiJobXml, (this.activitiJobXml!= null));
theActivitiJobXml = this.getActivitiJobXml(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "activitiJobXml", theActivitiJobXml), currentHashCode, theActivitiJobXml, (this.activitiJobXml!= null));
theActivitiJobXml = this.getActivitiJobXml(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "activitiJobXml", theActivitiJobXml), currentHashCode, theActivitiJobXml, (this.activitiJobXml!= null));
if (activitiJobXmlShouldBeCopiedAndSet == Boolean.TRUE) { String sourceActivitiJobXml; sourceActivitiJobXml = this.getActivitiJobXml(); String copyActivitiJobXml = ((String) strategy.copy(LocatorUtils.property(locator, "activitiJobXml", sourceActivitiJobXml), sourceActivitiJobXml, (this.activitiJobXml!= null))); copy.setActivitiJobXml(copyActivitiJobXml);
if (activitiJobXmlShouldBeCopiedAndSet == Boolean.TRUE) { String sourceActivitiJobXml; sourceActivitiJobXml = this.getActivitiJobXml(); String copyActivitiJobXml = ((String) strategy.copy(LocatorUtils.property(locator, "activitiJobXml", sourceActivitiJobXml), sourceActivitiJobXml, (this.activitiJobXml!= null))); copy.setActivitiJobXml(copyActivitiJobXml);
if (activitiJobXmlShouldBeCopiedAndSet == Boolean.TRUE) { String sourceActivitiJobXml; sourceActivitiJobXml = this.getActivitiJobXml(); String copyActivitiJobXml = ((String) strategy.copy(LocatorUtils.property(locator, "activitiJobXml", sourceActivitiJobXml), sourceActivitiJobXml, (this.activitiJobXml!= null))); copy.setActivitiJobXml(copyActivitiJobXml);