Stop Fixlet Exiting and Display Exit Code

I’m having a bit of a brain fart moment…

Is there a way to stop a fixlet exiting when capturing the exit code?

Example:

waithidden blah.exe
parameter "error" = "{exit code of action}"
if {parameter "error" != "0"}
      exit {parameter "error"}

waithidden blah2.exe
parameter "error2" = "{exit code of action}"
if {parameter "error2" != "0"}
      exit {parameter "error2"}

Basically I want the fixlet to complete (no failure) and show the exit code of {parameter “error”} ignoring the last command that ran,

I’m not sure whether you have over thought this, or I have under thought it, but it seems to me that if it is just two items to run, you can just set parameter “error”, there is no need to test the value, you just exit {parameter “error”} at the end.

If there are multiple points where you want to save an exit code, things become a whole lot more complex.

I met with similar requirement from our teams, what I suggested, " Edit - include custom success criteria with relevance “the following relevance clause evaluates to false” which will always be False" for example if you are running windows task & if you put not windows of operating system as custom success criteria in that case you will have your custom exit code with completed status not failure.

When I set exit {parameter “error”} at the end I get as the exit code

Am I not right in saying though that exit will end the fixlet early thus not allowing it to show complete but with an exit code?

Yes, this should work. Are you aware about missing “endif” in your fixlet?

Ah, this was examples, the real fixlet has it