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
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.
ok that worked. thanks
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.