Sync process start behaviour in process engine

I want to start with assumptions. As far as I know flowable 5 engine was first having only sync process execution and because of the bottlenecks async process execution is also added to framework. Since the results from the async process execution was much way better than the sync execution, flowable 6 engine is only using async process execution now.

I write a spring-boot application has only one responsibility which is starting a process via the down call.

runtimeService.startProcessInstanceById

The problem is, I am having some custom beans in the process definition and when I start the process, process engine is expecting these custom beans in the class path of the my spring boot app that started the process and if they dont exist in the classpath I am getting exception as you all expect. I put a timer job which is 30 sec after the start node of process definition and set flowable.async-executor-activate flag to false and I saw that this time process is executed by the task-service(which has all custom beans) and I didn’t get any exception about the missing custom beans in classpath.

However It is said that there is no sync behavior in flowable 6 engine, I believe that process is starting in sync behavior and then switching to async mode. I need to be sure about this because I want to know where to deploy my custom beans and I dont want to deploy my all custom beans to every flowable instance. Can you guys englighten me about this issue :slight_smile:

Thanks.

No, that assumption is incorrect. in v5 and v6, whether to make something async has always been a choice when creating the process model: you can say in a fine-grained way which steps needs to be asyc and which shouldn’t.

But I assume you’re talking about the async executor (for async steps in a process)?

I’m reading from this that you don’t have the same classpath everywhere?

What seems to be happening is that the nodes where you have async steps have a need for certain classes on the classpath. For Spring Boot, the default is indeed to activate the async executor: https://github.com/flowable/flowable-engine/blob/master/modules/flowable-spring-boot/flowable-spring-boot-starters/flowable-spring-boot-autoconfigure/src/main/java/org/flowable/spring/boot/FlowableProperties.java#L38