Skip to main content
June 16, 2025
Question

Unexpected Error Message from Web API Despite Successful Process Model Execution

  • June 16, 2025
  • 3 replies
  • 0 views

Hello,

I have a Web API configured to trigger when a process model encounters a failure. The logic to detect the failure in the API's body section is as follows:

error_code: if(fv!processInfo.pv.success, fv!processInfo.pv.errorCode),
error_description: if(fv!processInfo.pv.success, fv!processInfo.pv.errorMessage, "Failure in process model")

The issue I'm facing is that the process model executes successfully — no errors occur, and I receive the expected data in the response. However, the API still returns the error message: "Failure in process model". Also, the errorCode and errorMessage passed from the process model are empty.

Could anyone help me understand why this is happening? Is there something wrong with how the condition is structured? Keep in mind it used to work prev and is working perfectly in other processes/web APIs?

    3 replies

    harshas2775
    June 16, 2025

    What is the value in pv!success in your process? you mentioned the pv!errorCode and pv!errorMessage are empty - that sounds correct given process had no errors.

    You need to ensure that if no errors are there the pv!success should have true() in it. If its null or empty then the if conditions will evaluate to false - hence the message "Failure in process model" always

    Also check the below line, if statement is missing one parameter here - it is a syntax error before anything else! May be its just here for the question like this yet worth highlighting this isn't right. 

    error_code: if(fv!processInfo.pv.success, fv!processInfo.pv.errorCode),
    stefanhelzle0001
    June 16, 2025

    Sure. Your logic is not correct, and your code should look more like this:

    error_code: if(fv!processInfo.pv.success, null, fv!processInfo.pv.errorCode),
    error_description: if(fv!processInfo.pv.success, null, fv!processInfo.pv.errorMessage)

    davidj137213
    June 16, 2025

    Check your if sentences... they are not correct ...