Serververwaltung > Automate Tasks and Calculate Data Using Event Triggers > Overview of Configuration Management Client-Side Triggers > Environment Variables
  
Environment Variables
When configuring client-side triggers, you can also use certain environment variables to define the object the trigger is operating on. The environment variables used for client-side triggers are similar to those used for user toolbar commands.
For client-side triggers, you can use the following environment variables to determine the object the trigger is operating on.
Environment Variable
Function
MKSSI_COMMAND=si.<command>
MKSSI_COMMAND always set to command running. For example, for add member command environment variable is:
MKSSI_COMMAND=si.AddMember
MKSSI_WINDOW=trigger
MKSSI_WINDOW=trigger always set to indicate operation runs from trigger.
MKSSI_TRIGGER_TYPE=pre|post
MKSSI_TRIGGER_TYPE=<pre|post> set to one or other keyword to indicate whether trigger running due to a pre- or post-event. For example:
MKSSI_TRIGGER_TYPE=post
indicates trigger running due to post event.
MKSSI_UI=cli|gui|web
MKSSI_UI set to one of keywords to indicate type of user interface. For example:
MKSSI_UI=gui
indicates GUI used.
MKSSI_FILE=filepath-relative-to-project/sandbox-of-a-member
MKSSI_FILE set to file path of member relative to configuration management project or Sandbox for member, for example:
MKSSI_FILE=baseframe.c
MKSSI_WORKINGFILE=full-path-to-working-file-for-a-member
MKSSI_WORKINGFILE set to full path of working file for member whenever operation occurs in Sandbox and working file exists, for example:
MKSSI_WORKINGFILE=c:\auroraSB\sh\baseframe.c
MKSSI_SANDBOX=full-path-to-sandbox
MKSSI_SANDBOX set to full path of Sandbox whenever operation occurs in Sandbox. Sample output for operation running in Sandbox:
MKSSI_SANDBOX=c:\auroraSB\sh\project.pj
MKSSI_PROJECT=server-path-to-project
MKSSI_PROJECT set to server path to configuration management project. Sample output for server path to project:
MKSSI_PROJECT=c:/aurora/sh/project.pj
MKSSI_VARIANT=project-variant-name
MKSSI_VARIANT indicates operation runs for specific configuration management project variant. Sample output for operation running for Aurora_Variant project:
MKSSI_VARIANT=Aurora_Variant
MKSSI_BUILD=project-build-revision- number
MKSSI_BUILD indicates operation runs for specific build revision number. Sample output for operation running for build revision number 1.5.1.1:
MKSSI_BUILD=1.5.1.1
MKSSI_PROJECT_TYPE=sandbox|project
MKSSI_PROJECT_TYPE sets one or other keyword to indicate whether operation runs in Sandbox or configuration management project. Sample output for operation running in Sandbox:
MKSSI_PROJECT_TYPE=sandbox
MKSSI_PRESENTER=interface-presenter
MKSSI_PRESENTER set to open presenter for command running, whether through the GUI or CLI.
Value for MKSSI_PRESENTER only relevant to --presenter name option.
Sample Configuration Using Environment Variables
The following example shows how you can use an environment variable with a client-side trigger. The example shows a trigger implemented on the Add Member command (si add). Each time a member is added to a configuration management project, the trigger opens the member working file in a vi text editor:
si.AddMembers.post=AMpost
si.trigger.AMpost.command=sh -c "vi $MKSSI_WORKINGFILE"