cancel
Showing results for 
Search instead for 
Did you mean: 

Integrate activiti with external application

nbklot3
Champ in-the-making
Champ in-the-making
Hi,
We are trying to implement work flow in one of our existing applications and I'm trying to explore the different possibilities or solutions using activiti. We are planning to create a generic work flow with 2 tasks - one to receive an object with field name and values and user task to provide the approval. (I have attached the process file)
1. User A submits changes in external application
2. Application kicks off a new work flow instance
3. A change request form is automatically generated and the object is sent to workflow engine
4. Workflow engine sends the task to the approver assigned to the user task
5. User B looks up tasks assigned and should be able to browse and view the object data
6. User B approves the change in external application
7. external application sends approval action to workflow engine
8. Workflow engine executes a web service to persist data in actual database

example of object - <InfoObject><field name=“name” id=”name”>Arun</field><field name=“department” id=“23”>Information tech</field>
</InfoObject>

can you please provide pointers or suggestions on implementing these use cases. Thanks in advance!

Thanks,
Arun
5 REPLIES 5

nbklot3
Champ in-the-making
Champ in-the-making
attached the process file

jbarrez
Star Contributor
Star Contributor
What exactly are you looking pointers for? Your use case is definitely possible using Activiti.

You object is a plain XML file, so no problems there: just store it as a process variable and manipulate it in your service tasks

nbklot3
Champ in-the-making
Champ in-the-making
Hi,

Thanks for your reply, I need help in receiving the object/xml in activiti and saving the data from object into activiti. How could this be done? any pointers or sample code for this functionality?
After approval, I can just pull all the variables associated with the task id and getVariables(), then form the xml/object and send it back to external application.

Thanks,
Arun

jbarrez
Star Contributor
Star Contributor
The easiest is to just set your xml as a process variable (runtimeService.setProcessVariable), before you call your process (eg when you're in a usertask by calling the taskService.complete() method or else the runtimeService.signal() method)

nbklot3
Champ in-the-making
Champ in-the-making
Thanks for your reply