本文整理了Java中org.camunda.bpm.engine.runtime.Job.isSuspended()
方法的一些代码示例,展示了Job.isSuspended()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Job.isSuspended()
方法的具体详情如下:
包路径:org.camunda.bpm.engine.runtime.Job
类名称:Job
方法名:isSuspended
[英]Indicates whether this job is suspended. If a job is suspended, the job will be not acquired by the job executor.
[中]指示此作业是否已挂起。如果作业被挂起,作业执行器将不会获取该作业。
代码示例来源:origin: camunda/camunda-bpm-platform
@Test
public void shouldCreateActivatedExecutionJobs() {
// given
Batch batch = helper.migrateProcessInstancesAsync(1);
// when
helper.executeSeedJob(batch);
// then
Job migrationJob = helper.getExecutionJobs(batch).get(0);
assertFalse(migrationJob.isSuspended());
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Test
public void shouldCreateActivatedMonitorJob() {
// given
Batch batch = helper.migrateProcessInstancesAsync(1);
// when
helper.executeSeedJob(batch);
// then
Job monitorJob = helper.getMonitorJob(batch);
assertFalse(monitorJob.isSuspended());
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment(resources = {"org/camunda/bpm/engine/test/api/repository/ProcessDefinitionSuspensionTest.testSuspendStartTimerOnProcessDefinitionSuspension.bpmn20.xml"})
public void testSuspendStartTimerOnProcessDefinitionSuspensionByKey() {
Job startTimer = managementService.createJobQuery().timers().singleResult();
assertFalse(startTimer.isSuspended());
// when
repositoryService.suspendProcessDefinitionByKey("process");
// then
// refresh job
startTimer = managementService.createJobQuery().timers().singleResult();
assertTrue(startTimer.isSuspended());
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Test
public void shouldCreateActivatedSeedJob() {
// given
Batch batch = helper.migrateProcessInstancesAsync(2);
// when
helper.executeSeedJob(batch);
// then
Job seedJob = helper.getSeedJob(batch);
assertFalse(seedJob.isSuspended());
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Deployment(resources = {"org/camunda/bpm/engine/test/api/repository/ProcessDefinitionSuspensionTest.testSuspendStartTimerOnProcessDefinitionSuspension.bpmn20.xml"})
public void testSuspendStartTimerOnProcessDefinitionSuspensionById() {
ProcessDefinition pd = repositoryService.createProcessDefinitionQuery().singleResult();
Job startTimer = managementService.createJobQuery().timers().singleResult();
assertFalse(startTimer.isSuspended());
// when
repositoryService.suspendProcessDefinitionById(pd.getId());
// then
// refresh job
startTimer = managementService.createJobQuery().timers().singleResult();
assertTrue(startTimer.isSuspended());
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Test
public void shouldCreateSuspendedMonitorJob() {
// given
Batch batch = helper.migrateProcessInstancesAsync(1);
managementService.suspendBatchById(batch.getId());
// when
helper.executeSeedJob(batch);
// then
Job monitorJob = helper.getMonitorJob(batch);
assertTrue(monitorJob.isSuspended());
}
代码示例来源:origin: camunda/camunda-bpm-platform
public void testSuspendJobByProcessInstanceIdWihtUpdatePermissionOnAnyProcessDefinition() {
// given
String processInstanceId = startProcessInstanceByKey(TIMER_BOUNDARY_PROCESS_KEY).getId();
createGrantAuthorization(PROCESS_DEFINITION, ANY, userId, UPDATE_INSTANCE);
// when
managementService.suspendJobByProcessInstanceId(processInstanceId);
// then
Job job = selectJobByProcessInstanceId(processInstanceId);
assertNotNull(job);
assertTrue(job.isSuspended());
}
代码示例来源:origin: camunda/camunda-bpm-platform
public void testSuspendJobByProcessDefinitionKeyWihtUpdatePermissionOnAnyProcessInstance() {
// given
String processInstanceId = startProcessInstanceByKey(TIMER_BOUNDARY_PROCESS_KEY).getId();
createGrantAuthorization(PROCESS_INSTANCE, ANY, userId, UPDATE);
// when
managementService.suspendJobByProcessDefinitionKey(TIMER_BOUNDARY_PROCESS_KEY);
// then
Job job = selectJobByProcessInstanceId(processInstanceId);
assertNotNull(job);
assertTrue(job.isSuspended());
}
代码示例来源:origin: camunda/camunda-bpm-platform
public void testSuspendJobByProcessDefinitionKeyWihtUpdatePermissionOnProcessDefinition() {
// given
String processInstanceId = startProcessInstanceByKey(TIMER_BOUNDARY_PROCESS_KEY).getId();
createGrantAuthorization(PROCESS_DEFINITION, TIMER_BOUNDARY_PROCESS_KEY, userId, UPDATE_INSTANCE);
// when
managementService.suspendJobByProcessDefinitionKey(TIMER_BOUNDARY_PROCESS_KEY);
// then
Job job = selectJobByProcessInstanceId(processInstanceId);
assertNotNull(job);
assertTrue(job.isSuspended());
}
代码示例来源:origin: camunda/camunda-bpm-platform
@Test
public void shouldCreateSuspendedSeedJob() {
// given
Batch batch = helper.migrateProcessInstancesAsync(2);
managementService.suspendBatchById(batch.getId());
// when
helper.executeSeedJob(batch);
// then
Job seedJob = helper.getSeedJob(batch);
assertTrue(seedJob.isSuspended());
}
代码示例来源:origin: camunda/camunda-bpm-platform
public void testSuspendJobByProcessInstanceIdWihtUpdatePermissionOnAnyProcessInstance() {
// given
String processInstanceId = startProcessInstanceByKey(TIMER_BOUNDARY_PROCESS_KEY).getId();
createGrantAuthorization(PROCESS_INSTANCE, ANY, userId, UPDATE);
// when
managementService.suspendJobByProcessInstanceId(processInstanceId);
// then
Job job = selectJobByProcessInstanceId(processInstanceId);
assertNotNull(job);
assertTrue(job.isSuspended());
}
代码示例来源:origin: camunda/camunda-bpm-platform
public void testActivateJobByProcessInstanceIdWihtUpdatePermissionOnProcessInstance() {
// given
String processInstanceId = startProcessInstanceByKey(TIMER_BOUNDARY_PROCESS_KEY).getId();
suspendJobByProcessInstanceId(processInstanceId);
createGrantAuthorization(PROCESS_INSTANCE, processInstanceId, userId, UPDATE);
// when
managementService.activateJobByProcessInstanceId(processInstanceId);
// then
Job job = selectJobByProcessInstanceId(processInstanceId);
assertNotNull(job);
assertFalse(job.isSuspended());
}
代码示例来源:origin: camunda/camunda-bpm-platform
public void testActivateJobByProcessInstanceIdWihtUpdatePermissionOnProcessDefinition() {
// given
String processInstanceId = startProcessInstanceByKey(TIMER_BOUNDARY_PROCESS_KEY).getId();
suspendJobByProcessInstanceId(processInstanceId);
createGrantAuthorization(PROCESS_DEFINITION, TIMER_BOUNDARY_PROCESS_KEY, userId, UPDATE_INSTANCE);
// when
managementService.activateJobByProcessInstanceId(processInstanceId);
// then
Job job = selectJobByProcessInstanceId(processInstanceId);
assertNotNull(job);
assertFalse(job.isSuspended());
}
代码示例来源:origin: camunda/camunda-bpm-platform
public void testSuspendJobByIdWihtUpdatePermissionOnProcessInstance() {
// given
String processInstanceId = startProcessInstanceByKey(TIMER_BOUNDARY_PROCESS_KEY).getId();
String jobId = selectJobByProcessInstanceId(processInstanceId).getId();
createGrantAuthorization(PROCESS_INSTANCE, processInstanceId, userId, UPDATE);
// when
managementService.suspendJobById(jobId);
// then
Job job = selectJobByProcessInstanceId(processInstanceId);
assertNotNull(job);
assertTrue(job.isSuspended());
}
代码示例来源:origin: camunda/camunda-bpm-platform
public void testSuspendJobByIdWihtUpdatePermissionOnProcessDefinition() {
// given
String processInstanceId = startProcessInstanceByKey(TIMER_BOUNDARY_PROCESS_KEY).getId();
String jobId = selectJobByProcessInstanceId(processInstanceId).getId();
createGrantAuthorization(PROCESS_DEFINITION, TIMER_BOUNDARY_PROCESS_KEY, userId, UPDATE_INSTANCE);
// when
managementService.suspendJobById(jobId);
// then
Job job = selectJobByProcessInstanceId(processInstanceId);
assertNotNull(job);
assertTrue(job.isSuspended());
}
代码示例来源:origin: camunda/camunda-bpm-platform
public void testSuspendJobByJobDefinitionIdWihtUpdatePermissionOnProcessDefinition() {
// given
String processInstanceId = startProcessInstanceByKey(TIMER_BOUNDARY_PROCESS_KEY).getId();
String jobDefinitionId = selectJobDefinitionByProcessDefinitionKey(TIMER_BOUNDARY_PROCESS_KEY).getId();
createGrantAuthorization(PROCESS_DEFINITION, TIMER_BOUNDARY_PROCESS_KEY, userId, UPDATE_INSTANCE);
// when
managementService.suspendJobByJobDefinitionId(jobDefinitionId);
// then
Job job = selectJobByProcessInstanceId(processInstanceId);
assertNotNull(job);
assertTrue(job.isSuspended());
}
代码示例来源:origin: camunda/camunda-bpm-platform
public void testSuspendJobByJobDefinitionIdWihtUpdatePermissionOnAnyProcessDefinition() {
// given
String processInstanceId = startProcessInstanceByKey(TIMER_BOUNDARY_PROCESS_KEY).getId();
String jobDefinitionId = selectJobDefinitionByProcessDefinitionKey(TIMER_BOUNDARY_PROCESS_KEY).getId();
createGrantAuthorization(PROCESS_DEFINITION, ANY, userId, UPDATE_INSTANCE);
// when
managementService.suspendJobByJobDefinitionId(jobDefinitionId);
// then
Job job = selectJobByProcessInstanceId(processInstanceId);
assertNotNull(job);
assertTrue(job.isSuspended());
}
代码示例来源:origin: camunda/camunda-bpm-platform
public void testSuspendJobByIdWihtUpdatePermissionOnAnyProcessInstance() {
// given
String processInstanceId = startProcessInstanceByKey(TIMER_BOUNDARY_PROCESS_KEY).getId();
String jobId = selectJobByProcessInstanceId(processInstanceId).getId();
createGrantAuthorization(PROCESS_INSTANCE, ANY, userId, UPDATE);
// when
managementService.suspendJobById(jobId);
// then
Job job = selectJobByProcessInstanceId(processInstanceId);
assertNotNull(job);
assertTrue(job.isSuspended());
}
代码示例来源:origin: camunda/camunda-bpm-platform
public void testSuspendJobByProcessDefinitionIdWihtUpdatePermissionOnProcessDefinition() {
// given
String processInstanceId = startProcessInstanceByKey(TIMER_BOUNDARY_PROCESS_KEY).getId();
String processDefinitionId = selectProcessDefinitionByKey(TIMER_BOUNDARY_PROCESS_KEY).getId();
createGrantAuthorization(PROCESS_DEFINITION, TIMER_BOUNDARY_PROCESS_KEY, userId, UPDATE_INSTANCE);
// when
managementService.suspendJobByProcessDefinitionId(processDefinitionId);
// then
Job job = selectJobByProcessInstanceId(processInstanceId);
assertNotNull(job);
assertTrue(job.isSuspended());
}
代码示例来源:origin: camunda/camunda-bpm-platform
public void testSuspendJobByIdWihtUpdatePermissionOnAnyProcessDefinition() {
// given
String processInstanceId = startProcessInstanceByKey(TIMER_BOUNDARY_PROCESS_KEY).getId();
String jobId = selectJobByProcessInstanceId(processInstanceId).getId();
createGrantAuthorization(PROCESS_DEFINITION, ANY, userId, UPDATE_INSTANCE);
// when
managementService.suspendJobById(jobId);
// then
Job job = selectJobByProcessInstanceId(processInstanceId);
assertNotNull(job);
assertTrue(job.isSuspended());
}
内容来源于网络,如有侵权,请联系作者删除!