本文整理汇总了Java中org.camunda.bpm.engine.ProcessEngine.getRepositoryService方法的典型用法代码示例。如果您正苦于以下问题:Java ProcessEngine.getRepositoryService方法的具体用法?Java ProcessEngine.getRepositoryService怎么用?Java ProcessEngine.getRepositoryService使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.camunda.bpm.engine.ProcessEngine
的用法示例。
在下文中一共展示了ProcessEngine.getRepositoryService方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: clean
import org.camunda.bpm.engine.ProcessEngine; //导入方法依赖的package包/类
public void clean(ProcessEngine engine) {
repositoryService = engine.getRepositoryService();
runtimeService = engine.getRuntimeService();
identityService = engine.getIdentityService();
filterService = engine.getFilterService();
authorizationService = engine.getAuthorizationService();
// Delete all previous data in camunda
cleanInstances();
cleanMemberships();
cleanUsers();
cleanGroups();
cleanFilters();
cleanAuthorizations();
}
示例2: createDeployment
import org.camunda.bpm.engine.ProcessEngine; //导入方法依赖的package包/类
@Override
public void createDeployment(String processArchiveName, DeploymentBuilder deploymentBuilder) {
ProcessEngine processEngine = BpmPlatform.getProcessEngineService().getProcessEngine("default");
// Hack: deploy the first version of the invoice process once before the process application
// is deployed the first time
if (processEngine != null) {
RepositoryService repositoryService = processEngine.getRepositoryService();
if (!isProcessDeployed(repositoryService, "invoice")) {
ClassLoader classLoader = getProcessApplicationClassloader();
repositoryService.createDeployment(this.getReference())
.addInputStream("invoice.v1.bpmn", classLoader.getResourceAsStream("invoice.v1.bpmn"))
.addInputStream("invoiceBusinessDecisions.dmn", classLoader.getResourceAsStream("invoiceBusinessDecisions.dmn"))
.addInputStream("review-invoice.cmmn", classLoader.getResourceAsStream("review-invoice.cmmn"))
.deploy();
}
}
}
示例3: cleanDatabase
import org.camunda.bpm.engine.ProcessEngine; //导入方法依赖的package包/类
public void cleanDatabase(ProcessEngine engine) {
// delete all deployments
RepositoryService repositoryService = engine.getRepositoryService();
List<Deployment> deployments = repositoryService
.createDeploymentQuery()
.list();
for (Deployment deployment : deployments) {
repositoryService.deleteDeployment(deployment.getId(), true);
}
// drop DB
((ProcessEngineImpl)engine).getProcessEngineConfiguration()
.getCommandExecutorTxRequired()
.execute(new Command<Void>() {
public Void execute(CommandContext commandContext) {
commandContext.getDbSqlSession().dbSchemaDrop();
return null;
}
});
engine.close();
}
示例4: executionByProcessDefinitionKey
import org.camunda.bpm.engine.ProcessEngine; //导入方法依赖的package包/类
public static NullTolerantComparator<Execution> executionByProcessDefinitionKey(ProcessEngine processEngine) {
final RuntimeService runtimeService = processEngine.getRuntimeService();
final RepositoryService repositoryService = processEngine.getRepositoryService();
return propertyComparator(new PropertyAccessor<Execution, String>() {
@Override
public String getProperty(Execution obj) {
ProcessInstance processInstance = runtimeService.createProcessInstanceQuery()
.processInstanceId(obj.getProcessInstanceId()).singleResult();
ProcessDefinition processDefinition = repositoryService.getProcessDefinition(processInstance.getProcessDefinitionId());
return processDefinition.getKey();
}
});
}
示例5: caseExecutionByDefinitionKey
import org.camunda.bpm.engine.ProcessEngine; //导入方法依赖的package包/类
public static NullTolerantComparator<CaseExecution> caseExecutionByDefinitionKey(ProcessEngine processEngine) {
final RepositoryService repositoryService = processEngine.getRepositoryService();
return propertyComparator(new PropertyAccessor<CaseExecution, String>() {
@Override
public String getProperty(CaseExecution obj) {
CaseDefinition caseDefinition = repositoryService.getCaseDefinition(obj.getCaseDefinitionId());
return caseDefinition.getKey();
}
});
}
示例6: testPaAsEjbModule
import org.camunda.bpm.engine.ProcessEngine; //导入方法依赖的package包/类
@Test
public void testPaAsEjbModule() {
ProcessEngine processEngine = ProgrammaticBeanLookup.lookup(ProcessEngine.class);
Assert.assertNotNull(processEngine);
RepositoryService repositoryService = processEngine.getRepositoryService();
long count = repositoryService.createProcessDefinitionQuery()
.processDefinitionKey("paAsEjbModule-process")
.count();
Assert.assertEquals(1, count);
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:11,代码来源:TestFoxPlatformClientAsEjbModule_pasAsEjbModule.java
示例7: historicExternalTaskLogByProcessDefinitionKey
import org.camunda.bpm.engine.ProcessEngine; //导入方法依赖的package包/类
public static NullTolerantComparator<HistoricExternalTaskLog> historicExternalTaskLogByProcessDefinitionKey(ProcessEngine processEngine) {
final RepositoryService repositoryService = processEngine.getRepositoryService();
return propertyComparator(new PropertyAccessor<HistoricExternalTaskLog, String>() {
@Override
public String getProperty(HistoricExternalTaskLog obj) {
ProcessDefinition processDefinition = repositoryService.getProcessDefinition(obj.getProcessDefinitionId());
return processDefinition.getKey();
}
});
}
示例8: resolveNotCachedLinks
import org.camunda.bpm.engine.ProcessEngine; //导入方法依赖的package包/类
protected List<HalResource<?>> resolveNotCachedLinks(String[] linkedIds, ProcessEngine processEngine) {
RepositoryService repositoryService = processEngine.getRepositoryService();
List<ProcessDefinition> processDefinitions = repositoryService.createProcessDefinitionQuery()
.processDefinitionIdIn(linkedIds)
.listPage(0, linkedIds.length);
List<HalResource<?>> resolved = new ArrayList<HalResource<?>>();
for (ProcessDefinition procDef : processDefinitions) {
resolved.add(HalProcessDefinition.fromProcessDefinition(procDef, processEngine));
}
return resolved;
}
示例9: resolveNotCachedLinks
import org.camunda.bpm.engine.ProcessEngine; //导入方法依赖的package包/类
protected List<HalResource<?>> resolveNotCachedLinks(String[] linkedIds, ProcessEngine processEngine) {
RepositoryService repositoryService = processEngine.getRepositoryService();
List<CaseDefinition> caseDefinitions = repositoryService.createCaseDefinitionQuery()
.caseDefinitionIdIn(linkedIds)
.listPage(0, linkedIds.length);
List<HalResource<?>> resolved = new ArrayList<HalResource<?>>();
for (CaseDefinition caseDefinition : caseDefinitions) {
resolved.add(HalCaseDefinition.fromCaseDefinition(caseDefinition, processEngine));
}
return resolved;
}
示例10: setUp
import org.camunda.bpm.engine.ProcessEngine; //导入方法依赖的package包/类
@Before
public void setUp() {
ProcessEngine processEngine = rule.getProcessEngine();
identityService = processEngine.getIdentityService();
repositoryService = processEngine.getRepositoryService();
runtimeService = processEngine.getRuntimeService();
taskService = processEngine.getTaskService();
historyService = processEngine.getHistoryService();
formService = processEngine.getFormService();
identityService.clearAuthentication();
identityService.setAuthentication("test", Arrays.asList("accounting"));
}
示例11: TestFixture
import org.camunda.bpm.engine.ProcessEngine; //导入方法依赖的package包/类
public TestFixture(ProcessEngine processEngine) {
this.processEngine = processEngine;
repositoryService = processEngine.getRepositoryService();
runtimeService = processEngine.getRuntimeService();
managementService = processEngine.getManagementService();
taskService = processEngine.getTaskService();
}
示例12: testResourceName
import org.camunda.bpm.engine.ProcessEngine; //导入方法依赖的package包/类
@Test
public void testResourceName() {
ProcessEngine processEngine = ProgrammaticBeanLookup.lookup(ProcessEngine.class);
Assert.assertNotNull(processEngine);
RepositoryService repositoryService = processEngine.getRepositoryService();
ProcessDefinitionQuery query = repositoryService.createProcessDefinitionQuery();
ProcessDefinition definition = query.processDefinitionKey("process-0").singleResult();
Assert.assertEquals("process0.bpmn", definition.getResourceName());
definition = query.processDefinitionKey("process-1").singleResult();
Assert.assertEquals("processes/process1.bpmn", definition.getResourceName());
definition = query.processDefinitionKey("process-2").singleResult();
Assert.assertEquals("process2.bpmn", definition.getResourceName());
definition = query.processDefinitionKey("process-3").singleResult();
Assert.assertEquals("subDirectory/process3.bpmn", definition.getResourceName());
definition = query.processDefinitionKey("process-4").singleResult();
Assert.assertEquals("process4.bpmn", definition.getResourceName());
definition = query.processDefinitionKey("process-5").singleResult();
Assert.assertEquals("subDirectory/process5.bpmn", definition.getResourceName());
}
示例13: testMultipleClasspathRoots
import org.camunda.bpm.engine.ProcessEngine; //导入方法依赖的package包/类
@Test
public void testMultipleClasspathRoots() {
ProcessEngine processEngine = ProgrammaticBeanLookup.lookup(ProcessEngine.class);
Assert.assertNotNull(processEngine);
RepositoryService repositoryService = processEngine.getRepositoryService();
ProcessDefinitionQuery query = repositoryService.createProcessDefinitionQuery();
long count = query.count();
Assert.assertEquals(1, count);
}
示例14: assertDiagramIsDeployed
import org.camunda.bpm.engine.ProcessEngine; //导入方法依赖的package包/类
public static void assertDiagramIsDeployed(boolean deployed, Class<?> clazz, String expectedDiagramResource, String processDefinitionKey) throws IOException {
ProcessEngine processEngine = ProgrammaticBeanLookup.lookup(ProcessEngine.class);
Assert.assertNotNull(processEngine);
RepositoryService repositoryService = processEngine.getRepositoryService();
ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery()
.processDefinitionKey(processDefinitionKey)
.singleResult();
assertNotNull(processDefinition);
InputStream actualStream = null;
InputStream expectedStream = null;
try {
actualStream = repositoryService.getProcessDiagram(processDefinition.getId());
if (deployed) {
byte[] actualDiagram = IoUtil.readInputStream(actualStream, "actualStream");
assertNotNull(actualDiagram);
assertTrue(actualDiagram.length > 0);
expectedStream = clazz.getResourceAsStream(expectedDiagramResource);
byte[] expectedDiagram = IoUtil.readInputStream(expectedStream, "expectedSteam");
assertNotNull(expectedDiagram);
assertTrue(isEqual(expectedStream, actualStream));
} else {
assertNull(actualStream);
}
} finally {
IoUtil.closeSilently(actualStream);
IoUtil.closeSilently(expectedStream);
}
}
示例15: testTwoPasAsLib
import org.camunda.bpm.engine.ProcessEngine; //导入方法依赖的package包/类
@Test
public void testTwoPasAsLib() {
ProcessEngine processEngine = ProgrammaticBeanLookup.lookup(ProcessEngine.class);
Assert.assertNotNull(processEngine);
RepositoryService repositoryService = processEngine.getRepositoryService();
long count = repositoryService.createProcessDefinitionQuery()
.processDefinitionKey("process1")
.count();
Assert.assertEquals(1, count);
count = repositoryService.createProcessDefinitionQuery()
.processDefinitionKey("process2")
.count();
Assert.assertEquals(1, count);
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:16,代码来源:TestFoxPlatformClientAsEjbModule_twoPasAsLib.java