You need to make sure to setup proper path and all the environment variable are properly for the ODI agent in order to get the MAXL executed through OS call. As part of OS command execution ODI submits the command to the underlying OS just like any other java program. It assumes that all the path and parameters needed for the command are configured properly and available for the JVM process.
There are couple of other ways to execute maxl scripts.
1. You can write the jython code in procedures to execute MAXL using Essbase Java APIs.
2. The IKM/LKM for Hyperion Essbase have option to execute maxl script before and after extracting/loading data from Essbase cube. You can make use of that for you purpose.