Ejemplo n.º 1
0
  /** Test data */
  public void test() {
    // Retrieve the MicroFlow
    String microFlowName = "EQ_CMN_UpdateEsfStatus_SRV";
    IExecuteMicroflowRequest executeMicroflowRequest = getMicroflowRequest(microFlowName);

    EsfKey esfKey = new EsfKey();
    esfKey.setOptionId("ALZ");
    esfKey.setUserId("EQCHINESE");
    esfKey.setTransactionId("A2010.07.23 17:30:52 656");
    esfKey.setSessionId("SESSIONID");

    UpdateEsfStatusRqHeader input = new UpdateEsfStatusRqHeader();
    input.setEsfKey(esfKey);
    input.setAction(TaskEngineToolbox.TASK_ACTION_DECL);
    input.setReason("No way out");
    input.setSystemId("SLOUGH1");
    input.setUnitId("AL9");
    input.setUserId("LIMA1");

    // Set the parameters
    executeMicroflowRequest.addInputTag("input", input);

    // Execute the MicroFlow
    IExecuteMicroflowResponse executeMicroflowResponse = executeMicroflow(executeMicroflowRequest);

    UpdateEsfStatusRsHeader output =
        (UpdateEsfStatusRsHeader) executeMicroflowResponse.getOutputTags().get("output");

    System.out.println(output.getErrorCode() + " " + output.getErrorMessage());

    // assume success
    assertEquals(output.getErrorCode().trim(), "");
  }
Ejemplo n.º 2
0
  /**
   * Overrides the java.lang.Object.hashCode method.
   *
   * <p>The following steps came from <b>Effective Java Programming Language Guide</b> by Joshua
   * Bloch, Chapter 3
   *
   * @return a hash code value for the object.
   */
  public int hashCode() {
    int result = 17;

    long tmp;
    if (_systemId != null && !org.castor.core.util.CycleBreaker.startingToCycle(_systemId)) {
      result = 37 * result + _systemId.hashCode();
      org.castor.core.util.CycleBreaker.releaseCycleHandle(_systemId);
    }
    if (_unitId != null && !org.castor.core.util.CycleBreaker.startingToCycle(_unitId)) {
      result = 37 * result + _unitId.hashCode();
      org.castor.core.util.CycleBreaker.releaseCycleHandle(_unitId);
    }
    if (_userId != null && !org.castor.core.util.CycleBreaker.startingToCycle(_userId)) {
      result = 37 * result + _userId.hashCode();
      org.castor.core.util.CycleBreaker.releaseCycleHandle(_userId);
    }
    if (_esfKey != null && !org.castor.core.util.CycleBreaker.startingToCycle(_esfKey)) {
      result = 37 * result + _esfKey.hashCode();
      org.castor.core.util.CycleBreaker.releaseCycleHandle(_esfKey);
    }
    if (_action != null && !org.castor.core.util.CycleBreaker.startingToCycle(_action)) {
      result = 37 * result + _action.hashCode();
      org.castor.core.util.CycleBreaker.releaseCycleHandle(_action);
    }
    if (_reason != null && !org.castor.core.util.CycleBreaker.startingToCycle(_reason)) {
      result = 37 * result + _reason.hashCode();
      org.castor.core.util.CycleBreaker.releaseCycleHandle(_reason);
    }

    return result;
  }