Package com.camunda.sample.customerregistration

Examples of com.camunda.sample.customerregistration.ScoreResult


  @Inject
  private CallbackService callbackService;
 
  public void execute() throws Exception {
    System.out.println("Request scoring for " + customer);
    ScoreResult scoreResult = scoringService.getScoringForCustomer(customer);
    if (scoreResult.isAsynchronousAnswer()) {
      System.out.println("score requested, but will be delivered asynchronously after " + customer.getZipCode() + " milliseconds with correlation key " + scoreResult.getAsynchronousCorrelationKey());
      businessProcess.setVariable("scoreResultCorrelationKey", scoreResult.getAsynchronousCorrelationKey());
      callbackService.triggerAsynchronousCallback(customer, scoreResult.getAsynchronousCorrelationKey());     
    }
    else {
      System.out.println("score received immidately");
      customer.setScoringPoints(scoreResult.getScoringPoints());
    }   
  }
View Full Code Here

TOP

Related Classes of com.camunda.sample.customerregistration.ScoreResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.