cancel
Showing results for 
Search instead for 
Did you mean: 

Figure out if workflow is running async

drams
Champ in-the-making
Champ in-the-making
We would like to be able to find out whether a workflow is currently working in asyc or synchronous mode. Is there any way to find this out through the API's? We have a business requirement around logging that has to take this into account.

Thanks!
1 REPLY 1

frederikherema1
Star Contributor
Star Contributor
Currently, there is no way to figure this out in the API. The only difference there is, is that an asynchronous activity is run from a jobexecutor thread as opposed to regular API-calls, which are run in the caller's thread.

One solution whould be to check if there is a JobExecutor context active for the current thread, eg:


import org.activiti.engine.impl.context.Context;



boolean isAsync = Context.getJobExecutorContext() != null;

Getting started

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.