How to Edit ProcessDefinition/WorkflowDefinition programatically

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2015 06:33 AM
Hi,
I am new to Activiti framework.
Is there is way by which I can edit a Process/WorkFlow Definition programmatically? i.e. Add new Task, Delete Task or Change Task sequence/Linking.
So my requirement is :-
1. Read a exsisting ProcessDefinition in-memory from database
2. Make some changes to it
3. Save the definition or save it as new definition
4. Instantiate the new definition
Please share some code by which is can accomplish this.
Thanks a lot in Advance.
I am new to Activiti framework.
Is there is way by which I can edit a Process/WorkFlow Definition programmatically? i.e. Add new Task, Delete Task or Change Task sequence/Linking.
So my requirement is :-
1. Read a exsisting ProcessDefinition in-memory from database
2. Make some changes to it
3. Save the definition or save it as new definition
4. Instantiate the new definition
Please share some code by which is can accomplish this.
Thanks a lot in Advance.
Labels:
- Labels:
-
Archive
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2015 06:59 AM
I have briefly checked the WorkflowDefinition class present in activiti-simple-workflow project but it seems that it can be used to create a new ProcessDefinition or Just Add Task to the definition.
But I also need following
1. Capability to change the sequence linking between task. I.e. adding task between two sequential task.
2. Delete a task. i.e. If we have following sequence A -> B -> C. I need to delete B and change the liking to A -> C.
I pretty much whole control over editing a existing Definition/Model programmatically.
Also please share links where I can find such help. Because I could not find any such help rather that digging into Activiti code base and Test cases.
But I also need following
1. Capability to change the sequence linking between task. I.e. adding task between two sequential task.
2. Delete a task. i.e. If we have following sequence A -> B -> C. I need to delete B and change the liking to A -> C.
I pretty much whole control over editing a existing Definition/Model programmatically.
Also please share links where I can find such help. Because I could not find any such help rather that digging into Activiti code base and Test cases.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2015 04:26 PM
Hi,
You can use the BpmnModel to make changes to an existing model and then use the BpmnXMLConverter to create a BPMN XML file from it and deploy it as a new version / new process definition.
Best regards,
You can use the BpmnModel to make changes to an existing model and then use the BpmnXMLConverter to create a BPMN XML file from it and deploy it as a new version / new process definition.
Best regards,
