AnsweredAssumed Answered

The best way to get data from Mysql DB

Question asked by bargan on Jun 25, 2014
Latest reply on Jun 26, 2014 by bargan
Hi all,
I want to create a custom vacation request process.
In my project i have to add somme users in the activiti Mysql DB (i add them in act_user_id), and i create two other tables calls service (this table contains ids, names of services and manager_name) and  a table relationship (id_user and id_serivce) contains foreign key of id_service and ID_ (id of table act_user_id).
So in my process, when a user log on in activiti-explorer, he'll fill and validate the form, if this current user is manager his request will be sent directly to RH manager, else, if the current user is sample employee his request will be send to his manager to validate it.

My questions are:
1) am i right to create ohter users and tables in activiti DB?

2) How can i get the current user ( should i use serivceTask and implemsts a java code and sql queries or other there is other choice)?

3) To store the result of this java class should i use resultVariable ?
4) at last, how can i do the unit test for this ServiceTask to test if i get the true result?

please help for any thing suggestion, links or examples
Thank you