All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.kie.kogito.handlers.CalculationService_calculateTotalHandler Maven / Gradle / Ivy

There is a newer version: 0.9.0
Show newest version
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";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy