AnsweredAssumed Answered

Usage of org.activiti.engine.impl.interceptor.Command

Question asked by siprell on Aug 16, 2012
Latest reply on Aug 16, 2012 by ronald.van.kuijk
Dear all,
we have successfully deployed activiti here at the customer's site, and are dealing with the obvious issues. The main issue at hand, is dealing with the process definition versions and moving existing process instances to new versions of the underlying definitions. I have found this low level command
SetProcessDefinitionVersionCmd
and have decided to build a  production grade solution around this.

I have written some commands to load all process instances linked to a deployment,  assert that the existing activities can be migrated to new versoins and stuff like that. The tests using mocked command contexts worked quite well, but the real deal, i.e. running it against a running activiti engine, ended in some issues.

The main issue, seems to be, that I am running in an invalid state, as the DB Session linked against the context is not initialized. I found this link here: http://forums.activiti.org/en/viewtopic.php?f=6&t=2218&view=next, which nails my specific problem.

But moving process instances from one version to another is very clearly not intended to be done from inside a running process. So here are my questions:

  • Is using Commands encouraged to do housekeeping on Activiti - even outside of process executions?

  • Which functions / operations are not supported in commands outside of process executions?

  • Is a explicit programatic db transaction / session handling available?
I am sure these are beginner questions, but I could not find any answers to this. If you do notice, that I am reposting a question, please tell me. I would greatly appreciate the extra effort of naming the thread of the original post :-)

Regards

Stefan

Outcomes