Timer intermediate event doesn't fire

Hello,

I’m creating a spring boot application that runs on my local machine. It hosts a pretty simple BPMN like below:

The “Timer intermediate event” has duration “PT10S”. Ideally, it should wait for 10s and then move to the next user task. However, it doesn’t fire at all. I have to stop my local spring boot application and restart it. Then the process instance moves to the next user task.

My SpringProcessEngineConfiguration is:

        SpringProcessEngineConfiguration config = new SpringProcessEngineConfiguration();
        config.setDataSource(dataSource());
        config.setTransactionManager(dataSourceTransactionManager());
        config.setDatabaseSchemaUpdate(
                ProcessEngineConfiguration.DB_SCHEMA_UPDATE_FALSE); // If DB schema doesn't match, throw the exception.
        config.setDeploymentResources(processDefinitionResources); // Auto deploy bpmn files
        config.setAsyncExecutorActivate(true); // Enable async executor for external service task.
        config.setDisableIdmEngine(true);

Any idea about this issue?

PS: I’m using flowable 7.1.0

Thanks,
Marshall

hey @marshallz,

Can you please share a simple reproducible project where we can try this? It is strange that it does not fire at all. If you are not using our out-of-the-box spring boot starter, perhaps you have some misconfiguration in your setup.

Cheers,
Filip

another way around this, instead of the Timer intermediate event: add a sample user task (which acts as a timer) and attach to it a boundary timer event which cancels the user task and process to the next items in the flow.

Thank you for your response, @filiphr!

I will upload the code to github as soon as possible and get back to you.

Thank you for your reply, @Paulo !

In my real BPMN workflow, I have both Timer intermediate event and Timer boundary event. None of them works. That’s why I created the simplest workflow for troubleshooting, and it still doesn’t work. It seems like I have some misconfiguration wrong.

Hi @filiphr ,

The demo code is here: GitHub - gospel1985/flowable-learning

There are two APIs in this app. The start API can kick off a new instance. The diagram API render a diagram that shows what the workflow is at now.

You can access these APIs with following url:
http://localhost:8080/swagger-ui/index.html

The demo app is set up with h2 mem database now. Once you kick off a new instance, it never moves to the next user task.

I also commented SQL Server data source. If you replace those placeholders with your DB Info, you can repro the other behavior I mentioned above: the instance doesn’t move from the timer to the next user task. But if you stop the application and restart it, it will move to the next user task.

Hey @marshallz,

I see that you have added the Flowable Spring Boot starters. Is there a reason for the FlowableProcessEngineConfiguration and FlowableProcessEngineConfiguration?

If I get rid of those 2 classes. And adjust the application properties to:

spring:
  application:
    name: demo
  datasource:
    url: jdbc:h2:mem:flowable;DB_CLOSE_DELAY=1000
    username: sa
    password: password
    driverClassName: org.h2.Driver
flowable:
  process-definition-location-prefix: classpath*:/flowable/autodeploy/
  idm:
    enabled: false

then everything works as expected

Thank you, @filiphr !

I tested your suggestions and it worked!

The reason I have those two configuration classes is because the open source document mentioned I need to start with a configuration.

Few more questions:

  1. It seems like the starter (or the autoconfigure) dependency is conflict with SpringProcessEngineConfiguration. Do you know why?

  2. My company manages DB update separately. So I should use flowable.database-schema-update=false to stop the engine updating the DB schema if they don’t match. Is that right?

  3. Just curious. If I wish to create the configuration with code, which dependencies I should use?

Hey @marshallz,

Well if you want to use the Flowable Spring Boot starters you need to make sure you configure things properly.

Yes indeed, you can use that property to disable the DB schema update from Flowable.

You should then use the the engine / rest dependencies. It really depends what you need from Flowable.

Cheers,
Filip