Search in sources :

Example 6 with ApprovalProcessExecutionInformationDto

use of com.evolveum.midpoint.web.page.admin.workflow.dto.ApprovalProcessExecutionInformationDto in project midpoint by Evolveum.

the class SwitchableApprovalProcessPreviewsPanel method createApprovalProcessExecutionInformationDto.

@Nullable
private ApprovalProcessExecutionInformationDto createApprovalProcessExecutionInformationDto(PageBase parentPage, boolean wholeProcess) {
    Task opTask = parentPage.createSimpleTask(SwitchableApprovalProcessPreviewsPanel.class.getName() + ".createApprovalProcessExecutionInformationDto");
    OperationResult result = opTask.getResult();
    ApprovalSchemaExecutionInformationType info = approvalExecutionInfoModel.getObject();
    ApprovalProcessExecutionInformationDto rv = null;
    try {
        if (info != null) {
            rv = ApprovalProcessExecutionInformationDto.createFrom(info, parentPage.getModelObjectResolver(), wholeProcess, opTask, result);
        }
        result.computeStatus();
    } catch (Throwable t) {
        LoggingUtils.logUnexpectedException(LOGGER, "Couldn't create approval process execution information for {}", t, getModelObject());
        opTask.getResult().recordFatalError(createStringResource("SwitchableApprovalProcessPreviewsPanel.message.createApprovalProcess.fatalError", t.getMessage()).getString(), t);
    }
    return rv;
}
Also used : ApprovalProcessExecutionInformationDto(com.evolveum.midpoint.web.page.admin.workflow.dto.ApprovalProcessExecutionInformationDto) Task(com.evolveum.midpoint.task.api.Task) ApprovalSchemaExecutionInformationType(com.evolveum.midpoint.xml.ns._public.common.common_3.ApprovalSchemaExecutionInformationType) OperationResult(com.evolveum.midpoint.schema.result.OperationResult) Nullable(org.jetbrains.annotations.Nullable)

Aggregations

ApprovalProcessExecutionInformationDto (com.evolveum.midpoint.web.page.admin.workflow.dto.ApprovalProcessExecutionInformationDto)6 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)3 Task (com.evolveum.midpoint.task.api.Task)3 ApprovalSchemaExecutionInformationType (com.evolveum.midpoint.xml.ns._public.common.common_3.ApprovalSchemaExecutionInformationType)3 ModelProjectionContext (com.evolveum.midpoint.model.api.context.ModelProjectionContext)2 ObjectDelta (com.evolveum.midpoint.prism.delta.ObjectDelta)2 ObjectResolver (com.evolveum.midpoint.repo.common.ObjectResolver)2 ExpressionEvaluationException (com.evolveum.midpoint.util.exception.ExpressionEvaluationException)2 SchemaException (com.evolveum.midpoint.util.exception.SchemaException)2 SystemException (com.evolveum.midpoint.util.exception.SystemException)2 ApprovalStageExecutionInformationDto (com.evolveum.midpoint.web.page.admin.workflow.dto.ApprovalStageExecutionInformationDto)2 ApproverEngagementDto (com.evolveum.midpoint.web.page.admin.workflow.dto.ApproverEngagementDto)2 EvaluatedTriggerGroupDto (com.evolveum.midpoint.web.page.admin.workflow.dto.EvaluatedTriggerGroupDto)2 ObjectType (com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType)2 PolicyRuleEnforcerPreviewOutputType (com.evolveum.midpoint.xml.ns._public.common.common_3.PolicyRuleEnforcerPreviewOutputType)2 ShadowType (com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType)2 ArrayList (java.util.ArrayList)2 Label (org.apache.wicket.markup.html.basic.Label)2 ListItem (org.apache.wicket.markup.html.list.ListItem)2 ListView (org.apache.wicket.markup.html.list.ListView)2