Search in sources :

Example 1 with AsyncJobAddedNotification

use of org.activiti.engine.impl.jobexecutor.AsyncJobAddedNotification in project Activiti by Activiti.

the class JobEntityManager method hintAsyncExecutor.

protected void hintAsyncExecutor(JobEntity job) {
    AsyncExecutor asyncExecutor = Context.getProcessEngineConfiguration().getAsyncExecutor();
    // notify job executor:      
    TransactionListener transactionListener = new AsyncJobAddedNotification(job, asyncExecutor);
    Context.getCommandContext().getTransactionContext().addTransactionListener(TransactionState.COMMITTED, transactionListener);
}
Also used : TransactionListener(org.activiti.engine.impl.cfg.TransactionListener) AsyncJobAddedNotification(org.activiti.engine.impl.jobexecutor.AsyncJobAddedNotification) AsyncExecutor(org.activiti.engine.impl.asyncexecutor.AsyncExecutor)

Aggregations

AsyncExecutor (org.activiti.engine.impl.asyncexecutor.AsyncExecutor)1 TransactionListener (org.activiti.engine.impl.cfg.TransactionListener)1 AsyncJobAddedNotification (org.activiti.engine.impl.jobexecutor.AsyncJobAddedNotification)1