cancel
Showing results for 
Search instead for 
Did you mean: 

Many to many relations

gianluca1
Champ in-the-making
Champ in-the-making
Hi,
suppose that I have to create a simple crm application with this process/form
- customers
- companies
- projects

Is it possible to have a field (autocomplete input or drop down) in the "insert project task" form that query the data in the "companies list" and save the many - to - many relation in the database? Is it possible to add a jquery autocomplete flavors?

If this are possible could you point me in the right direction?

Thank you,
Gianluca
5 REPLIES 5

frederikherema1
Star Contributor
Star Contributor
No sure what you're talkin about, activiti-explorer? Or just using activiti as a jar?

gianluca1
Champ in-the-making
Champ in-the-making
Thank you for your reply. I'm completely new to activiti, I think that be able to make a many to many relation between different process in a GUI (so the activiti explorere I guess) will be the best, but I can consider alternative method.

frederikherema1
Star Contributor
Star Contributor
Activiti explorer is just a simple app to view your tasks and completing them, that's it. Of you want to create an application that does other stuff and uses your model as wel, you're on your own. You can use activiti as a library and use the API, which is documented and described in the userguide.

http://activiti.org/userguide/index.html

gianluca1
Champ in-the-making
Champ in-the-making
Thank you, I red the docs, but I didn't found anything related to my question. I would like to know if it is possible to have in process A a relation to data inserted in process B, and store this information in the database (think this as a many-to-many relations between different processes).

frederikherema1
Star Contributor
Star Contributor
You can use process-variables to store the ID of the referenced process I suppose… Offcourse, there will be no foreign-key constraint of index in the database.

However, you can query all process-instances related to another, eg:

List<ProcessInstance> referencing = runtimeService.createProcessInstanceQuery().processVariableValue("refId", otherPocessInstance.getId()).list();