Hi,
first of all: i'm a new to activiti - but used to work for years with jbpm.
My question: How to shut down the engine without destroying executed serviceTasks.
All of my serviceTasks are running very short. So - it would be good that if the engine
is going to be shut down it won't start any new serviceTasks and will wait for all allready started
servicetasks to 'end'.
My suggested solution to this is to provide a global volatile static variable which is set if i want to shut down the system.
Each 'new' serviceTask (java) will wait forever (in the very first line of code) if this variable is set. So no new funtionallity is
run after the 'shutdown' signal was set.
After a little time - i will shut down the system assuming that all allready 'really' running tasks are completed… and all 'new' running tasks are sleeping before any business functions is started …… which wlll be hopefully started after the system is up again…
Good or bad idea?