IP Designer Series – The System Command Node
The Return Activity node in IP Designer is useful for running command line tools within a process. You can run anything from the System Command node that could be ran in a Unix or DOS command prompt.
The first step to using a System Command Node is to configure the Sys Cmd tab in the appropriate configuration setting in Landmark. In this case, we are using Rich Client to configure the setting. This can also be configured via the Landmark administration web application.
To configure the System Command settings:
- From Rich Client, open your Configuration Sets
- Choose the Configuration Set for the server that you wish to run your commands
- Click the Sys Cmd tab, and click Actions > Create (or if one exists, select it and click Actions > Update)
- Fill in the parameters
- If the server you are accessing is remote (respective to the Landmark server), click the “Remote” checkbox
- The LSF Web/RMI root is the server web address
- The Web User is a user who has access to the Lawson Portal
- Password is the Web User’s password
- RMI timeout is the number of milliseconds to attempt the connection before timing out
- GENDIR and LAWDIR are the locations of those specified directories
- Run as user information is if you want to run your command as a different user from the user that runs the BPM process
- NOTE: Windows no longer allows a “Run As” user in command line activities. In typical installs, the local system user runs the BPM process on the LSF server, that is who will be running the commands in your System Command Node. If you are using the System Command node to run Lawson tools such as importdb, you will need to make sure this local system user has access to the necessary roles in Lawson Security.
Now that your Sys Cmd settings are configured, you can use the System Command node in IPA.
- In the node properties, select your Configuration name.
- The default is the System (Landmark) configuration.
- For Execution mode, you can leave it as automatic and it will use the server’s inherent command mode. Or, you can specify the mode. Options are:
- run directly -> {command}
- run shell -> sh –c {command}
- run Korn shell -> ksh –c {command}
- run shell as System Command User (Unix only) -> su –p {password} {username} –c {command}
- run cmd.exe (Windows only) -> cmd.exe /C {command}
- The Command property is the actual command script. Be sure to use the syntax appropriate for the Execution mode you chose. You can use process variables in this window.
- Command input is text that is sent to the command’s input stream. This is typically left blank.
Results of this example: