cancel
Showing results for 
Search instead for 
Did you mean: 

How to integrate/map my application data with Activiti data?

vishalzanzrukia
Champ in-the-making
Champ in-the-making
Hi,

This is my first post to this forum. I am sorry but I have posted my question to stackoverflow (below link). Can you please look at this and give some feedback?

http://stackoverflow.com/questions/35887850/how-to-integrate-map-my-application-data-with-activiti-d...
4 REPLIES 4

hari
Star Contributor
Star Contributor
Hi,

I would suggest you to keep your application related tables separately from the activiti tables.
As far as your leave application process is concerned,  create a bpm with 2 user tasks one for the Manager and the other for the employee and your process accepts the employee name, leave from and leave to dates,  reason etc.
As far as maintaining users is concerned, you can use your application users only(Maintained in LDAP or in your DB) and not maintain them in activiti. You will have to maintain them in activiti tables only if you are using activiti-explorer.

You can fetch all tasks assigned to user as below
MyProcessEngine.getTaskService().createTaskQuery().taskAssignee(userName).list();
As you must be aware, the above line of code brings you the list of tasks assigned to user with the name you pass.  Hence you need not maintain them at multiple places. 

vishalzanzrukia
Champ in-the-making
Champ in-the-making
Hello asriharikiran,

Thanks for your reply. I know about how can I get list of tasks assigned to particular user, but question was more about how to assign those tasks to particular user which does not exist in activiti database, it only exist in my application database. Should I need to add all users into activiti database by using <code>identityService</code> ? and then only I can assign tasks to users? or is there any way to assign tasks to users which are in only my application database?

hari
Star Contributor
Star Contributor
Hi Vishal,

When you assign a task to a user, I don't think the user needs to be present in the activiti db.
Lets assume myuser is a variable which holds the userid/user name to which the task needs to be assigned so in the user task set Assignee to ${myuser}.

vishalzanzrukia
Champ in-the-making
Champ in-the-making
Yes, you are right. Thanks for your time.