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:

  1. From Rich Client, open your Configuration Sets
  2. Choose the Configuration Set for the server that you wish to run your commands
  3. Click the Sys Cmd tab, and click Actions > Create (or if one exists, select it and click Actions > Update)
  4. Fill in the parameters
    1. If the server you are accessing is remote (respective to the Landmark server), click the “Remote” checkbox
    2. The LSF Web/RMI root is the server web address
    3. The Web User is a user who has access to the Lawson Portal
    4. Password is the Web User’s password
    5. RMI timeout is the number of milliseconds to attempt the connection before timing out
    6. GENDIR and LAWDIR are the locations of those specified directories
    7. Run as user information is if you want to run your command as a different user from the user that runs the BPM process
      1. 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.

  1. In the node properties, select your Configuration name.
  2. The default is the System (Landmark) configuration.
  3. 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:
    1. run directly -> {command}
    2. run shell -> sh –c {command}
    3. run Korn shell -> ksh –c {command}
    4. run shell as System Command User (Unix only) -> su –p {password} {username} –c {command}
    5. run cmd.exe (Windows only) -> cmd.exe /C {command}
  4. 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.
  5. Command input is text that is sent to the command’s input stream. This is typically left blank.

Results of this example: