/** * Create an instance of {@link ApprovalStageExecutionPreviewType } * */ public ApprovalStageExecutionPreviewType createApprovalStageExecutionPreviewType() { return new ApprovalStageExecutionPreviewType(); }
public List<ObjectReferenceType> createExpectedApproverRefList() { PrismForJAXBUtil.createReference(asPrismContainerValue(), F_EXPECTED_APPROVER_REF); return getExpectedApproverRef(); }
public ApprovalStageExecutionPreviewType errorMessage(String value) { setErrorMessage(value); return this; }
public ApprovalStageExecutionPreviewType clone() { ApprovalStageExecutionPreviewType object = new ApprovalStageExecutionPreviewType(); PrismContainerValue value = asPrismContainerValue().clone(); object.setupContainerValue(value); return object; }
private ApprovalStageExecutionPreviewType createStageExecutionPreview(WfContextType wfc, String requestChannel, ApprovalStageDefinitionType stageDef, Task opTask, OperationResult result) { ApprovalStageExecutionPreviewType rv = new ApprovalStageExecutionPreviewType(prismContext); try { WfStageComputeHelper.ComputationResult computationResult = computeHelper .computeStageApprovers(stageDef, () -> computeHelper.getDefaultVariables(wfc, requestChannel, result), opTask, result); rv.getExpectedApproverRef().addAll(computationResult.getApproverRefs()); rv.setExpectedAutomatedOutcome(computationResult.getPredeterminedOutcome()); rv.setExpectedAutomatedCompletionReason(computationResult.getAutomatedCompletionReason()); } catch (Throwable t) { LoggingUtils.logUnexpectedException(LOGGER, "Couldn't compute stage execution preview", t); rv.setErrorMessage(MiscUtil.formatExceptionMessageWithCause(t)); rv.getExpectedApproverRef().addAll(CloneUtil.cloneCollectionMembers(stageDef.getApproverRef())); // at least something here } return rv; }
assertEquals("Stage expected approver ref info differs at " + pos, expectedStagePreview.expectedApproverOids, getOids(stagePreview.getExecutionPreview().getExpectedApproverRef())); assertEquals("Unexpected outcome at " + pos, expectedStagePreview.outcome, stagePreview.getExecutionPreview().getExpectedAutomatedOutcome()); assertEquals("Unexpected completion reason at " + pos, expectedStagePreview.reason, stagePreview.getExecutionPreview().getExpectedAutomatedCompletionReason()); if (expectedStagePreview.hasError) { assertNotNull("Error should be present at "+ pos, stagePreview.getExecutionPreview().getErrorMessage()); } else { assertEquals("Error message differs at " + pos, null, stagePreview.getExecutionPreview().getErrorMessage());
public ApprovalStageExecutionPreviewType expectedApproverRef(ObjectReferenceType value) { getExpectedApproverRef().add(value); return this; }
@Override public boolean equals(Object object) { if (!(object instanceof ApprovalStageExecutionPreviewType)) { return false; } ApprovalStageExecutionPreviewType other = ((ApprovalStageExecutionPreviewType) object); return asPrismContainerValue().equivalent(other.asPrismContainerValue()); }
public ApprovalStageExecutionPreviewType expectedAutomatedOutcome(ApprovalLevelOutcomeType value) { setExpectedAutomatedOutcome(value); return this; }
public ApprovalStageExecutionPreviewType expectedAutomatedCompletionReason(AutomatedCompletionReasonType value) { setExpectedAutomatedCompletionReason(value); return this; }
public ObjectReferenceType beginExpectedApproverRef() { ObjectReferenceType value = new ObjectReferenceType(); expectedApproverRef(value); return value; }
@XmlSchemaType(name = "string") @XmlElement(name = "expectedAutomatedCompletionReason") public AutomatedCompletionReasonType getExpectedAutomatedCompletionReason() { return PrismForJAXBUtil.getPropertyValue(asPrismContainerValue(), F_EXPECTED_AUTOMATED_COMPLETION_REASON, AutomatedCompletionReasonType.class); }
public ApprovalStageExecutionPreviewType expectedApproverRef(String oid, QName type) { PrismReferenceValue refVal = new PrismReferenceValueImpl(oid, type); ObjectReferenceType ort = new ObjectReferenceType(); ort.setupReferenceValue(refVal); return expectedApproverRef(ort); }
/** * Create an instance of {@link ApprovalStageExecutionPreviewType } * */ public ApprovalStageExecutionPreviewType createApprovalStageExecutionPreviewType() { return new ApprovalStageExecutionPreviewType(); }
@XmlElement(name = "errorMessage") public String getErrorMessage() { return PrismForJAXBUtil.getPropertyValue(asPrismContainerValue(), F_ERROR_MESSAGE, String.class); }
public ApprovalStageExecutionPreviewType expectedApproverRef(String oid, QName type, QName relation) { PrismReferenceValue refVal = new PrismReferenceValueImpl(oid, type); refVal.setRelation(relation); ObjectReferenceType ort = new ObjectReferenceType(); ort.setupReferenceValue(refVal); return expectedApproverRef(ort); }
/** * Create an instance of {@link ApprovalStageExecutionPreviewType } * */ public ApprovalStageExecutionPreviewType createApprovalStageExecutionPreviewType() { return new ApprovalStageExecutionPreviewType(); }
@XmlSchemaType(name = "string") @XmlElement(name = "expectedAutomatedOutcome") public ApprovalLevelOutcomeType getExpectedAutomatedOutcome() { return PrismForJAXBUtil.getPropertyValue(asPrismContainerValue(), F_EXPECTED_AUTOMATED_OUTCOME, ApprovalLevelOutcomeType.class); }
public ApprovalStageExecutionPreviewType beginExecutionPreview() { ApprovalStageExecutionPreviewType value = new ApprovalStageExecutionPreviewType(); executionPreview(value); return value; }
@Override public String toString() { return asPrismContainerValue().toString(); }