Programmatic Creation/Updation of process definition

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2016 02:45 AM
Hi All,
We have a requirement to customize existing/deployed process definition and re deploy as new process.
We will provide a default process deployed into customer environment, where customer can update default process definition and make a new process out of it to deploy their own.
Where user can:
1. re order tasks in the default process.
2. change the user Task to service Task(goal is to complete task automatically, how to make user task to complete automatically?)
3. change the out going(from gateway) target task. e.g., on failure of a task process can go back to any of previous task.
User can not:
1. Add any new task or component.
User can only shuffle default process definition and create new process out of it to deploy.
We can not provide Activiti designer to update the process definition as they may not aware of designer components.
We are providing user with custom UI, with detailed process elements to shuffle. Then we need to build new process as per user changes.
My question is,
Can we build a new process dynamically in java(by using org.activiti.bpmn.model package?)
Is there any api to modify deployed process definition and create new process out of it?
Thanks in Advance,
Keshav
We have a requirement to customize existing/deployed process definition and re deploy as new process.
We will provide a default process deployed into customer environment, where customer can update default process definition and make a new process out of it to deploy their own.
Where user can:
1. re order tasks in the default process.
2. change the user Task to service Task(goal is to complete task automatically, how to make user task to complete automatically?)
3. change the out going(from gateway) target task. e.g., on failure of a task process can go back to any of previous task.
User can not:
1. Add any new task or component.
User can only shuffle default process definition and create new process out of it to deploy.
We can not provide Activiti designer to update the process definition as they may not aware of designer components.
We are providing user with custom UI, with detailed process elements to shuffle. Then we need to build new process as per user changes.
My question is,
Can we build a new process dynamically in java(by using org.activiti.bpmn.model package?)
Is there any api to modify deployed process definition and create new process out of it?
Thanks in Advance,
Keshav
Labels:
- Labels:
-
Archive
7 REPLIES 7
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2016 05:02 AM
Hi,
No, there is no such a API to modify a deployed process.
you could download the XML for the current process modify it and then redeploy the new version.
see: http://www.activiti.org/userguide/
"how to make user task to complete automatically?" –> read about boundary timer events.
No, there is no such a API to modify a deployed process.
you could download the XML for the current process modify it and then redeploy the new version.
see: http://www.activiti.org/userguide/
"how to make user task to complete automatically?" –> read about boundary timer events.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2016 05:05 AM
Hi Keshav,
In fact definition is stored in the DB. If you want to you can change content of the row as you wish. But I would not follow this approach.
I would expect more complications there. e.g. audit trail.
Another possibility is to deploy new definition and migrate currently running process instances to the now definition version. In your case it could be done automatically.
Regards
Martin
Can we build a new process dynamically in java(by using org.activiti.bpmn.model package?)yes AFAIK it will be supported in Activiti 6.
Is there any api to modify deployed process definition and create new process out of it?No, definition is immutable.
In fact definition is stored in the DB. If you want to you can change content of the row as you wish. But I would not follow this approach.
I would expect more complications there. e.g. audit trail.
Another possibility is to deploy new definition and migrate currently running process instances to the now definition version. In your case it could be done automatically.
Regards
Martin

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2016 06:07 AM
Thanks for reply, I will configure Activiti 6 and try to build the process.
Sorry, i did't mean to modify existing process. I just want to read existing process definition and create a new customized version of that process(in java) and deploy as separate process. is it possible with Activiti 6?
Thanks in advance,
Keshav
Sorry, i did't mean to modify existing process. I just want to read existing process definition and create a new customized version of that process(in java) and deploy as separate process. is it possible with Activiti 6?
Thanks in advance,
Keshav
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2016 03:13 AM
Hi Keshav,
In fact it should be supported in activiti5 too. 🙂 Get current definition's resource string modify it as you wish (e.g. automatically in java) and deploy it again.
Regards
Martin
In fact it should be supported in activiti5 too. 🙂 Get current definition's resource string modify it as you wish (e.g. automatically in java) and deploy it again.
Regards
Martin

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2016 10:11 AM
Thanks Martin for your inputs.
I configured activiti6(embedded into spring application), trying to create process dynamically.
Could you please provide some sample code to create a process dynamically? i didn't find any examples in forum/user guide(its not released for activiti 6).
I red from activiti 6 presentation: ". Support for dynamic features
-Tasks, processes related to process instance
-Re-route a process instance in a custom way
-Store the result as a new process definition"
These are the features we are looking for.
Could you please help us to get it done?
Thanks in Advance,
Keshav
I configured activiti6(embedded into spring application), trying to create process dynamically.
Could you please provide some sample code to create a process dynamically? i didn't find any examples in forum/user guide(its not released for activiti 6).
I red from activiti 6 presentation: ". Support for dynamic features
-Tasks, processes related to process instance
-Re-route a process instance in a custom way
-Store the result as a new process definition"
These are the features we are looking for.
Could you please help us to get it done?
Thanks in Advance,
Keshav
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2016 04:46 PM
Hi Keshav,
I have never used these features.
@Joram: Could you answer pls?
Regards
Martin
I have never used these features.
@Joram: Could you answer pls?
Regards
Martin
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2016 06:11 AM
Those are all future features that are not implemented yet.
The fundamental architecture is in place to support this, but it's not added to the engine yet.
The fundamental architecture is in place to support this, but it's not added to the engine yet.
