use of com.evolveum.midpoint.xml.ns._public.common.common_3.ItemApprovalProcessStateType 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));
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.ItemApprovalProcessStateType in project midpoint by Evolveum.
the class ApprovalCasePanel method calculateDecisionList.
public List<DecisionDto> calculateDecisionList() {
List<DecisionDto> rv = new ArrayList<>();
CaseType parentCase = getObjectWrapper().getObject().asObjectable();
if (parentCase == null) {
return rv;
}
if (parentCase.getEvent() != null && !parentCase.getEvent().isEmpty()) {
parentCase.getEvent().forEach(e -> CollectionUtils.addIgnoreNull(rv, DecisionDto.create(e, ApprovalCasePanel.this.getPageBase())));
} else {
// ItemApprovalProcessStateType instanceState = WfContextUtil.getItemApprovalProcessInfo(parentCase.getApprovalContext());
// if (instanceState != null) {
// //todo where we can take decisions now?
// // instanceState.getDecisions().forEach(d -> CollectionUtils.addIgnoreNull(rv, DecisionDto.create(d)));
// }
}
return rv;
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.ItemApprovalProcessStateType in project midpoint by Evolveum.
the class ItemApprovalSpecificContent method createProcessSpecificState.
@Override
public WfProcessSpecificStateType createProcessSpecificState() {
ItemApprovalProcessStateType state = new ItemApprovalProcessStateType(prismContext);
state.setApprovalSchema(approvalSchemaType);
state.setPolicyRules(policyRules);
return state;
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.ItemApprovalProcessStateType in project midpoint by Evolveum.
the class ApprovalCaseTabPanel method calculateDecisionList.
public List<DecisionDto> calculateDecisionList() {
List<DecisionDto> rv = new ArrayList<>();
CaseType parentCase = getObjectWrapper().getObject().asObjectable();
if (parentCase == null) {
return rv;
}
if (parentCase.getEvent() != null && !parentCase.getEvent().isEmpty()) {
parentCase.getEvent().forEach(e -> CollectionUtils.addIgnoreNull(rv, DecisionDto.create(e, ApprovalCaseTabPanel.this.getPageBase())));
} else {
// ItemApprovalProcessStateType instanceState = WfContextUtil.getItemApprovalProcessInfo(parentCase.getApprovalContext());
// if (instanceState != null) {
// //todo where we can take decisions now?
// // instanceState.getDecisions().forEach(d -> CollectionUtils.addIgnoreNull(rv, DecisionDto.create(d)));
// }
}
return rv;
}
Aggregations