Boomi Tips: System Command Shape
Last time, we discussed the use of Program Command shape in Boomi. The shape is very useful, especially it allows us to invoke a system command/shell script from a Boomi process. However, did you know that the shape will use the system command exit code to determine the status?
0 – success
1 – fail
This will not work correctly if you want to execute a system command that has different exit code than the standard one.
For example, the Robocopy in Windows uses different exit code (e.g, 1) other than 0 to indicate a success copy operation. This will cause an error execution in Boomi. To overcome this, you can write a system command script to alter the exit code to make it compatible with Boomi Program Command shape:
ehco off robocopy D:\from D:\to filetocopy.txt /is IF %ERRORLEVEL% EQU 1 ( exit 0 ) ELSE IF %ERRORLEVEL% EQU 0 ( exit 0 ) ELSE ( exit 1 )