当前位置: 首页>>代码示例>>Java>>正文


Java PostDeploy类代码示例

本文整理汇总了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();
}
 
开发者ID:camunda,项目名称:camunda-bpm-mail,代码行数:17,代码来源:PrintServiceProcessApplication.java

示例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);
}
 
开发者ID:camunda,项目名称:camunda-get-started-dmn,代码行数:21,代码来源:DinnerApplication.java

示例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);
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:20,代码来源:InvoiceProcessApplication.java

示例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);
    }
  }

}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:20,代码来源:ProcessApplicationStartService.java

示例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;
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:20,代码来源:PostDeployRegistrationPa.java

示例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)));

}
 
开发者ID:camunda,项目名称:camunda-get-started-cmmn,代码行数:10,代码来源:LoanApprovalApplication.java

示例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);      
  }

}
 
开发者ID:camunda,项目名称:camunda-cockpit-plugins,代码行数:18,代码来源:CamundaBpmProcessApplication.java

示例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));
}
 
开发者ID:camunda,项目名称:camunda-bpm-spring-boot-starter,代码行数:5,代码来源:SpringBootProcessApplication.java

示例10: sayHello

import org.camunda.bpm.application.PostDeploy; //导入依赖的package包/类
/**
 * @param processEngine
 */
@PostDeploy
public void sayHello(ProcessEngine processEngine) {
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform-osgi,代码行数:7,代码来源:MyProcessApplication.java

示例11: postDeploy

import org.camunda.bpm.application.PostDeploy; //导入依赖的package包/类
@PostDeploy
public void postDeploy() {
  isPostDeployInvoked = true;
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:5,代码来源:CustomSpringServletProcessApplication.java

示例12: fail

import org.camunda.bpm.application.PostDeploy; //导入依赖的package包/类
@PostDeploy
public void fail() {
  throw new RuntimeException("expected exception");
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:5,代码来源:PostDeployFailureApp.java

示例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;
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:7,代码来源:PostDeployInjectApp.java

示例14: postDeploy

import org.camunda.bpm.application.PostDeploy; //导入依赖的package包/类
@PostDeploy
public void postDeploy(ProcessEngine processEngine) {
  Assert.assertNotNull(processEngine);
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:5,代码来源:CustomEjbProcessApplication.java

示例15: postDeploy

import org.camunda.bpm.application.PostDeploy; //导入依赖的package包/类
@PostDeploy
public void postDeploy() {
  INSTANCE = this;
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:5,代码来源:ReferenceStoringProcessApplication.java


注:本文中的org.camunda.bpm.application.PostDeploy类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。