Scenario: If the amount of disk space on a server gets too low, an email is sent to the server administrator with a low disk space warning. If the email fails to send, the process follows the exception path and creates a log entry.
Process: This process is created as a Monitoring project type.
The following screen shot shows the process:
A GetComputerInfo component checks a server and returns information to the process. A Number Range Rule component checks the remaining disk space and takes action if the disk space is low. Depending on how low the disk space is, one of two emails is sent to the server administrator.
If the emails fail for any reason, the server administrator has no way of knowing that the server is about to run out of disk space.
An Exception Trigger by Components component watches the email components for failure. If one fails, an exception is triggered and the workflow jumps to the exception component.
Before a log entry can be created, the Create Log Entry component needs to have access to process data from the GetComputerInfo component. Because the Create Log Entry component is not downstream from this component, it cannot see its data. The Variables Exist component makes this data available to the log components.
The following screen shot shows the editor for the Variables Exist component:
The variable ComputerInfo is checked. This variable will be added to the data stream to be used by the Create Log Entry component. The two lists seen here contain the same list of variables. The difference between the two lists is this: the list on the top treats selected variables as required variables, whereas the bottom list treats selected variables as optional variables. In other words, if any of the variables selected in the top list are not found, the component exits through the "false" path. However, if any of the variables selected in the bottom list are not found, the component exits through the "true" path if all of the required variables (in the top list) are present. If you select only optional variables and none are found, the component exits through the "false" path.
The variable ComputerInfo is designated as a required variable. Also, the "Declare Variable Added If Exists" option is checked. This means that if the variable is found to have value, the Variables Exist component will expose the data to all components after it.
If the Variables Exist component finds that ComputerInfo has value, it exits through the "true" outcome path into the first log component. If it find that ComputerInfo has no value, it exits through the "false" outcome path into the second log component.
The following screen shot shows the first Create Log Entry editor:
These two screens are the Create Log Entry editor and its text editor. The log message contains process variables from the GetComputerInfo component, showing how much disk space remains on the server. These variables were provided by the Variables Exist component.
The second log component is configured exactly like this one, except that it does not include the variables.