10-17-2016 10:13 AM
<?xml version="1.0" encoding="UTF-8"?>
<beans …>
<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
<property name="dataSource" ref="dataSource" />
<property name="transactionManager" ref="transactionManager" />
<property name="failedJobCommandFactory">
<bean class="org.test.commandFactories.FailedJobCommandFactory" />
</property>
</bean>
</beans>
package org.test.commandFactories
import org.activiti.engine.impl.jobexecutor.FailedJobCommandFactory;
import org.activiti.engine.impl.interceptor.Command;
import org.activiti.engine.impl.interceptor.CommandContext;
public class JobCommand implements Command<Object> {
private String jobId;
private Throwable exception;
def public JobCommand(String jobId, Throwable exception) {
this.jobId = jobId;
this.exception = exception;
}
@Override
def public Object execute(CommandContext commandContext) {
println "HELLO2!"
}
}
public class FailedJobCommandFactory implements FailedJobCommandFactory {
@Override
def public Command<Object> getCommand(String jobId, Throwable exception) {
println "HELLO1!"
return new JobCommand(jobId, exception);
}
}
10-25-2016 08:16 AM
10-26-2016 02:03 AM
10-31-2016 06:14 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.