本文整理了Java中org.activiti.engine.RepositoryService.suspendProcessDefinitionById
方法的一些代码示例,展示了RepositoryService.suspendProcessDefinitionById
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RepositoryService.suspendProcessDefinitionById
方法的具体详情如下:
包路径:org.activiti.engine.RepositoryService
类名称:RepositoryService
方法名:suspendProcessDefinitionById
[英]Suspends the process definition with the given id. If a process definition is in state suspended, it will not be possible to start new process instances based on the process definition. Note: all the process instances of the process definition will still be active (ie. not suspended)!
[中]挂起具有给定id的流程定义。如果流程定义处于挂起状态,则无法基于流程定义启动新的流程实例。注意:流程定义的所有流程实例仍将处于活动状态(即未暂停)!
代码示例来源:origin: com.bbossgroups.pdp/pdp-workflow
public void suspendProcess(String processId) {
repositoryService.suspendProcessDefinitionById(processId);
}
代码示例来源:origin: org.flowable/flowable5-compatibility
@Override
public void suspendProcessDefinition(String processDefinitionId, String processDefinitionKey, boolean suspendProcessInstances, Date suspensionDate, String tenantId) {
try {
if (processDefinitionId != null) {
getProcessEngine().getRepositoryService().suspendProcessDefinitionById(processDefinitionId, suspendProcessInstances, suspensionDate);
} else {
getProcessEngine().getRepositoryService().suspendProcessDefinitionByKey(processDefinitionKey, suspendProcessInstances, suspensionDate, tenantId);
}
} catch (org.activiti.engine.ActivitiException e) {
handleActivitiException(e);
}
}
代码示例来源:origin: org.activiti/activiti-rest
protected ProcessDefinitionResponse suspendProcessDefinition(ProcessDefinition processDefinition, boolean suspendInstances, Date date) {
if (repositoryService.isProcessDefinitionSuspended(processDefinition.getId())) {
throw new ActivitiConflictException("Process definition with id '" + processDefinition.getId() + " ' is already suspended");
}
repositoryService.suspendProcessDefinitionById(processDefinition.getId(), suspendInstances, date);
ProcessDefinitionResponse response = restResponseFactory.createProcessDefinitionResponse(processDefinition);
// No need to re-fetch the ProcessDefinition, just alter the suspended
// state of the result-object
response.setSuspended(true);
return response;
}
代码示例来源:origin: org.activiti/activiti-explorer
public void buttonClick(ClickEvent event) {
RepositoryService repositoryService = ProcessEngines.getDefaultProcessEngine().getRepositoryService();
boolean includeProcessInstances = (Boolean) includeProcessInstancesCheckBox.getValue();
if (suspend) {
repositoryService.suspendProcessDefinitionById(processDefinitionId,
includeProcessInstances, (Date) dateField.getValue());
} else {
repositoryService.activateProcessDefinitionById(processDefinitionId,
includeProcessInstances, (Date) dateField.getValue());
}
close();
parentPage.refreshSelectNext(); // select next item in list on the left
}
代码示例来源:origin: FINRAOS/herd
/**
* This method tests the scenario where a process definition is suspended in Activiti.
*/
@Test(expected = IllegalArgumentException.class)
public void testCreateProcessCommandProcessSuspended() throws Exception
{
// Define the job definition
JobDefinition jobDefinition = jobDefinitionServiceTestHelper.createJobDefinition(ACTIVITI_XML_HERD_WORKFLOW);
JobDefinitionEntity jobDefinitionEntity = jobDefinitionDao.getJobDefinitionByAltKey(jobDefinition.getNamespace(), jobDefinition.getJobName());
// Suspend the job definition with activiti api
activitiRepositoryService.suspendProcessDefinitionById(jobDefinitionEntity.getActivitiId());
jobService.createAndStartJob(jobServiceTestHelper.createJobCreateRequest(TEST_ACTIVITI_NAMESPACE_CD, TEST_ACTIVITI_JOB_NAME));
}
内容来源于网络,如有侵权,请联系作者删除!