Search in sources :

Example 6 with ChainableRunner

use of org.drools.core.runtime.ChainableRunner in project jbpm by kiegroup.

the class HumanTaskConfigurator method addDefaultInterceptor.

@SuppressWarnings("unchecked")
protected void addDefaultInterceptor() {
    // add default interceptor if present
    try {
        Class<ChainableRunner> defaultInterceptorClass = (Class<ChainableRunner>) Class.forName(DEFAULT_INTERCEPTOR);
        Constructor<ChainableRunner> constructor = defaultInterceptorClass.getConstructor(new Class[] { Environment.class });
        ChainableRunner defaultInterceptor = constructor.newInstance(this.environment);
        interceptor(5, defaultInterceptor);
    } catch (Exception e) {
        logger.warn("No default interceptor found of type {} might be mssing jbpm-human-task-jpa module on classpath (error {}", DEFAULT_INTERCEPTOR, e.getMessage(), e);
    }
}
Also used : ChainableRunner(org.drools.core.runtime.ChainableRunner)

Example 7 with ChainableRunner

use of org.drools.core.runtime.ChainableRunner in project jbpm by kiegroup.

the class HumanTaskConfigurator method addErrorHandlingInterceptor.

@SuppressWarnings("unchecked")
protected void addErrorHandlingInterceptor() {
    // add error handling interceptor if present
    try {
        Class<ChainableRunner> defaultInterceptorClass = (Class<ChainableRunner>) Class.forName(ERROR_HANDLING_INTERCEPTOR);
        Constructor<ChainableRunner> constructor = defaultInterceptorClass.getConstructor(new Class[] { Environment.class });
        ChainableRunner defaultInterceptor = constructor.newInstance(this.environment);
        interceptor(8, defaultInterceptor);
    } catch (Exception e) {
        logger.debug("No error handling interceptor found of type {} might be missing jbpm-runtime-manager module on classpath (error {}", ERROR_HANDLING_INTERCEPTOR, e.getMessage(), e);
    }
}
Also used : ChainableRunner(org.drools.core.runtime.ChainableRunner)

Aggregations

ChainableRunner (org.drools.core.runtime.ChainableRunner)7 PersistableRunner (org.drools.persistence.PersistableRunner)2 KieSession (org.kie.api.runtime.KieSession)2 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 UserTransaction (javax.transaction.UserTransaction)1 CommandBasedStatefulKnowledgeSession (org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession)1 FireAllRulesInterceptor (org.drools.core.command.impl.FireAllRulesInterceptor)1 LoggingInterceptor (org.drools.core.command.impl.LoggingInterceptor)1 InternalKnowledgeRuntime (org.drools.core.common.InternalKnowledgeRuntime)1 SessionNotFoundException (org.drools.persistence.api.SessionNotFoundException)1 OptimisticLockRetryInterceptor (org.drools.persistence.jpa.OptimisticLockRetryInterceptor)1 TransactionLockInterceptor (org.drools.persistence.jta.TransactionLockInterceptor)1 MarshallingConfigurationImpl (org.drools.serialization.protobuf.marshalling.MarshallingConfigurationImpl)1 ExecutionErrorHandlerInterceptor (org.jbpm.runtime.manager.impl.error.ExecutionErrorHandlerInterceptor)1 AbstractBaseTest (org.jbpm.test.util.AbstractBaseTest)1 WorkflowRuntimeException (org.jbpm.workflow.instance.WorkflowRuntimeException)1 Test (org.junit.Test)1 KieBase (org.kie.api.KieBase)1 ExecutableRunner (org.kie.api.runtime.ExecutableRunner)1