MicroStrategy ONE

Using the Command Line to Deploy a Workflow

Once you create a workflow using System Manager, you can use a command line version of System Manager interface to deploy a workflow. The command line version lets you deploy a workflow without having to use an interface, which may be useful for silent configuration routines and OEM deployments.

Be aware that some processes are dependent on the machine that you use to deploy the workflow. For example, if you include processes to create DSNs, the DSNs are created on the machine that you use to deploy the workflow.

The command line version of System Manager is a one-line command line tool. This means that the command to begin the deployment is included in a single statement. The syntax of the statement depends on the environment you are deploying the workflow on:

  • Windows: MASysMgr.exe, followed by the parameters listed below.
  • UNIX and Linux: mstrsysmgr, followed by the parameters listed below.

Of the parameters listed below, only -w to specify a workflow file is required; all other parameters are optional:

  • -w "WorkflowFile": This parameter is required to specify the workflow to deploy. WorkflowFile is the path to the workflow file. For example, -w "C:\Create DSNs.smw" is valid syntax to deploy the Create DSNs.smw workflow file in a Windows environment.
  • -s "EntryProcess": This parameter can be used to specify the first process to attempt for the workflow. Only processes that have been enabled as entry processes (see Using Entry Processes to Determine the First Step in a Workflow) can be used as the first process in a workflow. EntryProcess is the name of the process as it is defined in the workflow.
  • -f "ParametersFile": This parameter can be used to specify a parameters file, which supplies values for the parameters in the workflow. ParametersFile is the path to the parameters file. For example, -f "C:\Parameters.smp" is valid syntax to use the Parameters.smp parameter file in a Windows environment. For information on creating a parameters file, see Using Parameters for Processes.
  • -l "LogFile": This parameter can be used to specify a log file. All results of deploying a workflow are saved to the file that you specify. LogFile is the path to the log file. For example, -l "C:\Workflow Results.log" is valid syntax to use the Workflow Results.log log file in a Windows environment.
  • -showoutput: This parameter can be used to display all the results of deploying the workflow to the command line. If you are deploying a workflow as a completely silent process, excluding this option prevents these results from being displayed on the command line. The results can still be retrieved from the log file after deployment is complete.
  • -p "ParameterName1=Value1 ParameterName2=Value2": This parameter can be used to specify values for parameters of the workflow. Any parameter values that are provided in this way are used in place of values provided in the workflow itself, as well as provided through a parameters file. Providing parameter values directly during command line execution is often required to supply login and password credentials specific to the machine or user environment for a given deployment.

    To include multiple parameter and value pairs, you must enclose each parameter in double quotes (" ") and separate each parameter and value pair using a space. For example, -p "UserName=User1" "Password=1234" is valid syntax to provide values for the parameters UserName and Password.

The steps below show you how to deploy a workflow using the command line version of System Manager.

You have created a workflow and saved it in a location that can be accessed from the machine that you are deploying the workflow on. You have created a workflow. Steps to create a workflow are provided in Creating a Workflow.

System Manager is installed. This tool is installed as part of the general MicroStrategy product suite.

You have installed any MicroStrategy products and components that are required for the processes of the workflow. For the products and components required for each process, see Defining Processes.

If required, you have created a parameters file to provide values for the parameters of the workflow and saved it in a location that can be accessed from the machine that you are deploying the workflow on.

To Deploy a Workflow Using the Command Line Version of System Manager

  1. Open a command line.
  2. Check to verify that System Manager is installed on the machine:
    • Windows: Type MASysMgr.exe and press Enter.
    • UNIX and Linux: Type mstrsysmgr and press Enter.

      If help information for using the command line version of System Manager is displayed, this means that System Manager is installed correctly.

  3. Type the command to deploy the workflow:

    • Windows: Type MASysMgr.exe and include the parameters listed above in Using the Command Line to Deploy a Workflow as required. For example, the command below is a valid command to deploy a System Manager workflow on a Windows environment:

      Copy
      MASysMgr.exe -w "C:\Create DSNs.smw" -s "Create Oracle DSN" -f "C:\Parameters.smp" -l "C:\Workflow Results.log" -showoutput -p "UserName=User1" "Password=1234"
    • UNIX and Linux: Type mstysysmgr and include the parameters, listed above in Using the Command Line to Deploy a Workflow, as required. For example, the command below is a valid command to deploy a System Manager workflow on a UNIX or Linux environment:

      Copy
      mstrsysmgr -w "$HOME/Create DSNs.smw" -s "Create Oracle DSN" -f "$HOME/Parameters.smp" -l "$HOME/Workflow Results.log" -showoutput -p "UserName=User1" "Password=1234"
  4. Once you have typed the full command, press Enter. The workflow is started and results are saved to the log file, as well as displayed on the screen if you included the parameter -showoutput.

Supporting a Silent Deployment with the Command Line

The command line version of System Manager lets you support silent and OEM deployments of your workflows. You can support silent and OEM deployments of System Manager using the techniques listed below: