05-01-2018 11:43 PM
I have an Activiti form (Alfresco Process Services) where I have a people control from the default stencil.
I am trying to get the email address of the user selected on the form (n example below, I selected Administrator user). In the java delegate after the form submit, I am doing this to get the user
execution.getEngineServices().getIdentityService().createUserQuery().userId(1).singleResult()
however the query result is returning of length 0 so singleResult is returning null. So I cant get the email address.
I checked in the users table, there is administrator user with Id = 1.
this is the first time I am trying to use this API. Am I missing something?
Is there any other way of getting the user for UserId = 1?
thanks in adavance..
Prashant
05-02-2018 07:24 AM
The identity service in community is not used in Alfresco Process Services. User Info Bean (userInfoBean) | Alfresco Documentation is one way to fetch it. There is a lot of other Java APIs too that you can use. As a customer you can get access to the Alfresco Nexus Repository from where you can download the java docs as well as the source code of Alfresco Process Services to find out all the available Java APIs/Spring Beans.
05-02-2018 09:12 AM
ok that worked. thanks
Explore our Alfresco products with the links below. Use labels to filter content by product module.