Workflow Authoring Examples

Data Manipulation Functions

A collection of Policies that demonstrate the use of Data Manipulation Funtions and the Format Date/Time Object.

Getting Started

Launch the Policy named 0.Setup by using Start or by running it using the Testing Console.
The Policy will create a sample input.txt file on your C: drive.
The sample input.txt file will be used by the other Policies and has following content:
001;<DATETIME STAMP>;John;Smith;Sales
<DATETIME STAMP> will have the actual data and time from when the Policy was started.

Example Policies

1. Data Manipulation Functions
DataManip1.png

This Policy uses the Read Line Object to read line number 1 from C:\input.txt. It then uses the Send Platform Event Object to display the result of using several Data Manipulation Functions:

DataManip2.png
  • The original string.
  • The string in uppercase letters using the Upper function.
  • The second element of the string using the Field function.
  • Initial.Last Name, i.e. ‘J.Smith’. This is accomplished by using a combination of Data Manipulation Functions.

Launch the Policy by using Start, or by running it using the Policy Testing Console. Check the Opalis Client Events tab or the Testing Console log to see the resulting output.

More Information
Search the Opalis Online Help for 'Data Manipulation Functions' to see all the available functions as well as examples.
2. Date/Time Manipulation

DateTimeManip1.png

This Policy used the Read Line Object to read line number 1 from C:\input.txt. It then uses the Format Date/Time Object to adjust the input Date/Time (the second element from the string that is obtained using a Field function) to 1 day before:

DateTimeManip2.png

The adjusted Date/Time is displayed using the Send Platform Event Object.

Launch the Policy by using Start, or by running it using the Policy Testing Console. Check the Opalis Client Events tab or the Testing Console log to see the resulting output.
More Information
Refer to the Format Date/Time Object Online Help.

Field Mapping

A Policy that demonstrates the use of the Map Published Data Object so that values from one application can be mapped to the appropriate values in another application. An example would be to map numeric values 1, 2, 3 for ‘priority’ to high, medium, low.

Example Policy

1. Map Priority and SLA
MapPrioritySLA1.png


This Policy uses the Custom Start Object to obtain user input using 4 custom variables:

MapPrioritySLA2.png
  • Source
  • Summary
  • Priority (enter a value between 1 and 3)
  • SLA (enter a value between 2 and 6)

The Map Published Data Object maps the values entered for Priority and SLA using two mapping rules:

MapPrioritySLA3.png

The output Priority_Result, uses the values entered for Priority and maps them to either High, Medium or Low:

MapPrioritySLA4.png

The output SLA_Result, uses the values entered for SLA and maps them to either Platinum, Gold or Bronze:

MapPrioritySLA5.png

The resulting output is displayed using the Send Platform Event Object.
Launch the Policy by starting it from the Operator Console or by running it using the Testing Console. When prompted, enter the appropriate values:

MapPrioritySLA6.png

Check the Operator Console Event screen or the Policy Testing Console log to see the resulting output.

Last edited Apr 29, 2010 at 10:03 PM by rhearn, version 2

Comments

No comments yet.