Example #1
0
  /**
   * Get the name of the Symbol to execute. Readonly.
   *
   * @return The name of the Symbol to execute.
   */
  @JsonProperty("symbolToExecuteName")
  public String getSymbolToExecuteName() {
    if (symbolToExecute == null) {
      return "";
    }

    return symbolToExecute.getName();
  }
Example #2
0
  @Override
  public ExecuteResult execute(ConnectorManager connector) {
    if (symbolToExecute == null) {
      LOGGER.info(
          LEARNER_MARKER,
          "No other Symbol to execute was set (ignoreFailure: {}, negated: {}).",
          ignoreFailure,
          negated);
      return getFailedOutput();
    }
    LOGGER.info(
        LEARNER_MARKER,
        "Executing other Symbol <{}:{}> (ignoreFailure: {}, negated: {}).",
        symbolToExecute.getId(),
        symbolToExecute.getRevision(),
        ignoreFailure,
        negated);
    if (LOGGER.isEnabled(Level.INFO, LEARNER_MARKER)) {
      LoggerUtil.increaseIndent();
    }

    ExecuteResult symbolResult = symbolToExecute.execute(connector);

    if (LOGGER.isEnabled(Level.INFO, LEARNER_MARKER)) {
      LoggerUtil.decreaseIndent();
    }
    LOGGER.info(
        LEARNER_MARKER,
        "Executed other Symbol <{}:{}> => {} (ignoreFailure: {}, negated: {}).",
        symbolToExecute.getId(),
        symbolToExecute.getRevision(),
        symbolResult,
        ignoreFailure,
        negated);
    if (symbolResult == ExecuteResult.OK) {
      return getSuccessOutput();
    } else {
      return getFailedOutput();
    }
  }