Recently I am developing a system for our Gov and I found a issue during "Suspend/Activate" a process instance.
Following steps can recreate this issue:
1. Deployed the "activiti-rest" and the "activiti-explorer" into a same jboss, and make sure they connected to a same DB(I use the DB Jndi)
2. Suspend or activate a process instance in the "activiti-explore".
3. I found after I suspend or activate a process instance thru the activiti-explorer, I can still use the REST interface "http://localhost:8080/activiti-rest/service/runtime/process-instances" to start the process instance. Seems the "status" not refresh immediately…and I restart the JBOSS, then I tried to start the process instance like "myProcess" then I got the exception "myProcess:9:8451 is suspended, can not start".
My question is:
Why the activated or suspended status not refresh immediately? until I restart the JBOSS/TOMCAT, then the activated or suspended status will be effected? This is quite inconvenience, is there any way to activate or suspend the process instance immediately or I missed something else?
I guess you're talking about suspending a process definition, rather than a process instance? The issue here has to do with process-definition caching. Parsed process definitions are cached in-memory for performance reasons. An entity updated in another JVM/activiti-engine will nog update the cache on other engines, leaving behind the "unsuspended" definition to use, when it should be suspended.