public void evaluateStepParameters(
      Map<String, Map<String, Object>> allStepOutputData,
      Map<String, Parameter> workflowParams,
      Map<String, Parameter> stepParams,
      String stepId) {
    for (Parameter param : stepParams.values()) {
      parseStepParameter(allStepOutputData, workflowParams, stepParams, param, stepId);
    }
    paramsSizeCheck(stepParams, "step id: " + stepId);
  }
@Test
  public void testParseStepParameterWithOrderEffect() {
    Map<String, Parameter> workflowParams = new LinkedHashMap<>();
    workflowParams.put(
        "foo", LongParameter.builder().evaluatedResult(1L).evaluatedTime(123L).build());
    workflowParams.put(
        "bar", LongParameter.builder().evaluatedResult(6L).evaluatedTime(123L).build());

    Map<String, Parameter> params = new LinkedHashMap<>();
    params.put("foo", LongParameter.builder().name("foo").expression("bar + 1").build());
    params.put("bar", LongParameter.builder().name("bar").expression("foo + 1").build());

    paramEvaluator.evaluateStepParameters(Collections.emptyMap(), workflowParams, params, "step1");
    assertEquals(7L, params.get("foo").asLongParam().getEvaluatedResult().longValue());
    assertEquals(8L, params.get("bar").asLongParam().getEvaluatedResult().longValue());

    params = new LinkedHashMap<>();
    params.put("bar", LongParameter.builder().name("bar").expression("foo + 1").build());
    params.put("foo", LongParameter.builder().name("foo").expression("bar + 1").build());
    paramEvaluator.evaluateStepParameters(Collections.emptyMap(), workflowParams, params, "step1");
    assertEquals(3L, params.get("foo").asLongParam().getEvaluatedResult().longValue());
    assertEquals(2L, params.get("bar").asLongParam().getEvaluatedResult().longValue());
  }