I am trying to implement leave management module with Web Application
using Activiti Workflow Engine
, MySQL db and Spring Boot.
It basically includes apply for leave, assign to reporting manger, assign to hr if reporting manager does not respond in time, approve/reject leave etc etc.
I am beginner for activiti workflow. I am able to get basic concepts from this user-guide : http://www.activiti.org/userguide/ but I have couple of questions which I am not able to figure out from this documentation.
- General data : Should I need to use separate database for my business logic or should I need to add new tables into existing database which is being used by activiti itself?
- User data : I need to assign leaves to particular user and need to retrieve leaves assigned to particular user and also it should be role wise like hr, reporting-manager. I know
identityService
andtaskService
from activiti provides me the facility toCreate User
,Save User
,Retrieve Tasks
for particular user but my question is how can I map my application related User fields with activiti users? I can see couple of options to achieve this as given below, but not sure which is recommended and ideal.- Create new tables for User to achieve my business need and duplicate the data in Activiti related tables as well and map them using email-id.
- Do not use Activiti related User tables at all and Add workflow related fields into my business related User table so that I can retrieve all things from one place. There will not be data duplication.
- Do not create any extra new table related to User and Add extra fields into Activiti related User table as per my business need.
Please suggest the best approach from above and also suggest some directions how can I achieve the same? Thanks in advance.