org.kie.kogito.handlers.CalculationService_calculateTotalHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jbpm-quarkus-example
Show all versions of jbpm-quarkus-example
Order management service
package org.kie.kogito.handlers;
@javax.enterprise.context.ApplicationScoped()
public class CalculationService_calculateTotalHandler implements org.kie.api.runtime.process.WorkItemHandler {
@javax.inject.Inject()
org.kie.kogito.examples.CalculationService service;
public void executeWorkItem(org.kie.api.runtime.process.WorkItem workItem, org.kie.api.runtime.process.WorkItemManager workItemManager) {
java.lang.Object result = service.calculateTotal((org.kie.kogito.examples.demo.Order) workItem.getParameter("Parameter"));
workItemManager.completeWorkItem(workItem.getId(), java.util.Collections.singletonMap("Result", result));
}
public void abortWorkItem(org.kie.api.runtime.process.WorkItem workItem, org.kie.api.runtime.process.WorkItemManager workItemManager) {
}
public String getName() {
return "org.kie.kogito.examples.CalculationService.calculateTotal";
}
}