In order to provide a more consistent experience with the System Center product family, we've moved the Orchestrator blog to another blog at http://blogs.technet.com/b/orchestrator. Be sure to go there for all the latest info!
Note: The workflow sample mentioned in this article can be downloaded from the Opalis project on CodePlex: http://opalis.codeplex.com
A collection of Workflows that demonstrate the use of Opalis Computer Groups, Schedules, Variables and Counters.
Computer groups enable you to target Workflows against a set of similar computer systems instead of a single computer. By configuring the Activities in your Workflow to use a computer group you are given the flexibility to add computers dynamically by adding them to the computer group.
This Workflow uses the Get Computer/IP Status Activity to query the availability of a group of computers:
The ‘Sample Computer Group’ has following members:
The Send Platform Event Activity is used to display the result from the Get Computer/IP Status Activity for both members of the ‘Sample Computer Group’.
Launch the Workflow by using Start, or by running it using the Workflow Testing Console. Check the Opalis Designer Events tab or the Testing Console log to see the resulting output.
Search the Opalis Online Help for 'Computer Groups' for more information.
Schedules enable you to define when a Workflow or Activity can run. For example, there may be times when it is inappropriate to run some Workflows, such as running a backup Workflow on a main server during regular business hours.
This Workflow uses the Check Schedule Activity to match the current date/time (the date and time of when the ‘Weekday?’ Activity is started) against a Schedule that is active on weekdays only:
The ‘Weekdays’ Schedule has following properties:
The result from the Check Schedule Activity is evaluated and the Workflow branches accordingly. This is accomplished by using a Link Condition that is configured in the Link properties:
The Send Platform Event Activities are used to display the appropriate results.
This Workflow uses the Monitor Date/Time Activity to trigger every day at 9:15 AM:
Then, the Check Schedule Activity is used to match the current date/time (the date and time of when the ‘Only on Weekends’ Activity is started) against a Schedule that is active on weekends only:
The result from the Check Schedule Activity is evaluated and the Workflow branches accordingly. The Send Platform Event Activities are used to display the appropriate results.
Before running the Workflow, change the Monitor Date/Time Activity to an appropriate time such as a minute ahead of the current time. This way, the Monitor Date/Time Activity will trigger as soon as possible.
This Workflow uses the Monitor Date/Time Activity to trigger every day at 9:00 AM. It then uses a Check Schedule Activity to determine if it’s a weekday. If it is a weekday, another Check Schedule Activity is used to determine if it’s a holiday. The results from the Check Schedule Activities are evaluated and the Workflow branches accordingly. The Send Platform Event Activities are used to display the appropriate results.
Search the Opalis Online Help for 'Global Settings' for more information on Schedules.
When building Workflows you may find that there are settings that are same across different Activities. When these values need to be updated, it becomes inconvenient to change each Activity individually. Variables enable you to specify a value in one location and then use that value anywhere else by inserting the Variable into the Activity.
You may also find that there are values that need to be incremented. For example, keeping track of the number of backup attempts that was made by a Workflow. Counters enable you to modify and check the status of a number that you can use to keep track of important statistics.
This Workflow uses the Get File Status Activity to determine the number of files in a directory. The directory name is provided by using a Variable named ‘Directory Name’:
The ‘Directory Name’ Variable has following properties:
The Send Platform Event Activity is used to display the result from the Get File Status Activity:
It displays the number of files as well as the current time of day. In this example, the current time of day is obtained through the Variable named ‘Current Time of Day’ that has following properties:
By specifying ‘now()’ as value, the current system time is returned.
Search the Opalis Online Help for 'Global Settings' for more information on Variables.
This Workflow uses the Modify Counter Activity to reset counter named ‘Sample Counter’ to its default value of 0 (zero):
The Get File Status Activity name ‘List Files in Directory’ is then used to list the files in the root of drive C. For each file found, the Counter is then incremented by 1:
The Link ‘Only First 5 Files’ evaluates the value of the Counter so that it does not exceed five. This way, there will be not more than five instances of the next Activity:
The Send Platform Event Activity ‘Send File Name to Alert’ is then used to display both the Counter value and file name of the first five files. The Junction Activity switches the Workflow from running five instances back to a single instance. The Get Counter Value Activity is used to obtain the current Counter value which is equal to the total number of files found. The Send Platform Event Activity ‘Send Alert with File Count’ displays the Counter value.
Search the Opalis Online Help for 'Global Settings' for more information on Counters.