Retrieve Output properties even if the task is marked as FAILED

#1

Hi,

I’m using XLRelease (9.0.9). I have created a task which execute a remote call. I would like to be able to fail the XLR task but still retrieve the output variable. If I’m using a “Raise Exception” or a “sys.exit(1)” in my script, the output variable are not filled in the XLR task.
In my specific case, the remote call is giving me a status and an ID. If the remote status is “FAILED” I would like to mark the XLR task as FAILED and retrieve anyhow the ID in the output variable of the XLR task. But the output variables stay empty.

Do you have an idea ?

Thx a lot.

#2

Did you try the Task Failure Handler it should also work in 9.0.x In the code of the handler you can set variables, like described here :https://docs.xebialabs.com/v.9.5/xl-release/how-to/task-failure-handler/#scripts