Skip to main content
Question

user defined workbench exit code

  • May 8, 2022
  • 3 replies
  • 27 views

hanskoudijs
Forum|alt.badge.img

I would like to exit a workbench with my own user defined exit code. Is that possible and how can I achive this?

3 replies

nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2938 replies
  • May 9, 2022

Not sure if I understand correctly. Do you mean when run as batch from commandline?


hanskoudijs
Forum|alt.badge.img
  • Author
  • 13 replies
  • May 9, 2022

Not sure if I understand correctly. Do you mean when run as batch from commandline?

Usually a workbench (if succesfully) exit's with an exit code 0. This code can be "read" in a batch-script (it is %ERRORLEVEL%). I would like to (succesfully) exit it with my own (user defined/specific) exit code, not being 0.


redgeographics
Celebrity
Forum|alt.badge.img+59
  • Celebrity
  • 3699 replies
  • May 10, 2022

It would be an errorlevel generated by fme.exe and I don't think those can be altered by the user. Perhaps you can do something with the Terminator and a custom termination message?