<div dir="ltr">Hello guys,<div><br></div><div>I'm trying to list WorkItems assigned to specific user. midpoint.searchObject does not support WorkItemType, so I've tried searchObjects on RepositoryService but got another Unsupported type class exception.<div><br></div><div><u>Code:</u></div><div><div> </div><div><i> taskManager = SpringApplicationContextHolder.getApplicationContext().getBean(TaskManagerQuartzImpl.class);</i></div><div><i> </i></div><div><i> repositoryService = taskManager.getRepositoryService(); </i></div><div><i> </i></div><div><i> OperationResult ores = new OperationResult("dummy") //task.getResult();</i></div><div><i> </i></div><div><i> ObjectQuery query = QueryBuilder.queryFor(WorkItemType.class, prismContext)</i></div><div><i> .item(WorkItemType.F_ASSIGNEE_REF)</i></div><div><i> .ref(input.oid)</i></div><div><i> .build();</i></div><div><i> </i></div><div><i> //res = midpoint.searchObjects(WorkItemType.class, query) //NO-GO</i></div><div><i> SearchResultLis<PrismObjecct<WorkItemType>> res = repositoryService.searchObjects(WorkItemType.class, query, null, ores);</i></div></div><div><br></div><div><br></div><div><u>Result:</u></div><div>com.evolveum.midpoint.util.exception.SystemException: Unsupported type class com.evolveum.midpoint.xml.ns._public.common.common_3.WorkItemType<br></div></div><div><br></div><div><br></div><div><u>Third try</u> was according GUI page, and guess what, another Unsupported exception <font size="4">😒</font></div><div><br></div><div>javax.script.ScriptException: com.evolveum.midpoint.util.exception.SystemException: Unsupported type class com.evolveum.midpoint.xml.ns._public.common.common_3.WorkItemType</div><div>...</div><div><br></div><div><u>Code:</u></div><div><div><i>
<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> </span>
modelService = SpringApplicationContextHolder.getApplicationContext().getBean(ModelService.class);</i></div><div><i><br></i></div><div><i> Task sTask = taskManager.createTaskInstance("Work item search") </i></div><div><i> OperationResult ores = sTask.getResult();</i></div><div>
<i><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> <span> </span></span> ...</i></div><div><i> res = modelService.searchObjects(WorkItemType.class, query, null, sTask, ores);</i></div><div> </div></div><div><br></div><div><b>Any ideas how to list "work items" in MidPoint? Should I look for another type? Anyone knows what I'm doing wrong here?</b></div><div><br></div><div><br></div><div>Jan</div></div>