public Parameter parseAttribute(
      ParamDefinition paramDef,
      Map<String, Parameter> evaluatedParams,
      String workflowId,
      boolean ignoreError) {
    try {
      Parameter param = paramDef.toParameter();
      parseWorkflowParameter(evaluatedParams, param, workflowId);
      return param;
    } catch (MaestroRuntimeException error) {
      if (ignoreError) {
        LOG.warn(
            "Ignore the error while parsing attribute [{}] for workflow [{}] due to ",
            paramDef.getName(),
            workflowId,
            error);
        return null;
      }
      throw new MaestroUnprocessableEntityException(
          "Failed to parse attribute [%s] for workflow [%s] due to %s",
          paramDef.getName(), workflowId, error);
    }
  }
@Test
  public void testParseAttribute() {
    Parameter param =
        paramEvaluator.parseAttribute(
            ParamDefinition.buildParamDefinition("bar", "foo"),
            Collections.singletonMap("foo", LongParameter.builder().expression("1+2+3;").build()),
            "test-workflow",
            true);
    assertEquals("foo", param.asString());

    param =
        paramEvaluator.parseAttribute(
            ParamDefinition.buildParamDefinition("bar", "${foo}"),
            Collections.singletonMap("foo", LongParameter.builder().expression("1+2+3;").build()),
            "test-workflow",
            true);
    assertEquals("6", param.asString());

    assertNull(
        paramEvaluator.parseAttribute(
            ParamDefinition.buildParamDefinition("bar", "${foo}"),
            Collections.emptyMap(),
            "test-workflow",
            true));
  }