use of com.evolveum.midpoint.web.component.wf.DecisionsPanel in project midpoint by Evolveum.
the class ItemApprovalHistoryPanel method initLayout.
private void initLayout(UserProfileStorage.TableId tableId, int pageSize) {
add(new DecisionsPanel(ID_DECISIONS_DONE, new AbstractReadOnlyModel<List<DecisionDto>>() {
@Override
public List<DecisionDto> getObject() {
List<DecisionDto> rv = new ArrayList<>();
WfContextType wfContextType = getModelObject();
if (wfContextType == null) {
return rv;
}
if (!wfContextType.getEvent().isEmpty()) {
wfContextType.getEvent().forEach(e -> addIgnoreNull(rv, DecisionDto.create(e, getPageBase())));
} else {
ItemApprovalProcessStateType instanceState = WfContextUtil.getItemApprovalProcessInfo(wfContextType);
if (instanceState != null) {
instanceState.getDecisions().forEach(d -> addIgnoreNull(rv, DecisionDto.create(d)));
}
}
return rv;
}
}, tableId, pageSize));
}
Aggregations