本文整理汇总了Java中org.camunda.bpm.engine.delegate.ExecutionListener.notify方法的典型用法代码示例。如果您正苦于以下问题:Java ExecutionListener.notify方法的具体用法?Java ExecutionListener.notify怎么用?Java ExecutionListener.notify使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.camunda.bpm.engine.delegate.ExecutionListener
的用法示例。
在下文中一共展示了ExecutionListener.notify方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: notifyExecutionListener
import org.camunda.bpm.engine.delegate.ExecutionListener; //导入方法依赖的package包/类
protected void notifyExecutionListener(DelegateExecution execution) throws Exception {
ProcessApplicationReference processApp = Context.getCurrentProcessApplication();
try {
ProcessApplicationInterface processApplication = processApp.getProcessApplication();
ExecutionListener executionListener = processApplication.getExecutionListener();
if(executionListener != null) {
executionListener.notify(execution);
} else {
LOG.paDoesNotProvideExecutionListener(processApp.getName());
}
} catch (ProcessApplicationUnavailableException e) {
// Process Application unavailable => ignore silently
LOG.cannotInvokeListenerPaUnavailable(processApp.getName(), e);
}
}
示例2: consumer
import org.camunda.bpm.engine.delegate.ExecutionListener; //导入方法依赖的package包/类
public static Consumer<DelegateExecutionEvent> consumer(final ExecutionListener listener) {
return event -> {
try {
listener.notify(event.getData());
} catch (Exception e) {
throw new ProcessEngineException(e);
}
};
}