There are a motive for not exist a exposed API for 'SetProcessDefinitionVersionCmd' ?
![wendelkerr wendelkerr](https://connect.hyland.com/legacyfs/online/avatars/Blue-user-logo.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2013 04:14 PM
Att,
Wendel Kerr
- Labels:
-
Archive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2013 05:53 AM
However, since it's present in the codebase and tested, you can off course use it if you keep you're head with it. You can get a command-executor from the ProcessEngineConfigurationImpl (indeed a cast needed).
![wendelkerr wendelkerr](https://connect.hyland.com/legacyfs/online/avatars/Blue-user-logo.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2013 10:49 AM
What do you think about we expose in the API, and explain in the javadoc that this method need to be used very carefully(I think it is explained already, but we can explain more) , and the every application is responsible for treat the exceptions thrown. Since everybody knows there are no miracle in change the version of process definitions.
Att,
Wendel Kerr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2013 11:07 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2013 04:37 PM
We realize that if we try to migrate an instance which its current task doesn't exist in the the destination process, the method will throw an Exception. But, what's the matter with it? The SetProcessDefinitionVersionCmd may let the instance somehow inconsistent?
I've just read the the Activiti In Action's section Dealing with process versioning and didn't realized how do you really deal with the limitation "that the already-running process instances will keep running against the existing version of the process definition." It's very common issue for us…
![mikedias mikedias](https://connect.hyland.com/legacyfs/online/avatars/Blue-user-logo.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2013 05:06 PM
And if the API method was called "tryUpdateProcessDefinition"? The volatile of method would be more clear!
Something like: "No miracles here" 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2013 04:00 AM
managementService.executeCommand()
, however this opens up a lot of the internals and might not be such a good idea ![Smiley Wink Smiley Wink](/i/smilies/16x16_smiley-wink.png)
![mikedias mikedias](https://connect.hyland.com/legacyfs/online/avatars/Blue-user-logo.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-19-2013 05:54 PM
I don't know if a method with "try" in the name is a good idea, but your limitation becomes more clear!
![Smiley Happy Smiley Happy](/i/smilies/16x16_smiley-happy.png)
As @silvioneto said, we don't understand why update process definition is so evil ]:-> … If the current activity exists in the new process definition, update. Otherwise, don't update. No miracles, right? This is OK for us. There is another situation that migration is a problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2013 03:54 AM
However, it can easily go wrong. What if you have a user task. Now, in the next version this user task is part of a fork/join ie it is in parallel. Wehn you now simply use the method …. your process will be wrong, because you actually need to create an execution tree that maps to the new parallel behavior.
And this is only a very simple example, and as such it's a 'dangerous' thing
![mikedias mikedias](https://connect.hyland.com/legacyfs/online/avatars/Blue-user-logo.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2013 06:58 PM
So, I agree with @frederick said. Execute a command via API is certainly a better option. Can we send a pull request with this?
PS: In the amazing activiti-neo4j, this will not be a problem!
![Smiley Wink Smiley Wink](/i/smilies/16x16_smiley-wink.png)
![](/skins/images/03B8A94CA56FA229F89023906A8B0EC4/responsive_peak/images/icon_anonymous_message.png)