|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
A collection of Workflows that demonstrate Activities from the ‘Workflow Control’ category of the Opalis Activity library.
Custom Start Example Workflow
The Custom Start Activity is used to create a generic starting point for Workflows. By adding parameters to the Custom Start Activity it can consume external data which can be passed to downstream Workflow Activities.
1. Custom Start Example
This Workflow uses the Custom Start Activity to obtain input data using three variables:
- IP Address
- Computer Name
- Number of CPUs
The Compare Values Activity ‘< 2 CPUs?’ is used to evaluate the value submitted for the ‘Number of CPUs’ variable:
For comparison of numeric values, the proper Type needs to be specified in the General Properties of the Compare Values Activity:
The result from the Compare Values 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:
Running the example Workflow
Launch the Workflow by starting it from the Operator Console or by running it using the Testing Console. When prompted, enter the appropriate values:
Check the Operator Console Event screen or the Workflow Testing Console log to see the resulting output.
Search the Opalis Help for ‘Custom Start’ for more information.
Junction Example Workflows
The Junction Activity will allow you to wait for multiple branches in a Workflow to complete before continuing past the junction. Also, the Junction Activity can republish data from any Workflow branch so that downstream Activities past the Junction Activity can consume the data.
1. Deposit Files
This Workflow will create two samples files OIS_SAMPLE_RENAME.txt and OIS_SAMPLE_ZIP.txt on the C drive.
2. Junction Example
This Workflow uses a Monitor File Activity to monitor drive c for the creation of the sample text files that are created using Workflow ‘1. Deposit Files’:
The Get File Status Activity checks for the existence of the files that triggered the Monitor File Activity by subscribing to the ‘File Name and Path’ Published Data:
The result from the Get File Status Activity is evaluated and the Workflow branches accordingly. This is accomplished by using a Link Condition that is configured in the Link properties:
The Copy File Activity copies the file named ‘OIS_SAMPLE_RENAME.txt’ to drive C and creates a uniquely named file:
The Compress File Activity adds the file named ‘OIS_SAMPLE_ZIP.txt’ to a ZIP file named ‘OIS_SAMPLE_ZIPPED.zip’:
The Junction Activity waits for the three Workflow branches to complete before continuing past the Junction. It re-published the data from the Get File Status Activity so its data can be used in the downstream Workflow Activity:
The Move File Activity ‘Archive Original Files’ moves the original files OIS_SAMPLE_RENAME.txt and OIS_SAMPLE_ZIP.txt to the C drive, effectively archiving them by creating unique file names based on timestamp information:
3. Reset Demo
This Workflow performs cleanup by deleting the files created using the Sample Workflows.
Running the example Workflow
Launch the Workflow named ‘2. Junction Example’ by using Start or by running it using the Testing Console. Once started, it will monitor the C drive.
Launch the Workflow named ‘1. Deposit Files’ using Start or by running it using the Testing Console. It will create two files that will trigger the Workflow ‘2. Junction Example’.
Check the Opalis Designer log history or Testing Console log, as well as the C drive to see the results of this Workflow.
Launch the Workflow named ‘3. Reset Demo’ to perform cleanup.
Search the Opalis Help for ‘Junction’ for more information.