Search in sources :

Example 31 with Error

use of org.bytedeco.javacpp.FlyCapture2.Error in project kie-wb-common by kiegroup.

the class EventPropertyWriter method addError.

public void addError(ErrorRef errorRef) {
    Error error = bpmn2.createError();
    ErrorEventDefinition errorEventDefinition = bpmn2.createErrorEventDefinition();
    addEventDefinition(errorEventDefinition);
    String errorCode = errorRef.getValue();
    String errorId;
    if (StringUtils.nonEmpty(errorCode)) {
        error.setErrorCode(errorCode);
        CustomAttribute.errorName.of(errorEventDefinition).set(errorCode);
        errorId = errorCode;
    } else {
        errorId = UUID.uuid();
    }
    error.setId(errorId);
    errorEventDefinition.setErrorRef(error);
    addRootElement(error);
}
Also used : ErrorEventDefinition(org.eclipse.bpmn2.ErrorEventDefinition) Error(org.eclipse.bpmn2.Error)

Aggregations

Error (org.eclipse.bpmn2.Error)11 Error (org.ovirt.engine.sdk4.Error)11 RootElement (org.eclipse.bpmn2.RootElement)8 AdHocSubProcess (org.eclipse.bpmn2.AdHocSubProcess)7 ErrorEventDefinition (org.eclipse.bpmn2.ErrorEventDefinition)7 Escalation (org.eclipse.bpmn2.Escalation)7 Process (org.eclipse.bpmn2.Process)6 Signal (org.eclipse.bpmn2.Signal)6 SubProcess (org.eclipse.bpmn2.SubProcess)6 URI (java.net.URI)5 ArrayList (java.util.ArrayList)5 Entry (java.util.Map.Entry)5 Error (org.bytedeco.javacpp.FlyCapture2.Error)5 Test (org.junit.Test)5 IOException (java.io.IOException)4 Iterator (java.util.Iterator)4 Activity (org.eclipse.bpmn2.Activity)4 CallActivity (org.eclipse.bpmn2.CallActivity)4 CompensateEventDefinition (org.eclipse.bpmn2.CompensateEventDefinition)4 ConditionalEventDefinition (org.eclipse.bpmn2.ConditionalEventDefinition)4