public override void Validate(ValidationContext validationContext) { try { // validate the processBlock constraints base.Validate(validationContext); // the startState is required validationContext.Check((_startState != null), "the process definition does not have a start-state"); validationContext.Check((_endState != null), "the process definition does not have an end-state"); // the endState is not allowed to have leaving transitions validationContext.Check((_endState.LeavingTransitions.Count == 0), "the end-state of the process definition has leaving transitions"); validationContext.Check((_startState.ArrivingTransitions.Count == 0), "the start-state of the process definition has arriving transitions"); // check if all image attributes are supplied or none at all validationContext.Check(((_image == null) && ((Object)_imageMimeType == null) && (_imageHeight == 0) && (_imageWidth == 0)) || ((_image != null) && ((Object)_imageMimeType != null) && (_imageHeight != 0) && (_imageWidth != 0)), "all image attributes (name,mime-type,width&height) must be supplied or none at all (@see web/webinterface.xml)"); // this catch allows the validation to throw runtime exceptions if the cause // is already added as an error. (mainly to avoid if-then-else in the // validation code to avoid NullPointerExceptions) } catch (SystemException e) { validationContext.AddError("couldn't continue validation : " + e.GetType().FullName + " : " + e.Message); } }
public override void Validate(ValidationContext validationContext) { // the fork & join are required validationContext.Check((_fork != null), "a concurrent block does not have a fork"); validationContext.Check((_join != null), "a concurrent block does not have a join"); validationContext.PushScope("in concurrent-block [" + _fork.Name + "|" + _join.Name + "]"); base.Validate(validationContext); validationContext.PopScope(); }
public override void Validate(ValidationContext validationContext) { base.Validate(validationContext); // check this join has exactly one leaving transition validationContext.Check((_leavingTransitions.Count == 1), "the join has " + _leavingTransitions.Count + " leaving transition instead of exactly one"); }
public override void Validate(ValidationContext validationContext) { base.Validate(validationContext); if (!(this is StartStateImpl)) { validationContext.Check(((_assignmentDelegation != null) || ((Object)_actorRoleName != null)), "ActivityState '" + Name + "' does not have an assignment or a role. It should have at least one of the two."); } }
public override void Validate(ValidationContext validationContext) { base.Validate(validationContext); if (!(this is StartStateImpl)) { validationContext.Check(((_assignmentDelegation != null) || ((Object) _actorRoleName != null)), "ActivityState '" + Name + "' does not have an assignment or a role. It should have at least one of the two."); } }
public override void Validate(ValidationContext validationContext) { base.Validate(validationContext); // verify that all transitions leaving a fork have a name // this is required because this name is assigned to the flow and // it serves as an id for the ForkHandler's IEnumerator iter = _leavingTransitions.GetEnumerator(); while (iter.MoveNext()) { TransitionImpl transition = (TransitionImpl) iter.Current; validationContext.Check(((Object) transition.Name != null), "one of the transitions leaving the fork does not have a name"); } }
public override void Validate(ValidationContext validationContext) { base.Validate(validationContext); // verify that all transitions leaving a fork have a name // this is required because this name is assigned to the flow and // it serves as an id for the ForkHandler's IEnumerator iter = _leavingTransitions.GetEnumerator(); while (iter.MoveNext()) { TransitionImpl transition = (TransitionImpl)iter.Current; validationContext.Check(((Object)transition.Name != null), "one of the transitions leaving the fork does not have a name"); } }
public void Validate(ValidationContext validationContext) { validationContext.Check((_state != null), "state is a required property in a field"); validationContext.Check((_attribute != null), "attribute is a required property in a field"); validationContext.Check((_access != 0), "access is a required property in a field"); }
/// <summary> standard, a node must have at least one leaving transition. /// Only the EndStateImpl will have a different opinion on this :-) /// </summary> protected internal virtual void ValidateLeavingTransitions(ValidationContext validationContext) { validationContext.Check((_leavingTransitions.Count > 0), "no transitions leaving this node"); }
public override void Validate(ValidationContext validationContext) { try { // validate the processBlock constraints base.Validate(validationContext); // the startState is required validationContext.Check((_startState != null), "the process definition does not have a start-state"); validationContext.Check((_endState != null), "the process definition does not have an end-state"); // the endState is not allowed to have leaving transitions validationContext.Check((_endState.LeavingTransitions.Count == 0), "the end-state of the process definition has leaving transitions"); validationContext.Check((_startState.ArrivingTransitions.Count == 0), "the start-state of the process definition has arriving transitions"); // check if all image attributes are supplied or none at all validationContext.Check(((_image == null) && ((Object) _imageMimeType == null) && (_imageHeight == 0) && (_imageWidth == 0)) || ((_image != null) && ((Object) _imageMimeType != null) && (_imageHeight != 0) && (_imageWidth != 0)), "all image attributes (name,mime-type,width&height) must be supplied or none at all (@see web/webinterface.xml)"); // this catch allows the validation to throw runtime exceptions if the cause // is already added as an error. (mainly to avoid if-then-else in the // validation code to avoid NullPointerExceptions) } catch (SystemException e) { validationContext.AddError("couldn't continue validation : " + e.GetType().FullName + " : " + e.Message); } }
public override void Validate(ValidationContext validationContext) { base.Validate(validationContext); validationContext.Check((_decisionDelegation != null), "no decision delegation specified"); }
public virtual void Validate(ValidationContext validationContext) { validationContext.Check((_state != null), "state is a required property in a field"); validationContext.Check((_attribute != null), "attribute is a required property in a field"); validationContext.Check((_access != 0), "access is a required property in a field"); }
public override void Validate(ValidationContext validationContext) { base.Validate(validationContext); validationContext.Check((_processInvokerDelegation != null), "process state does not have a process invoker delegation"); validationContext.Check((_subProcess != null), "process state does not have a sub-process-definition"); }