cancel
Showing results for 
Search instead for 
Did you mean: 

Extend Users of Activity ?

matrixise
Champ in-the-making
Champ in-the-making
Hi all,

From Activiti, I would like to call XML-RPC services via a scriptTask in Groovy but I have to use the user_id and the password in the requests.

Is there a way to store the identifier of the user of the remote service ?

a. Add a new column in the table for the users ? How to do ?
b. How do you do ? Do you have an other idea ?

Thank you,
3 REPLIES 3

jbarrez
Star Contributor
Star Contributor
That's something you'll have to add yourself. I would maybe use indeed a database table + an encryption key configured on process engine config level.

matrixise
Champ in-the-making
Champ in-the-making
Hi Joram,

I started to check UserIdentityManager and the activiti-ldap module. I think I can find my solution.   I don't know the process engine config level, but this config is a global config or a local config for each instance of the workflow (process) ? Because I would like to avoid a lot of "login" to my service and then use the RPC (rest, xml-rpc) with the credentials.

In fact the idea is the following: when I create a user in my service, I create this one in Activiti with the "cookie"/"credentials" of my service.
In the Process, I will have some script tasks, I would like to use a "current" user, ( I think it's possible but not sure, I have to check the evaluation context for the script task) and with the "current" user, I will send the credential from my custom user table to my service.

Do you agree ? or do you have an other idea ?

Thanks

jbarrez
Star Contributor
Star Contributor
The config is a global config, engine-wide.

However, the login is however you want it. If you don't want to relogin you will have to write the code to do so.
The current user is something you can store on a ThreadLocal (check for example the setAuthenticatedUser() method on the IdentityService)