Hi there,
Does anyone know how to list the tasks asisgned to a user via the alfreso-js-api ?
I'm using the TasksApi.listTasks method but the documentation describing the TaskQueryRepresentation parameter is dreadful. (Unfortunately very typical of Alfresco developer documentation)
I'm assuming "assignment" is the option I need to set but all the docs tell me is that its a "string". Great, no help whatsoever.
The REST API docs are no better, again its a string.
I've tried using user names, emails, id etc, but all seem to be ignored. I've even tried putting complete junk into the field and it still returns all tasks for the current user (admin) so I'm begining to think assignment is not the field I'm after.
Any ideas?
Thanks
Paul
Ok, so I found some information on "assignment"
Apparently it will accept the values "assignee", "candidate", "group_x" (where x is the group id). Leaving it empty will list tasks that the current user is involved in.
This doesn't help as I need to get the list of tasks that have been assigned to a specifc user (ideally identified by their user id).
Anyone know if this is possible?
The Activiti-Admin app can do it so I could implement my own REST call to mirror what it does. The problem is the admin app wouold require a different login....
Paul
Another update...
According to the REST API docs, if I login as an admin user, I can impersonate another user by including:
activiti-user and activiti-user-value-type in the request header.
Where, activiti-user should be set to the required user account identifier and activiti-user-value-type to the user account identifier type. The header activiti-user-value-type can be one of the following values:
userIdType: User’s database ID
userEmailType: User’s Email address
userExternalIdType: User’s ID in an external authentication service such as LDAP or Active Directory
I tried in Postman and can't gte it to work. Has anyone every tried this?
Anyone know if there is a alfresco-js-api "feature" for this?
Thanks
Paul
Ahhh, so the postman issue is resolved - stupid typo on my part.
However, that does mean if you get the user credentials wrong then it returns all the tasks for the current logged in user rather then an error or no tasks....not exactly very useful.
Paul
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.