Opalis Blog

Your source for all things Opalis.

Global Settings

Global Settings

  • Comments 1
  • Likes

Caution
Test the script(s), processes and/or data file(s) thoroughly in a test environment, and customize them to meet the requirements of your organization before attempting to use it in a production capacity.  (See the legal notice here)

 

Note: The workflow sample mentioned in this article can be downloaded from the Opalis project on CodePlex:  http://opalis.codeplex.com

 

Overview

A collection of Workflows that demonstrate the use of Opalis Computer Groups, Schedules, Variables and Counters.

Computer Groups Example Workflow

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.

1. Run Activity Against Computer Group

image

This Workflow uses the Get Computer/IP Status Activity to query the availability of a group of computers:

image

The ‘Sample Computer Group’ has following members:

image

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’.

Running the example Workflow

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.

More Information

Search the Opalis Online Help for 'Computer Groups' for more information.

Schedules Example Workflows

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.

1. Checking a Schedule

image

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:

image

The ‘Weekdays’ Schedule has following properties:

image

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:

image

The Send Platform Event Activities are used to display the appropriate results.

Running the example Workflow

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.

2. Monitor Time and Schedules

image

This Workflow uses the Monitor Date/Time Activity to trigger every day at 9:15 AM:

image

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:

image

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.

Running the example Workflow

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.

3. Compound Scheduling

image

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.

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.

Running the example Workflow

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.

More Information

Search the Opalis Online Help for 'Global Settings' for more information on Schedules.

Variables and Counters Example Workflows

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.

1. Variables – Static and Date/Time

image

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’:

image

The ‘Directory Name’ Variable has following properties:

image

The Send Platform Event Activity is used to display the result from the Get File Status Activity:

image

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:

image

By specifying ‘now()’ as value, the current system time is returned.

Running the example Workflow

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.

More Information

Search the Opalis Online Help for 'Global Settings' for more information on Variables.

2. Counters

image

This Workflow uses the Modify Counter Activity to reset counter named ‘Sample Counter’ to its default value of 0 (zero):

image

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:

image

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:

image

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.

Running the example Workflow

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.

More Information

Search the Opalis Online Help for 'Global Settings' for more information on Counters.

 

Share this post :


Comments
  • Hello.  I am curious about the now() variable.  Are there more pre-defined system variables that we can leverage in Opalis like this?  For example I tried using date() but it didnt work.  I would like to have the same functionality of the now() variable but the output doesn't suit my needs - I just need the date in the format MM-DD-YYYY or similar, so I can append it to a folder/file names.  Thanks.