Handling “Script action execution failed” exception within Teneo

Hello team,

I am calling an external api using Integration Component, which take more than 30 seconds to respond (poor design I know
:neutral_face:) but teneo engine stops the script (IC) as well flow execution abruptly and throws below error.

Script action execution failed: Maximum execution time exceeded, but forced script termination failed. This may cause severe engine issues. Make sure the script is not consuming ThreadDeath exceptions.

How can I catch/intercept such transaction/error in post-processing or any other scripts and send an custom response to the client

Thanks.

Hi Surya,

Welcome to the forum,

As for your question,

The engine itself doesn’t provide any means to catch such error condition. but there are multiple options:

  1. The script execution timeout (default is 30 sec) is extended as required. this can be done by enabling property “scripting.executionTimeout” in file WEB-INF/data/engine.properties in the published solution.
    Disadvantages:
  • the solution response time is extended even more
  • the change this setting it’s required to publish to file, modify the war file, then deploy it manually to the target server, with each publishing .
  1. The call to the external resource is done so that the invocation itself times out before the script execution timeout (whether this is possible depends on the utility used to call the resource)
  2. The script causing this error implements some timeout handling around the long-running call to the external resource so that it aborts the call before the script timeout.

Please let me know if you have any other question,

Warm regards,

How can this be achieved in the SaaS setup?

Hi. Please check also the other thread where this problem has been discussed: