cancel
Showing results for 
Search instead for 
Did you mean: 

Updating application specific variables

leonpennings
Champ in-the-making
Champ in-the-making
Hi,

I would like to be able to update a defined taskform and/or the implementation classes of a Task assignment on UserTasks or implementationClasses/assignment classes on ServiceTasks for a deployed processdefinition - but couldn't find a way to do so, other than updating the bpmn file and redeploying that one.
Since the process itself is not changing, just our implementation specific code this would not be our prefered way to go.
Do I have other options here, our is a re-upload of the bpmn configuration the only option?

grtz,

Leon..
6 REPLIES 6

trademak
Star Contributor
Star Contributor
You want to define other class names for listeners and/or service tasks?
Currently the only way is to update the BPMN definition and redeploy it.

Best regards,

leonpennings
Champ in-the-making
Champ in-the-making
Hi Tijs,

thanks for the response, I was afraid that was the only option.
The problem here is that I have implementation consultants writing the bpmn files and not the developers.
Spelling errors are easily made in package names for implementation classes - so being able to correct the deployment specific variables would be a big plus.

I think from the activiti side you build the processdefinitions from the uploaded xml file every time activiti is started/restarted right?
So in order to update these variables on the existing process you'd have to modify the uploaded xml.. not a fun job…

From what I've gathered, after a processdefinition is loaded from the bpmn definition, it stays in a cache. So our team could create some sort of post load hook that will update the variables in the cache.
Not the nicest solution, but always better than having implementation consultants copy/pasting or typing classnames..

grtz,

Leon..

frederikherema1
Star Contributor
Star Contributor
As of 5.13, the cache could actually evicts entries if it's full (not likely to happen, but it could). If you deploy a new process-definition (with the typo's corrected), the running instance will still point to the old definition. You can use the SetProcessDefinitionVersionCmd for this (use managementService.executeCommand(..)), AT YOUR OWN RISK Smiley Wink So read the javadoc for that class, so you know what it does. If you are 100% sure that the "classname" change is the only thing that you have done, it's safe to just "up" the version of process-definition the processes point to.

leonpennings
Champ in-the-making
Champ in-the-making
Hi Frederik,

thanks for the addition, I hadn't considered the running processes.

Sound like I have a feature request then,
I would like to be able to update form names and implementation classes for tasklisteners, add and remove tasklisteners and change implementation classes for servicetasks for deployed processdefinitions without changing the version number.

functionally this sounds like something that would be desirable anyway - especially with applications that embed activiti, but since I'm the only one with this issue my guess is that the chance this will be included anytime soon is quite low right?

grtz,

Leon..

trademak
Star Contributor
Star Contributor
Hi Leon,

You are definitely not the only one asking for that kind of functionality. So please create a JIRA for this.

Best regards,

leonpennings
Champ in-the-making
Champ in-the-making
Hi Tijs,

good to hear 😉
here you go:
http://jira.codehaus.org/browse/ACT-1810

grtz,

Leon..