Extend Users of Activity ?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2015 06:13 PM
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,
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,
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2015 06:22 AM
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.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2015 06:32 AM
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
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
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2015 04:58 AM
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)
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)
