Exit Code of Action?

The following line returns "Invalid action content: the action script contains a syntax error:
parameter "ExitCode" = "{if exist exit code of action then exit code of action as string else "Not Set"}"
Anyone know why? I lifted it from another post here that said it was from a default fixlet. a straight-up if (exit code of action != 0) fails outright as well. :frowning2:

Did your action have a download in it?

If it did, remember that parameters are set when the downloads are done so its complex to do parameters that contain things that can only be done during the execution of the action.

Then, could he use the inspector active of action ?

IF {not active of action}
    parameter "ExitCode" = "Not Set"
ELSE
 parameter "ExitCode" = "{if exist exit code of action then exit code of action as string else "Not Set"}"
ENDIF

Or something like that.

The fixlet does have a download, but so did all the other examples of “exit code of action” that I found in other scripts shared here. :frowning2:

Does anyone have an example of a script where this construct actually works?

The Server Components upgrade fixlets work and use the below.

parameter "ServerUpgradeResult"="{exists true whose (if true then (exit code of action = 0) else false)}"

This is an incantation a bit that allows relevance to skip things that don’t work so it can be parsed at times when the action is “not running” like with a download.

1 Like