[midPoint] Obtaining tasks using REST API

Alcides Carlos de Moraes Neto alcides.neto at gmail.com
Tue Feb 6 22:31:20 CET 2018


Hi Alex,

As of Midpoint 3.6, there is no REST API for Task items (and I don't think
3.7 has it either).
However, you can use an overlay and implement it yourself. I've done it and
it's not difficult.

I started from this example:
https://github.com/Evolveum/midpoint-custom-service

Getting a user's work items:

ObjectQuery query = QueryBuilder.queryFor(WorkItemType.class,
                        prismContext)

.item(WorkItemType.F_ASSIGNEE_REF)
                                                .ref(user.getOid())
                                                .build();
                SearchResultList<WorkItemType> workItems =
modelService.searchContainers(
                        WorkItemType.class, query, null, task, result);

For completing a workitem,  use workflowService.completeWorkItem

2018-02-06 12:45 GMT-02:00 Doler, Alexander Earl (LATCO - Buenos Aires) <
adoler at deloitte.com>:

> Hello,
>
>
>
> I am working with MidPoint’s REST API. I would like to know if anyone has
> experience with, or if there is a way to obtain all of the approval tasks
> that are pending for a user, and if so, if there is a way to approve these
> work items.
>
>
>
> Thanks,
>
> Alex
>
>
>
>
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20180206/19d7cce6/attachment.htm>


More information about the midPoint mailing list