cancel
Showing results for 
Search instead for 
Did you mean: 

Approaches to adopt/integrate Activiti in web application

sudhir1
Champ in-the-making
Champ in-the-making
Hi,

I am in need to adopt activti in web application. I have spent some time on exploring activiti. I would like to know the best practices or ideas to adopt activiti in  a web application.

My web application layer has  icefaces->Spring ->JPA->database.

Currently I am thinking to have activiti integrated in my application as a service. So that other component can call services like completeTask, createProcess instance from the workflow service. UI layer is written in Icefaces and business layer will use workflow service to do workflow stuff.

Any suggestions or idea to achieve this.

Thanks,
Sudhir



Thanks,
3 REPLIES 3

frederikherema1
Star Contributor
Star Contributor
Since activiti has first class Spring-support, it's just a matter of configuring activiti in your app's spring-context and wiring in the datasource.
http://activiti.org/userguide/index.html#springintegration (be sure to read about transactions).

sudhir1
Champ in-the-making
Champ in-the-making
Since activiti has first class Spring-support, it's just a matter of configuring activiti in your app's spring-context and wiring in the datasource.
http://activiti.org/userguide/index.html#springintegration (be sure to read about transactions).

Thanks Fred. agree with you. I am using spring integration to fetch handle to process engine in my application.

I am trying to wrap activiti services (runtime,task…) inside my Workflowservice.My application code will access activiti services via WorkFlowService instead of direct access to activiti services.

The next question is related to end-end integration. On UI user will see my app form..after storing the information to database, I need to make call to the activiti to start the process instance. After that need to call activiti for tasks list and show it to the user. There will be some redundancy of data.. data in app db and data in activiti db. Also there is need to keep both data in sync. Any suggestions here..

Sudhir

jbarrez
Star Contributor
Star Contributor
The best approach is NOT to have redundancy in data and only store references in the Activiti DB.
Whenever you need the real data, use the reference to look up the 'real' data through some dedicated service.