本文整理汇总了Java中org.camunda.bpm.application.PostDeploy类的典型用法代码示例。如果您正苦于以下问题:Java PostDeploy类的具体用法?Java PostDeploy怎么用?Java PostDeploy使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PostDeploy类属于org.camunda.bpm.application包,在下文中一共展示了PostDeploy类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: startService
import org.camunda.bpm.application.PostDeploy; //导入依赖的package包/类
@PostDeploy
public void startService(ProcessEngine processEngine) throws Exception {
RuntimeService runtimeService = processEngine.getRuntimeService();
configuration = MailConfigurationFactory.getConfiguration();
notificationService = new MailNotificationService(configuration);
notificationService.registerMailHandler(mail -> {
runtimeService.startProcessInstanceByKey("printProcess",
Variables.createVariables()
.putValue("mail", mail)
.putValue("invoice", getInvoicePath()));
});
notificationService.start();
}
示例2: evaluateDecisionTable
import org.camunda.bpm.application.PostDeploy; //导入依赖的package包/类
@PostDeploy
public void evaluateDecisionTable(ProcessEngine processEngine) {
DecisionService decisionService = processEngine.getDecisionService();
VariableMap variables = Variables.createVariables()
.putValue("season", "Spring")
.putValue("guestCount", 10)
.putValue("guestsWithChildren", false);
DmnDecisionTableResult dishDecisionResult = decisionService.evaluateDecisionTableByKey("dish", variables);
String desiredDish = dishDecisionResult.getSingleEntry();
System.out.println("Desired dish: " + desiredDish);
DmnDecisionTableResult beveragesDecisionResult = decisionService.evaluateDecisionTableByKey("beverages", variables);
List<Object> beverages = beveragesDecisionResult.collectEntries("beverages");
System.out.println("Desired beverages: " + beverages);
}
示例3: startFirstProcess
import org.camunda.bpm.application.PostDeploy; //导入依赖的package包/类
/**
* In a @PostDeploy Hook you can interact with the process engine and access
* the processes the application has deployed.
*/
@PostDeploy
public void startFirstProcess(ProcessEngine processEngine) {
createUsers(processEngine);
//enable metric reporting
ProcessEngineConfigurationImpl processEngineConfiguration = (ProcessEngineConfigurationImpl) processEngine.getProcessEngineConfiguration();
processEngineConfiguration.setDbMetricsReporterActivate(true);
processEngineConfiguration.getDbMetricsReporter().setReporterId("REPORTER");
startProcessInstances(processEngine, "invoice", 1);
startProcessInstances(processEngine, "invoice", null);
//disable reporting
processEngineConfiguration.setDbMetricsReporterActivate(false);
}
示例4: invokePostDeploy
import org.camunda.bpm.application.PostDeploy; //导入依赖的package包/类
protected void invokePostDeploy(final ProcessApplicationInterface processApplication) throws ClassNotFoundException, StartException {
Class<?> paClass = getPaClass(postDeployDescription);
final Method postDeployMethod = InjectionUtil.detectAnnotatedMethod(paClass, PostDeploy.class);
if(postDeployMethod != null) {
try {
processApplication.execute(new Callable<Void>() {
@Override
public Void call() throws Exception {
postDeployMethod.invoke(processApplication.getRawObject(), getInjections(postDeployMethod));
return null;
}
});
}catch(Exception e) {
throw new StartException("Exception while invoking the @PostDeploy method ", e);
}
}
}
示例5: registerProcessApplication
import org.camunda.bpm.application.PostDeploy; //导入依赖的package包/类
@PostDeploy
public void registerProcessApplication(ProcessEngine processEngine) {
// lookup existing deployment
ProcessDefinition processDefinition = processEngine.getRepositoryService()
.createProcessDefinitionQuery()
.processDefinitionKey("startToEnd")
.latestVersion()
.singleResult();
deploymentId = processDefinition.getDeploymentId();
// register with the process engine
processEngine.getManagementService()
.registerProcessApplication(deploymentId, getReference());
isPostDeployInvoked = true;
}
示例6: startCaseInstance
import org.camunda.bpm.application.PostDeploy; //导入依赖的package包/类
@PostDeploy
public void startCaseInstance(ProcessEngine processEngine) {
CaseService caseService = processEngine.getCaseService();
caseService.createCaseInstanceByKey("loan_application",
Variables.createVariables()
.putValue("applicationSufficient", Variables.booleanValue(null))
.putValue("rating", Variables.integerValue(null)));
}
示例7: onDeploymentFinished
import org.camunda.bpm.application.PostDeploy; //导入依赖的package包/类
/**
* In a @PostDeploy Hook you can interact with the process engine and access
* the processes the application has deployed.
*/
@PostDeploy
public void onDeploymentFinished(ProcessEngine processEngine) {
long count = processEngine.getHistoryService().createHistoricProcessInstanceQuery().processDefinitionKey(PROCESS_DEFINITION_KEY).count();
// only generate if no process instances exist yet to not flood our database every restart of the container
if (count>0) {
return;
}
for (int i = 0; i < 100; i++) {
processEngine.getRuntimeService().startProcessInstanceByKey(PROCESS_DEFINITION_KEY);
}
}
示例8: onDeploymentFinished
import org.camunda.bpm.application.PostDeploy; //导入依赖的package包/类
/**
* In a @PostDeploy Hook you can interact with the process engine and access
* the processes the application has deployed.
*/
@PostDeploy
public void onDeploymentFinished(ProcessEngine processEngine) {
processApplicationReference = getReference();
}
开发者ID:camunda-consulting,项目名称:camunda-util-demo-data-generator,代码行数:9,代码来源:CamundaBpmProcessApplication.java
示例9: onPostDeploy
import org.camunda.bpm.application.PostDeploy; //导入依赖的package包/类
@PostDeploy
public void onPostDeploy(ProcessEngine processEngine) {
eventPublisher.publishEvent(new PostDeployEvent(processEngine));
}
示例10: sayHello
import org.camunda.bpm.application.PostDeploy; //导入依赖的package包/类
/**
* @param processEngine
*/
@PostDeploy
public void sayHello(ProcessEngine processEngine) {
}
示例11: postDeploy
import org.camunda.bpm.application.PostDeploy; //导入依赖的package包/类
@PostDeploy
public void postDeploy() {
isPostDeployInvoked = true;
}
示例12: fail
import org.camunda.bpm.application.PostDeploy; //导入依赖的package包/类
@PostDeploy
public void fail() {
throw new RuntimeException("expected exception");
}
示例13: injectDefaultEngine
import org.camunda.bpm.application.PostDeploy; //导入依赖的package包/类
@PostDeploy
public void injectDefaultEngine(ProcessEngine processEngine, List<ProcessEngine> processEngines, ProcessApplicationInfo processApplicationInfo) {
PostDeployInjectApp.processEngine = processEngine;
PostDeployInjectApp.processEngines = processEngines;
PostDeployInjectApp.processApplicationInfo = processApplicationInfo;
}
示例14: postDeploy
import org.camunda.bpm.application.PostDeploy; //导入依赖的package包/类
@PostDeploy
public void postDeploy(ProcessEngine processEngine) {
Assert.assertNotNull(processEngine);
}
示例15: postDeploy
import org.camunda.bpm.application.PostDeploy; //导入依赖的package包/类
@PostDeploy
public void postDeploy() {
INSTANCE = this;
}