AnsweredAssumed Answered

Activiti Engine in primary-standbyserver setup

Question asked by sankalpn on Feb 29, 2016
Latest reply on Mar 2, 2016 by sankalpn
Hi all,

     I am using embedded activiti engine for my workflows. In production deployment, we have two servers in primary-standby mode and I don't control that deployment. Both the servers share activiti engine database, as standby needs to pick up workflow execution in case of fail-over.

     Now, in my workflows, there is an admission control step, which throws error for any duplicate invocation. This is needed to avoid duplicate API calls to a third party web service, which are not guaranteed to be idempotent. Also, there are intermediate timer events. What I noticed is, when the workflow on primary enters an intermediate timer event, activiti engine on secondary starts executing the workflow from the start. This is detected as a duplicate invocation (based on status response from the third party web service) and secondary server throws error. But this fails workflow on primary as well, owing to shared database and same workflow instance ID.

    1) Does this sound like error in activiti engine configuration or code?
    2) As a solution, is there a way to configure activiti engine in a standby mode, i.e. not executing workflows till some API is called? I can have a fail-over API to tell activiti engine to start executing workflows again.
    3) Is there some documentation describing activiti deployment best practices for failover in primary/standby mode? I have seen forums talk of clustered mode, but it will not work in cases like mine, where workflow steps are not strictly idempotent.

Thanks,
Sankalp

Outcomes