Examples of ECARule


Examples of org.openiaml.model.model.ECARule

    assertHasRunAction(validate, callHide, hide);
    assertHasExecutionEdge(validate, check, callHide, "yes");

    // 'n' first sets the value of the label
    OperationCallNode callUpdate = assertHasOperationCallNode(validate, "update label");
    ECARule runUpdate = assertHasRunAction(validate, callUpdate, update);
    assertHasExecutionEdge(validate, check, callUpdate, "no");

    // with a parmameter of the exception
    Value warning = assertHasValue(validate, "failure message");
    assertTrue(warning.isReadOnly());
View Full Code Here

Examples of org.openiaml.model.model.ECARule

    BuiltinProperty canCast = assertHasBuiltinProperty(integer, "can cast?");

    Event onEdit = email.getOnChange();
    Operation update = assertHasOperation(integer, "update");

    ECARule run = assertHasRunAction(root, onEdit, update);
    assertGenerated(run);

    // should be an incoming Function edge
    SimpleCondition edge = assertHasSimpleCondition(root, canCast, run);
View Full Code Here

Examples of org.openiaml.model.model.ECARule

    BuiltinProperty canCast = assertHasBuiltinProperty(email, "can cast?");

    Event onEdit = integer.getOnChange();
    Operation update = assertHasOperation(email, "update");

    ECARule run = assertHasRunAction(root, onEdit, update);
    assertGenerated(run);

    // should be an incoming Function edge
    SimpleCondition edge = assertHasSimpleCondition(root, canCast, run);
View Full Code Here

Examples of org.openiaml.model.model.ECARule

    Event onAccess = integer.getOnAccess();
    Operation init = assertHasOperation(integer, "init");
    Value emailValue = assertHasFieldValue(email);

    // Integer.onInit should call Integer.update(Email.fieldValue)
    ECARule run = assertHasRunAction(root, onAccess, init);
    assertHasParameter(root, emailValue, run);

    // now make sure that the Function is connected
    BuiltinProperty canCast = assertHasBuiltinProperty(integer, "can cast?");
View Full Code Here

Examples of org.openiaml.model.model.ECARule

    Event onAccess = integer.getOnAccess();
    Operation init = assertHasOperation(integer, "init");

    // Integer.onInit should call Integer.update(Email.fieldValue)
    ECARule runInit = assertHasRunAction(root, onAccess, init);

    // validate operation is also called
    ActivityOperation validate = assertHasActivityOperation(integer, "validate");
    ECARule runValidate = assertHasRunAction(root, onAccess, validate);

    // it should be a lower priority
    assertTrue("Run priority '" + runValidate.getPriority() + "' should be lower than '" + runInit.getPriority() + "'",
        runValidate.getPriority() < runInit.getPriority());

  }
View Full Code Here

Examples of org.openiaml.model.model.ECARule

    InputTextField integer = assertHasInputTextField(home, "Integer");
    Event onAccess = integer.getOnAccess();

    // validate operation is also called
    ActivityOperation validate = assertHasActivityOperation(integer, "validate");
    ECARule runValidate = assertHasRunAction(root, onAccess, validate);

    // the 'fieldValue is set' condition
    Function isSet = assertHasFunction(integer, "fieldValue is set");
    assertHasSimpleCondition(root, isSet, runValidate);
View Full Code Here

Examples of org.openiaml.model.model.ECARule

    Operation targetOp = assertHasOperation(field2, "update");
    assertNotSame(srcEdit, targetEdit);
    assertNotSame(srcOp, targetOp);

    // there should be a run wire between these two
    ECARule srcRw = assertHasRunAction(wire, srcEdit, targetOp, "run");
    ECARule targetRw = assertHasRunAction(wire, targetEdit, srcOp, "run");

    // [new]
    // there should be a Function wire to the new SyncWire
    assertGenerated(assertHasSimpleCondition(root, cond, sw));

    // there should be additional ConditionWires to these RunActions
    assertGenerated(assertHasSimpleCondition(page1, cond, srcRw));
    assertGenerated(assertHasSimpleCondition(page1, cond, targetRw));

    // there doesn't need to be any parameters to these ConditionWires

    // we should also have Function wires copied to the 'init' operations
    Event srcAccess = field1.getOnAccess();
    Operation srcInit = assertHasOperation(field1, "init");
    Event targetAccess = field2.getOnAccess();
    Operation targetInit = assertHasOperation(field2, "init");
    assertNotSame(srcAccess, targetAccess);
    assertNotSame(srcInit, targetInit);

    // execution wires
    ECARule srcInitRun = assertHasRunAction(wire, srcAccess, srcInit, "run");
    ECARule targetInitRun = assertHasRunAction(wire, targetAccess, targetInit, "run");

    // they should have incoming parameters
    Value field1value = assertHasFieldValue(field1);
    Value field2value = assertHasFieldValue(field2);
    assertNotSame(field1value, field2value);
View Full Code Here

Examples of org.openiaml.model.model.ECARule

    // generated events and operations
    // all part of SyncWire elements generation
    Event edit = field1.getOnChange();
    Operation update = assertHasOperation(field2, "update");
    ECARule rw = assertHasRunAction(root, edit, update);

    Value fieldValue = assertHasFieldValue(field1);
    assertGenerated(getParameterFromTo(root, fieldValue, rw));

    // session should have an 'init' event
    Event init = session.getOnInit();

    // it should be connected to 'update'
    ECARule rw2 = assertHasRunAction(root, init, update);
    assertGenerated(rw2);

  }
View Full Code Here

Examples of org.openiaml.model.model.ECARule

    assertGenerated(init);

    Value value = assertHasFieldValue(field2);
    assertGenerated(value);

    ECARule run = assertHasRunAction(field1, access, init, "run");
    assertGenerated(run);

    Parameter param = assertHasParameter(field1, value, run);
    assertGenerated(param);
View Full Code Here

Examples of org.openiaml.model.model.ECARule

    Gate gate = session.getEntryGate();
    assertEquals("requires a page is viewed first", gate.getName());
    assertNotGenerated(gate);

    ECARule nav = assertHasNavigateAction(session, gate, required, "first");
    assertNotGenerated(nav);

  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.