0 Replies Latest reply on Feb 27, 2015 3:12 PM by Mike Yarbrough

    Is there a way to have environment dependent timers?

    Mike Yarbrough Newbie

      I'm looking for a way to automatically separate out what gets started automatically in my dev, test, and prod environments without having to change the kie.


      I see that it would (hopefully) be a fairly simple change the ProcessRuntimeImpl constructor so that instead of calling initStartTimers() to search for start nodes. I can call a method that would look at the database for a table that I've created, construct a WorkingMemoryAction for each entry and execute it.


      AFAICT though, it looks like CD injecting an extension of the ProcessRuntimeImpl is not gonna work the same way that, say, injecting the ExecutorRunnableImpl would.


      I see though that the provider of the ProcessRuntimeFactory "ServiceRegistryImpl" does have a way to add a default value which is hardcoded to "org.jbpm.process.instance.ProcessRuntimeFactoryServiceImpl".


      Is there a way to override this default? possibly with a config setting?


      Excluding that, is there a way to abstract the process schedule away from the kie?