14 Creating and Managing Oracle BAM Data Objects

This chapter describes how to create and manage data objects in Oracle Business Activity Monitoring (Oracle BAM), including creating different data object types, creating different column types and hierarchies, assigning row security and permissions, and managing data.

This chapter includes the following sections:

14.1 Understanding Oracle BAM Data Objects

For a general introduction to data objects, including how to add data objects to projects and view data object information, see Working with Data Objects. You should know how to work with data objects as a user in the Designer role before creating data objects as a user in the Administrator role.

Process data objects in BAM are based on the process star schema. This is the star schema standard adapted for use in process analytics. Fact tables contain measures such as process running times, and dimension tables contain dimensions such as process names.

Before you create a data object, you should determine the following:

  • The type of data object you need: simple, derived, external, or logical

  • For a simple data object, whether you need a stream, archived stream, or archived relation

  • The columns you need and whether they are measures, dimensions, or attributes

  • The data types of the columns you need: VARCHAR (or String), INT, DECIMAL, FLOAT, or DATETIME

  • Whether you need primary columns for joins

  • Whether you need index columns

  • Whether you need hierarchies

    Whether you need calculated fields

  • Whether data will be filtered

  • How long data will be retained

  • The types of row security and permissions you will be granting to other users

See the following for information about the ready-to-use data objects provided with BAM:

A data object contains no data when you first create it. You must load or stream data into data objects using the technologies discussed in the following topics:

You can view definitions (metadata) for all BAM data objects using the following WSIL interface:

http://host:port/OracleBAMWS/WebServices/Wsil/inspection.wsil

Note:

BAM has the following system data objects, which you must not delete or change:

  • AlertHistory — Stores alert event history.

  • BAM_ENTITY — Stores metadata for all BAM data objects.

  • PreseedingFileHistory — Tracks the use of preseeding files, which are templates for data object and project creation.

In addition, it is strongly recommended that you do not change any data objects in the oracle folder. Doing so could break dependent entities such as the pre-assembled BPM dashboards and other Oracle samples. Oracle BAM also ships with the ColorThemes data object which you must not delete but can edit. You can enter six-digit HEX color codes prefixed with a number or hash sign, like #FF006A, for example. You can store up to 15 colors per theme. Blank or empty colors are allowed, even when in the middle of a row. That is, you can assign colors 1 to 3, skip 4 and 5, then assign 6-10 and stop there. You can also create custom color themes using this data object which show up in the Predefined Style drop-down in the General properties for Business Views. See General Properties for more information.

14.2 Creating a Data Object

Oracle BAM enables you to create different data object types to maintain various kinds of data, including external data, persisting outside BAM.

This section includes the following topics:

See Data Object Types for an explanation of each data object type, the difference between a stream and a relation, and what it means for a data object to be archived.

Note:

You must not create a data object column named “Type” or “type”. It is a reserved word and even though you will not see a warning at creation time, you will be unable to save a query with this column name.

14.2.1 Creating a Simple Data Object

To create a simple data object:

  1. Go to the Administrator page.
  2. Click Data Objects, or right-click Data Objects and select the Create menu item.

    The Data Objects dialog appears.

  3. Type a Name and optionally edit the Display Name.

    The Name is case insensitive, must begin with a letter, and may consist only of letters, numbers, and the underscore character. It may have up to 128 characters. It cannot be changed after the data object is created.

    The Display Name is case insensitive and may contain any characters except the forward slash (/), which indicates a folder path. It may have up to 128 characters. It can be changed at any time.

  4. Select Simple Data Object as the Type.
  5. Select STREAM or RELATION as the Continuous Query Type.
  6. If you selected STREAM, check or uncheck the Archived box.

    A relation is always archived.

  7. If you selected STREAM and checked Archived, supply the replay information:
    • Replay Unit — Select Rows, Nanoseconds, Microseconds, Milliseconds, Seconds, Minutes, Days, Weeks, Months, or Years.

    • Replay Amount — Specify the number of the units. For example, if the units are Rows and you type 100, then the last 100 rows are archived.

    The replay information specifies the part of the immediate past that is of interest for continuous queries, realtime KPIs, and alerts.

  8. Optionally, type a Category for the data object.

    This value can label and group similar data objects, such as BPM data objects.

  9. Specify maximum numbers of columns with different data types:
    • Number of String Columns — The default is 25.

    • Number of Long String Columns — The default is 25.

    • Number of Integer Columns — The default is 25.

    • Number of Float Columns — The default is 25.

    • Number of Decimal Columns — The default is 25.

    • Number of Date/Time Columns — The default is 10.

  10. Optionally, type a Description of the data object.
  11. Click Create.

    The data object opens in a new tab.

14.2.2 Creating a Derived Data Object

To create a derived data object:

  1. Go to the Administrator page.
  2. Click Data Objects and select the Create menu item.

    The Data Objects dialog appears.

  3. Type a Name and optionally edit the Display Name.

    The Name is case insensitive, must begin with a letter, and may consist only of letters, numbers, and the underscore character. It may have up to 128 characters. It cannot be changed after the data object is created.

    The Display Name is case insensitive and may contain any characters except the forward slash (/), which indicates a folder path. It may have up to 128 characters. It can be changed at any time.

  4. Select Derived Data Object as the Type.
  5. Select the Parent data object from which to derive this data object.

    A derived data object must have the same settings for STREAM or RELATION and Archived as its parent.

  6. For an Archived STREAM, supply the replay information:
    • Replay Unit — Select Rows, Nanoseconds, Microseconds, Milliseconds, Seconds, Minutes, Days, Weeks, Months, or Years.

    • Replay Amount — Specify the number of the units. For example, if the units are Rows and you type 100, then the last 100 rows are archived.

    The replay information specifies the part of the immediate past that is of interest for continuous queries, realtime KPIs, and alerts.

    A derived data object must have replay information less than or equal to that of the parent data object.

  7. Optionally, type a Category for the data object.

    This value can label and group similar data objects, such as BPM data objects.

  8. Optionally, type a Description of the data object.
  9. Click Create.

    The data object opens in a new tab.

    Note:

    Derived data objects retain the inherited calculation fields and hierarchies of the parent data object, but they cannot be edited.

14.2.3 Creating an External Data Object

An external data object is a connection to a table in an external database. You cannot change its data using Oracle BAM.

You can export and import its metadata only using BAMCommand. See Using BAM Command for more information.

To create an external data object:
  1. Configure a data source in Oracle WebLogic Server.

    See Configuring JDBC Data Sources in Administering JDBC Data Sources for Oracle WebLogic Server.

  2. Go to the Administrator page.
  3. Click Data Objects and click the Create icon, or right-click Data Objects and select the Create menu item.

    The Data Objects dialog appears.

  4. Type a Name and optionally edit the Display Name.

    The Name is case insensitive, must begin with a letter, and may consist only of letters, numbers, and the underscore character. It may have up to 128 characters. It cannot be changed after the data object is created.

    The Display Name is case insensitive and may contain any characters except the forward slash (/), which indicates a folder path. It may have up to 128 characters. It can be changed at any time.

  5. Select External Data Object as the Type.
  6. Select a Schema Type. You can choose to create an External Fact DO or an External Dimension DO.

    An external fact data object refers to a table from an external database or different schema, used as a fact data object in BAM.

    An external dimension data object refers to a table from an external database or different schema, used as Dimension data object in BAM. This data object generates a simple data object as a dimension table.

    The External Dimension Data Object data is copied to the generated Simple Data Object. You can alter the number of rows that populate a Simple Data Object from an External Data Object by using Oracle Enterprise Manager Fusion Middleware Control.

  7. Optionally, type a Category for the data object.

    This value can label and group similar data objects, such as BPM data objects.

  8. Optionally, type a Description of the data object.
  9. Click Create.

    The data object opens in a new tab.

  10. Select the Tables subtab.

    This subtab applies only to external data objects.

  11. Select the data source you configured in step 1 from the Select a Data Source drop-down list.
  12. Optionally type a text string in the Table Name Filter field to filter the selections in the Select a Table drop-down list. You can use the percent (%) character as a wildcard.

    For example, type %ACTIVITY% to restrict the Select a Table list to data sources with ACTIVITY in their names.

  13. Select the desired table from the Select a Table drop-down list.

    The columns in the selected table appear.

  14. For each column, check or uncheck the Selected Columns box.

    Only checked columns are visible to BAM.

  15. For each column, optionally edit the Column Name.
  16. For each column, select the Column Type: ATTRIBUTE (the default), DIMENSION, or MEASURE.
  17. Click Save.

14.2.4 Creating a Logical Data Object

To create a logical data object:

  1. Go to the Administrator page.
  2. Click Data Objects and click the Create icon, or right-click Data Objects and select the Create menu item.

    The Data Objects dialog appears.

  3. Type a Name and optionally edit the Display Name.

    The Name is case insensitive, must begin with a letter, and may consist only of letters, numbers, and the underscore character. It may have up to 128 characters. It cannot be changed after the data object is created.

    The Display Name is case insensitive and may contain any characters except the forward slash (/), which indicates a folder path. It may have up to 128 characters. It can be changed at any time.

  4. Select Logical Data Object as the Type.
  5. Optionally, type a Category for the data object.

    This value can label and group similar data objects, such as BPM data objects.

  6. Optionally, type a Description of the data object.
  7. Click Create.

    The data object opens in a new tab.

  8. Select the Columns subtab.
  9. Click Add Data Object Mapping.

    A data object mapping joins two data objects.

  10. Select the following:
    • Primary Data Object — Select the primary data object name. This will constitute the Fact Data Object within the Logical Data Object.

    • Primary Column — Select the internal name of the primary column the in primary data object used in the join.

    • Foreign Data Object — Select the foreign data object name.

    • Foreign Column — Select the internal name of the primary column the in foreign data object used in the join.

    Note:

    The Primary Data Object and Foreign Data Object selection list only lists Simple and Derived Data Objects. Logical and External Data Objects are not listed.
    Check the Standalone Mode box if you want the Logical Data Object to be composed of only one data object. In this case, only the Primary Data Object field remains.
  11. Optionally, check the Left Outer Join box. If unchecked, the Logical Data Object will have the Inner Join join type.
  12. To join more data objects, repeat steps 9 and 10.
  13. Click Save.

14.3 Adding Columns and Hierarchies to a Data Object

This chapter includes information about columns and hierarchies and outlines how you can add them to a data object.

This section includes the following topics:

14.3.1 Column Data Types

The data types include:

  • VARCHAR (or String) columns contain a sequence of text characters. The maximum length that Oracle BAM 12c supports is 2000 characters. Note that decreasing varchar field limit may result in data purges.

  • INT columns contain numbers from -2^63 ~ 2^63 - 1.

    Boolean columns are INT columns with a size of 1 and values of 0 for false and 1 for true.

  • FLOAT columns are double-precision floating point numbers.

    Oracle BAM Float truncates numeric data that has very high precision. If you do not want to see loss of precision, use the Oracle BAM Decimal type (NUMBER in an Oracle database) with the scale you want.

    A FLOAT in Oracle BAM is stored as an Oracle database data type BINARY_FLOAT. The precision is not guaranteed to be exactly the same as entered by the user, and when data flows from one system to another, the data types get mapped to each other (as for example SQL float to Java float). Oracle BAM does not do any manipulation with the data sent by the database. It is the Oracle Java Database Connectivity (JDBC) driver that loses the last few digits.

  • DECIMAL columns include decimal points with a scale number defined. The number is stored as a string, which uses a character for each digit in the value.

    The Oracle BAM Decimal data type is stored as a NUMBER (38, X) in the Oracle database. The first argument, 38, is the precision, and this is hard-coded. The second argument, X, is the scale, and you can adjust this value. The scale value cannot be greater than 38.

  • DATETIME columns are timestamps generated to milliseconds.

    A DATETIME field is stored as an Oracle database data type TIMESTAMP(6). Depending on how the DATETIME field is populated, Oracle BAM may fill in the time stamp value for you. For instance, in Oracle BAM you cannot specify the value for DATETIME when adding a row, but if the value for DATETIME is specified in a BAMCommand import file, the specified value is added as the value of the DATETIME field instead of the current time.

    The format of DATETIME values in BAM is as follows, with 24-hour time:

    yyyy-MM-dd'T'HH:mm:ss.SSSZ
    

    For example, the following DATETIME value represents November 12, 2013 at 12:15:52 am, plus 103 milliseconds, in the GMT -8 (Pacific) time zone:

    2013-11-12T00:15:52.103-08:00
    

14.3.2 Adding Columns to a Simple or Derived Data Object

This procedure applies to simple and derived data objects. You cannot add columns to an external data object from within Oracle BAM. A different procedure applies to logical data objects; see Adding Columns to a Logical Data Object.

Note:

If you delete or hide a column in a simple or derived data object, then queries, views, and other entities that depend on the data object are broken and must be edited as described in Managing Changes in a Project.

To add columns to a simple or derived data object:

  1. Go to the Administrator page.
  2. In the left navigation pane, click the arrow to the left of Data Objects.

    All data objects in the current project are displayed in a list.

  3. Click the data object name, or right-click the data object and select the Edit menu item.

    The data object opens in a new tab.

  4. Select the Columns subtab.
  5. Click Add Column.

    A new column appears as a row in the table, named column_1.

  6. Click the table cell under Column Name and edit the name.

    The Column Name is case insensitive, must begin with a letter, and may consist only of letters, numbers, and the underscore character. It may have up to 30 characters. It cannot be changed after the column is created.

  7. Optionally click the table cell under Display Name and edit the name.

    The Display Name is case insensitive and may contain any characters except the forward slash (/), which indicates a folder path. It may have up to 30 characters. It can be changed at any time.

  8. Select the Column Type: ATTRIBUTE (the default), DIMENSION, or MEASURE.
  9. Select the Data Type: INT (the default), VARCHAR, DECIMAL DATETIME, or FLOAT.
  10. If the selected Data Type makes the Size editable, optionally type a Size in bytes.
  11. Check Nullable to allow the column to have null values. The default is checked.
  12. Check Hidden to hide the column from Designer users. The default is unchecked.
  13. Check Unique to require each column value to be unique. The default is unchecked.

    This setting is not available for a new column in a derived data object.

  14. Optionally, click the Default Value cell to make it editable. If the column does not have any inherent value, the default value you specify here will be used.
  15. Optionally type a Comment.
  16. Repeat steps 5 through 14 to add other columns.
  17. Click Save.

14.3.3 Adding Columns to a Logical Data Object

This procedure applies to logical data objects. You cannot add columns to an external data object from within Oracle BAM. A different procedure applies to simple and derived data objects; see Adding Columns to a Simple or Derived Data Object.

Note:

If you delete a column from a logical data object, a query that references the deleted column continues to run until the dashboard that references the query is closed.

To add columns to a logical data object:

  1. Go to the Administrator page.
  2. In the left navigation pane, click the arrow to the left of Data Objects.

    All data objects in the current project are displayed in a list.

  3. Click the data object name, or right-click the data object and select the Edit menu item.

    The data object opens in a new tab.

  4. Select the Columns subtab.
  5. Click Add Logical Column.

    A dialog with Available Columns and Selected Columns lists appears.

  6. To add a column to the Selected Columns list, select the column and click the single right arrow.
  7. To add all columns to the Selected Columns list, select the column and click the double right arrow.
  8. To remove columns from the Selected Columns list, use the single and double left arrows.
  9. When the Selected Columns list is final, click Finish.

    The selected columns appear as rows in the table.

  10. Optionally click the table cell under Logical Data Object Column Name and edit the name.

    The Logical Data Object Column Name is case insensitive, must begin with a letter, and may consist only of letters, numbers, and the underscore character. It may have up to 30 characters. It cannot be changed after the column is created.

  11. Optionally click the table cell under Logical Data Object Column Display Name and edit the name.

    The Logical Data Object Column Display Name is case insensitive and may contain any characters except the forward slash (/), which indicates a folder path. It may have up to 30 characters. It can be changed at any time.

  12. Select the Column Type: ATTRIBUTE (the default), DIMENSION, or MEASURE.
  13. Repeat steps 5 through 12 to add other columns.
  14. Click Save.

14.3.4 Adding Index Columns

Indexes improve performance for large data objects containing many rows. Without any indexes, accessing data requires scanning all rows in a data object. Scans are inefficient for very large data objects. Indexes can help find rows with a specified value in a column.

If the data object has an index for the columns requested, the information is found without having to look at all the data. Indexes are most useful for locating rows by values in columns, aggregating data, and sorting data.

You can add index columns to simple and derived data objects.

To add an index column:

  1. Go to the Administrator page.
  2. In the left navigation pane, click the arrow to the left of Data Objects.

    All data objects in the current project are displayed in a list.

  3. Click the data object name, or right-click the data object and select the Edit menu item.

    The data object opens in a new tab.

  4. Select the Indexes subtab.
  5. Click Add Index.

    The Edit Index dialog appears.

  6. Type a Name for the index. An INDEX prefix is autofilled.

    The Name is case insensitive, must begin with a letter, and may consist only of letters, numbers, and the underscore character. It may have up to 30 characters. It cannot be changed after the data object is created.

  7. To add a column to the Selected Columns list, select the column in the Available Columns list and click the single right arrow.
  8. To add all columns to the Selected Columns list, select the columns and click the double right arrow.
  9. To remove columns from the Selected Columns list, use the single and double left arrows.
  10. To change the position of a column in the Selected Columns list, select it and use the Move to Top, Move Up One, Move Down One, or Move to Bottom arrows.

    The position in the Selected Columns list corresponds to the position in the index.

  11. When the Selected Columns list is final, click Finish.

    The Edit Index dialog closes, and the index appears as a row in the table. You can edit or remove an index by clicking the icons in the Action column.

  12. Click Save.

14.3.5 Adding Hierarchies

In Oracle BAM, you can add hierarchies to data objects to provide drill paths for business views. When a Designer user selects a hierarchy for drill-down in a view, the Viewer user can drill down and up the hierarchy of data, displaying data at different levels of detail.

You can create and edit multiple, independent hierarchies in any type of data object. There are two hierarchy types: non-datetime and datetime.

Note:

Hierarchies cannot consist of calculated fields.

14.3.5.1 Creating a Non-Datetime Hierarchy

To create a non-datetime hierarchy:

  1. Go to the Administrator page.
  2. In the left navigation pane, click the arrow to the left of Data Objects.

    All data objects in the current project are displayed in a list.

  3. Click the data object name, or right-click the data object and select the Edit menu item.

    The data object opens in a new tab.

  4. Select the Hierarchies subtab.
  5. Click the Add icon.

    The Create Hierarchy dialog appears.

  6. Type a Name for the hierarchy.
  7. Select Non-Datetime Hierarchy as the Type.
  8. To add a column to the Selected Columns list, select the column in the Available Columns list and click the single right arrow.
  9. To add all columns to the Selected Columns list, select the columns and click the double right arrow.
  10. To remove columns from the Selected Columns list, use the single and double left arrows.
  11. To change the position of a column in the Selected Columns list, select it and use the Move to Top, Move Up One, Move Down One, or Move to Bottom arrows.

    The position in the Selected Columns list corresponds to the position in the hierarchy.

  12. When the Selected Columns list is final, click Save.

    The Create Hierarchy dialog closes, and the hierarchy appears as a row in the table. You can edit or remove a hierarchy by clicking the icons in the Action column.

  13. Click Save.

14.3.5.2 Creating a Datetime Hierarchy

To create a datetime hierarchy:

  1. Go to the Administrator page.
  2. In the left navigation pane, click the arrow to the left of Data Objects.

    All data objects in the current project are displayed in a list.

  3. Click the data object name, or right-click the data object and select the Edit menu item.

    The data object opens in a new tab.

  4. Select the Hierarchies subtab.
  5. Click the Add icon.

    The Create Hierarchy dialog appears.

  6. Type a Name for the hierarchy.
  7. Select Datetime Hierarchy as the Type.
  8. Select a DATETIME column from the Fields drop-down list.
  9. Check all the boxes that apply in the Groups list: YEAR, QUARTER, MONTH, WEEK, DAYOFYEAR, DAYOFMONTH, DAYOFWEEK, HOUR, MINUTE, or SECOND.
    Note: Drilling down in business views is only supported for YEAR, MONTH, DAYOFMONTH, HOUR, MINUTE, and SECOND.
  10. When the Groups list is final, click Save.

    The Create Hierarchy dialog closes, and the hierarchy appears as a row in the table. You can edit or remove a hierarchy by clicking the icons in the Action column.

  11. Click Save.

14.3.6 Adding Calculated Fields

You can create a column with a calculation based on other columns in the data object. The calculator includes aggregate functions, string functions, and datetime functions that you combine with existing column data to create calculated fields. You can also create calculated fields based on other calculated fields.

For example, if a field called Activity Running Time is in milliseconds, and you prefer to see the data in minutes, you can create a calculated field named Activity Running Time in Minutes and give it the following calculation expression:

Activity Running Time (millisecs)/60000

You can add calculated fields to logical data objects.

Note:

If you modify a calculated field in a logical data object, a query that references the field continues to run until the dashboard that references the query is closed and the query is resaved.

To add a calculated field:

  1. Go to the Administrator page.
  2. In the left navigation pane, click the arrow to the left of Data Objects.

    All data objects in the current project are displayed in a list.

  3. Click the data object name, or right-click the data object and select the Edit menu item.

    The data object opens in a new tab.

  4. Select the Calculated Fields subtab.
  5. Click the Add icon.

    The Expression Builder dialog appears.

  6. Type a Field Name and a Display Name.

    The Field Name is case insensitive, must begin with a letter, and may consist only of letters, numbers, and the underscore character. It may have up to 128 characters. It cannot be changed after the field is created.

    The Display Name is case insensitive and may contain any characters except the forward slash (/), which indicates a folder path. It may have up to 128 characters. It can be changed at any time.

  7. Choose a Column Type. Oracle BAM provides the following Column Type options for calculated fields:
    • Attribute

    • Measure

    • Dimension

    For more information on data object columns and their uses, see Data Object Columns. The default selected value is Measure.

  8. To help you create an Expression, BAM provides these components:
    • Functions are of these types:

      • Calculate Functions include references to dates and times, comparisons, and text operations such as concatenation.

      • Control Functions include programming decision operations such as IF, THEN, and ELSE.

      • Aggregation Functions include operations on groups of numbers, such as average, sum, count, maximum, or minimum.

    • Variables reference column data.

    • Operators perform mathematical operations such as addition and subtraction.

    Click the Insert into Expression button to add the function, variable, or operator you select to the expression. See Operators and Functions for Calculated Fields for more information.

    Note:

    If you select a Data Object Parameter, it is added into the expression box within brackets if the display name for the parameter contains certain special characters. This is so the special characters aren’t treated as functions.
  9. When the calculated field expression is final, click OK.

    A basic syntax check is performed and any errors are displayed.

    If the calculation passes the syntax check, the Expression Builder dialog closes and the new field appears as a row in the table. You can edit or remove a calculated field by clicking the icons in the Edit and Delete columns.

  10. Click Save.

14.3.7 Adding Data Object Parameters

As an administrator, you can define parameters at the data object level inside calculated fields. This is different from project-level parameters that Designers can specify.

To create a DO-level Parameter:
  1. Go to the Administrator page.
  2. Expand the Data Objects node in the left panel navigator.
  3. Select the data object for which you want to create parameters.
  4. Click the Calculated Fields tab.
  5. In the Data Object Parameters panel, click Add Parameter.
    The table is now populated with a new parameter that you can modify.
  6. To edit the name of this parameter, click the Name field.

    The Name is case sensitive, must begin with a letter, and may consist only of letters, numbers, and the underscore character. It may have up to 128 characters. It cannot be changed after the parameter is created.

    The Display Name is case sensitive and may contain any characters except the forward slash (/), which indicates a folder path. It may have up to 128 characters. It can be changed at any time.

  7. Check the Required check box to mandate a user-specified value for this parameter.

    This value can be a default or a value chosen by the user.

  8. Specify a Default Value if needed.
  9. Select a Data Type for this parameter.

    A Data Type can be a String, Datetime, Integer, Decimal, or Float value.

  10. Optionally, specify a Description for what this parameter does.
  11. Click Save.

14.3.8 Viewing Maximum Numbers of Columns in a Derived Data Object

When you create a simple data object, you specify the maximum numbers of columns with different data types, and you cannot change these numbers later. For derived data objects, you can view these numbers on the General subtab.

To view the numbers of columns:

  1. Go to the Administrator page.
  2. In the left navigation pane, click the arrow to the left of Data Objects.

    All data objects in the current project are displayed in a list.

  3. Click the data object name, or right-click the data object and select the Edit menu item.

    The data object opens in a new tab.

  4. In the General tab, view the maximum numbers of columns with different data types:
    • Number of String Columns — The default is 25.

    • Number of Integer Columns — The default is 25.

    • Number of Float Columns — The default is 25.

    • Number of Decimal Columns — The default is 25.

    • Number of Date/Time Columns — The default is 10.

14.4 Securing a Data Object

Permissions determine who has access to the metadata of a data object or to the data as a whole. Row security determines who has access to specific types of data. Permissions and row security apply to all types of data objects.

This section includes the following topics:

14.4.1 Setting Security Permissions for a Data Object

To change permissions for a data object:

  1. Go to the Administrator page.

  2. In the left navigation pane, click the arrow to the left of Data Objects.

    All data objects in the current project are displayed in a list.

  3. Right-click the data object and select the Security menu item.

    The data object security settings open in a new tab.

  4. To add a role or group to whom you can explicitly grant or deny permissions, follow these steps:

    1. Click the Add icon in the Grant Permissions or Deny Permissions table.

      The Add Application Roles, Groups, and Users dialog opens.

      See Managing Oracle BAM Users for information about how to add users to roles and groups.

    2. Type a Name for the role or group you are adding.

    3. Select from the drop-down List: Application Role or Group.

    4. Click Search to populate the Available Members list.

    5. To add a member to the Selected Members list, select the member and click the single right arrow.

    6. To add all members to the Selected Members list, select the member and click the double right arrow.

    7. To remove members from the Selected Members list, use the single and double left arrows.

    8. When the Selected Members list is final, click OK.

      The Add Application Roles, Groups, and Users dialog closes, and the Name you specified appears in the table.

  5. To remove a role or group, select the table row and click the Remove icon.

  6. To grant or deny permissions, check or uncheck the following permissions listed in the Grant Permissions and Deny Permissions tables.

    • Read — Permission to view the metadata of the data object.

    • Write — Permission to edit the metadata of the data object. Write permission automatically includes Read permission.

    • Remove — Permission to delete the data object.

    • Select — Permission to select, or read, the data in the data object.

      This is the minimum permission needed for using the data object in business queries, business views, dashboards, and other Designer entities.

    • Delete — Permission to delete data object rows.

    • Update — Permission to update or insert data object rows.

    • Security — Permission to set these permissions for other users for this data object.

  7. Click Save.

14.4.2 Setting Row Security for a Data Object

You can add security filters to data objects so that only specific users can view specific rows in the data object. This can be useful when working with data objects that contain sensitive or confidential information not intended for all Designer or Viewer users.

If a user has a dashboard open, and you change that user's security filter, it does not affect the currently open dashboard. If the user reopens that dashboard, it has the new security filter settings applied. Security filter settings are included in the business queries behind the dashboard views.

Note:

To ensure that row security changes are applied to alerts, resave the alerts or restart the Oracle BAM server.

To add a row security filter to a data object:

  1. Go to the Administrator page.
  2. In the left navigation pane, click the arrow to the left of Data Objects.

    All data objects in the current project are displayed in a list.

  3. Click the data object name, or right-click the data object and select the Edit menu item.

    The data object opens in a new tab.

  4. Select the Row Security subtab.
  5. Click the Add Default (plus with an arrow) icon to create a default filter for all roles with no filters assigned.

    BAMDefaultFilter appears in the Name column of the row security table. You can add a filter as if it were a role.

  6. Click the Add icon to add roles to the row security table.

    The Add Application Roles dialog appears.

    See Managing Oracle BAM Users for information about how to add users to roles.

  7. Click the Search button to display roles in the Available Members list according to the List selection.

    You can filter the search by typing a partial name in the Name text box.

  8. Select roles and click the Move Selected Items arrow icon to move them to the Selected Members list. To move all members, click the Move All Items double arrow icon.

    To remove roles, click the Remove Selected Items or Remove All Items icon.

  9. When the Selected Members list is final, click OK.
  10. Click the Edit icon for the Name to which to apply the security filter.

    The Edit Security Filter dialog appears. All of the functionality available in query filters is provided. See Filtering Data for more information.

    To set a default row security filter for all users with no row security filters set, edit BAMDefaultFilter, which has no initial filter set.

  11. When the filter is final, click OK.

    The Edit Security Filter dialog closes, and the filter appears in the row in the table for the Name you selected. You can edit or remove a filter by clicking the icons in the Action column.

  12. Click Save.

14.5 Managing Data in Data Objects

This section contains information about modifying or removing data from a data object both manually and automatically.

This section includes the following topics:

14.5.1 Adding Rows to a Data Object Automatically

To add rows to a data object automatically, you must load or stream data using the technologies discussed in the following topics:

14.5.2 Adding Rows to a Data Object Manually

You can manually add rows to simple and derived data objects.

To add a row to a data object manually:

  1. Go to the Administrator page.
  2. In the left navigation pane, click the arrow to the left of Data Objects.

    All data objects in the current project are displayed in a list.

  3. Click the data object name, or right-click the data object and select the Edit menu item.

    The data object opens in a new tab.

  4. Select the Data subtab.
  5. Click Add Row.

    A row is added to the table.

  6. Click on the row and edit the values in the cells.

    For a DATETIME column, you can type a value or click the Select Date and Time icon.

  7. Click Save.

14.5.3 Editing Rows in a Data Object

You can edit rows in simple and derived data objects.

To edit a row in a data object:

  1. Go to the Administrator page.
  2. In the left navigation pane, click the arrow to the left of Data Objects.

    All data objects in the current project are displayed in a list.

  3. Click the data object name, or right-click the data object and select the Edit menu item.

    The data object opens in a new tab.

  4. Select the Data subtab.
  5. Select a row in the table.
  6. Click Edit Row.

    The row becomes editable.

  7. Edit the values in the cells.

    For a DATETIME column, you can type a value or click the Select Date and Time icon to choose a date and time.

  8. Click Save.

14.5.4 Purging Data in a Data Object

You can purge data in simple and derived data objects.

To perform periodic purges automatically, see Setting Data Retention in a Data Object.

To purge a data object:

  1. Go to the Administrator page.
  2. In the left navigation pane, click the arrow to the left of Data Objects.

    All data objects in the current project are displayed in a list.

  3. Click the data object name, or right-click the data object and select the Edit menu item.

    The data object opens in a new tab.

  4. Select the Data subtab.
  5. Click Purge.

    The Purge Data Object content dialog appears.

  6. Select Purge All or Purge Before.
  7. If you selected Purge Before, type a date and time or click the Select Date and Time icon to choose a date and time.
  8. Click Purge.

    A warning message appears, asking you to confirm the purge.

  9. Click Yes.

14.5.5 Exporting Data from a Data Object

You can export data from all data object types.

See Export for information on exporting data using BAMCommand.

To export data from a data object:

  1. Go to the Administrator page.
  2. In the left navigation pane, click the arrow to the left of Data Objects.

    All data objects in the current project are displayed in a list.

  3. Click the data object name, or right-click the data object and select the Edit menu item.

    The data object opens in a new tab.

  4. Select the Data subtab.
  5. If you don't want to export all the data, select the rows you want to export.
  6. Click one of the export options:
    • Export All Rows to CSV exports all the data to a .csv file.

      Note:

      You can customize the number for rows to be exported using the Preferences window. For more information, see Modifying Data Tab Preferences.
    • Export Selected Rows to CSV exports the selected rows to a .csv file.

    The file is created. If your computer has software installed that can open .csv files, the file is opened. If you see that there are errors with comma-separated values in the output, ensure that the cells are formatted as text cells so that the software doesn’t apply its own numeric formatting to it.

  7. Save the file.

14.5.6 Setting Data Retention in a Data Object

You can set data retention for simple and derived data objects.

To purge data manually, see Purging Data in a Data Object.

To set data retention for a data object:

  1. Go to the Administrator page.
  2. In the left navigation pane, click the arrow to the left of Data Objects.

    All data objects in the current project are displayed in a list.

  3. Click the data object name, or right-click the data object and select the Edit menu item.

    The data object opens in a new tab.

  4. Select the Retention subtab.
  5. Type the number of days to retain data in the Retention Days field.

    The default value of zero retains data indefinitely.

    Note: You can now change the data retention schedule in Oracle Enterprise Manager to any time you need using MBean properties. For more information, see Scheduling Automatic Data Purges for a Data Object.

  6. Click Save.

14.5.7 Scheduling Automatic Data Purges for a Data Object

You can schedule data purges for a data object using Oracle Fusion Middleware Enterprise Manager MBean properties.
To set an automatic data purge schedule that occurs everyday:
  1. Log in to the Oracle Fusion Middleware Enterprise Manager console.
  2. Click the domain button on the left-upper corner of the console.
  3. From the context menu, click the System MBean browser item.
  4. From the navigation tree, expand the oracle.beam.server node under the Application Defined MBeans node.
  5. Expand the Domain:[DomainName] node, then expand the Config node
  6. Click the BEAMServerConfig node.
  7. In the resulting table, find the DO Data Purge Time field and enter the desired time value in the HH24:mm:ss format.
  8. Click Apply.

14.5.8 Filtering Data in a Data Object

You can filter data only in logical data objects.

To filter data in a data object:

  1. Go to the Administrator page.
  2. In the left navigation pane, click the arrow to the left of Data Objects.

    All data objects in the current project are displayed in a list.

  3. Click the data object name, or right-click the data object and select the Edit menu item.

    The data object opens in a new tab.

  4. Select the Filter subtab.
  5. Add filters. All of the functionality available in query filters is provided. See Filtering Data for more information.
  6. Click Save.

14.5.9 Specifying Slow-Changing Dimensions for a Data Object

For a dimension table that changes infrequently, you can check the Slow Changing Dimension option to improve the performance of continuous queries.

You can set this option for simple and derived data objects.

To specify slow-changing dimensions:

  1. Go to the Administrator page.
  2. In the left navigation pane, click the arrow to the left of Data Objects.

    All data objects in the current project are displayed in a list.

  3. Click the data object name, or right-click the data object and select the Edit menu item.

    The data object opens in a new tab.

  4. Select the General subtab.
  5. Check the Slow Changing Dimension box.
  6. Click Save.

Note:

If a logical data object joins one data object with Slow Changing Dimension set and another without, and an alert is configured to fire when a row is inserted into the logical data object, make sure the row is inserted into the data object with Slow Changing Dimension set first, or the alert may not fire.

14.6 Using Data Object Folders

You can organize data objects in the left navigation pane by creating folders and subfolders for them. A folder is a Display Name convention for grouping data objects.

You can perform the following folder operations:

  • Create one or more folders by including one or more forward slashes (/) in the Display Name when creating or renaming a data object. Renaming means changing the Display Name. Text between slashes becomes names for folders and subfolders.

  • Create a new data object in an existing folder by including the folder in the Display Name.

  • Create a new data object in an existing folder by right-clicking the folder and selecting Create. The Display Name includes the folder by default.

  • Move data objects in and out of folders by renaming them, which means changing their Display Name values.

    You cannot rename a folder in one step. To rename a folder, edit the Display Name of each of the data objects in the folder.

  • Delete all data objects in a folder by right-clicking the folder and selecting Delete.

Folders have no other functions. For example, you can set user permissions only on individual data objects, not on folders.

14.7 Editing, Renaming, and Deleting Data Objects

This section outlines the different ways in which you can modify data objects.

You can edit, rename, and delete data objects just as you can any other Oracle BAM entity.

14.7.1 Editing a Data Object

Use the following procedure to open, edit, and save a data object. When you edit a data object, the changes propagate to all entities that use the data object.

To edit a data object:

  1. Go to the Administrator page.
  2. In the left navigation pane, click the arrow to the left of Data Objects.

    All data objects in the current project are displayed in a list.

  3. Click the data object name, or right-click the data object and select the Edit menu item.

    The data object opens in a new tab.

  4. Select the subtab of interest.
  5. Make any desired changes and click Save.
  6. Click the X on the data object tab to close it.

14.7.2 Renaming or Moving a Data Object

Renaming a data object changes the Display Name.

To rename or move a data object:

  1. Go to the Administrator page.
  2. In the left navigation pane, click the arrow to the left of Data Objects.

    All data objects in the current project are displayed in a list.

  3. Click the data object name, or right-click the data object and select the Edit menu item.

    The data object opens in a new tab.

  4. Select the General subtab.
  5. Edit the Display Name.

    The Display Name is case insensitive and may contain any characters except the forward slash (/), which indicates a folder path. It may have up to 128 characters. It can be changed at any time.

    To move a data object into a folder, include the folder name. See Using Data Object Folders.

  6. Click Save.
  7. Click the X on the data object tab to close it.

14.7.3 Deleting a Data Object

When deleting a data object, you must remove referrals to the data object from dashboards, alerts, and other BAM entities that use it.

Use the following procedure to delete a data object.

To delete a data object:

  1. Go to the Administrator page.
  2. In the left navigation pane, click the arrow to the left of Data Objects.

    All data objects are displayed in a list.

  3. Click the data object icon and click the Delete icon, or right-click the data object name and select the Delete menu item.

    A dialog asks you to confirm the data object deletion.

  4. Click OK.

    The data object disappears from the list.

14.8 Operators and Functions for Calculated Fields

This section provides syntax and examples for operators and functions you can use in calculations when creating calculated fields in a data object.

Note:

When you use an aggregation function such as an average in a calculated field, the first data point will be null, because the aggregation of no data is null.

The Sum function is only supported for the integer data type. For decimal or float data types, exact precision for values after the decimal is not guaranteed.

This section contains the following topics:

14.8.1 Operators

Table 14-1 describes the operators you can use to build calculated columns.

Table 14-1 Operators Used in Calculated Fields

Operator Function

+ (plus sign)

Add

- (minus sign)

Subtract

* (asterisk)

Multiply

/ (slash)

Divide

% (percent sign)

Modulus

( ) (parentheses)

Parentheses determine the order of operations

!= (exclamation point and equal sign)

Logical NOT

&& (double ampersand)

Logical AND

|| (double pipe)

Logical OR

For example

if ((CallbackClientTime == NULL) ||
(ReceiveInputTime == NULL)) then (-1) else
(CallbackClientTime-ReceiveInputTime)

== (double equal sign)

Equality

= (equal sign)

Assignment

Field names containing any special characters, such as the operators listed in Table 14-1, double quotation marks, or spaces, must be surrounded with curly braces {}. If field names contain only numbers, letters and underscores and begin with a letter or underscore they do not need curly braces. For example, if the field name is Sales, the correct way to enter this in a calculation is Sales. However, if the field name is Sales+Costs, the correct way to enter this in a calculation is {Sales+Costs}.

Double quotes must be escaped with another set of double quotes if used inside double quotes. For example, Length("""Hello World, "" I said").

14.8.2 Ago

Returns an aggregated value from the current time back to a specified time. The time unit can be YEAR, QUARTER, MONTH, DAY, or HOUR.

Oracle Structured Query Language (SQL) supports this function. Oracle Continuous Query Language (CQL) does not support this function.

Syntax:

AGO(expr,time_unit,offset)

Example:

AGO(SUM(SALES),YEAR,1)

14.8.3 Avg

Returns the average of all values for the given field. Avg can accept one field parameter of type Integer, Float, or Decimal.

Syntax:

Avg(Number)

Example:

Avg(Revenue)

14.8.4 Case

Creates a Case clause in a Switch statement. Switch can accept fields, expressions, and values of any type as parameters.

Syntax:

Switch(w)
  Case(x):(y)
  Default(z)

Example:

14.8.5 Ceiling

Returns the smallest integer greater than or equal to the specified value. Ceiling(2.9) returns 3 and Ceiling(-2.3) returns -2. Ceiling can accept one field parameter of type Integer, Float, or Decimal or a numeric value may be entered.

Syntax:

Ceiling(Number)

Examples:

Ceiling(Total)
Ceiling(3.7)

14.8.6 Concat

Concatenates several strings into one. Concat can accept multiple field parameters of type String, or string values may be entered.

Syntax:

Concat(String1,String2, ... ,StringN)

Example:

Concat("Hello ","World")

14.8.7 Count

Returns a count of all non-null values. Count can accept one field parameter of any type.

Syntax:

Count(Field)

Example:

Count(SaleComplete)

14.8.8 CountDistinct

Returns a count of distinct values in a field. CountDistinct can accept one field parameter of any type.

Syntax:

CountDistinct(Field)

Example:

CountDistinct(Salesperson)

14.8.9 DateAdd

Adds an offset to the field value. The first parameter for DateAdd must be a field of type DateTime, and the last seven parameters maybe a field of type Integer or an integer value. Zeros may be used where no offset is needed.

CQL does not support this function. This function does not add the milliseconds portion of a datetime value.

Syntax:

DateAdd(DateTime, Years, Months, Days, Hours, Minutes, Seconds, Milliseconds)

Example:

DateAdd({Last Modified}, 0, 0, 7, 0, 0, 0, 0)
//adds 7 days to the Last Modified value

DateAdd({Last Modified}, 0, 0, DaysToFollowup, 0, 0, 0, 0)
//adds DaysToFolowup number of days to the Last Modified value

14.8.10 DateDiff

Returns the amount of time between two dates or times. The time unit can be SQL_TSI_YEAR, SQL_TSI_QUARTER, SQL_TSI_MONTH, SQL_TSI_WEEK, SQL_TSI_DAY, SQL_TSI_HOUR, SQL_TSI_MINUTE, or SQL_TSI_SECOND.

CQL does not support this function.

Syntax:

DATEDIFF(time_unit,time1,time2)

Example:

DATEDIFF(SQL_TSI_DAY,Process Start Time,NOW())

14.8.11 DayName

Returns the day name for a date. DayName accepts one field parameter of type DateTime.

Note:

All return values are the length of the longest day name. Shorter names include trailing spaces. To remove these extra spaces, use the TrimEnd function.

Syntax:

DayName(DateTime)

Example:

DayName({Last Modified})

14.8.12 DayOfMonth

Returns the day of the month for a date, in the range 1 to 31. DayOfMonth accepts one field parameter of type DateTime.

Syntax:

DayOfMonth(DateTime)

Example:

DayOfMonth({Last Modified})

14.8.13 DayOfWeek

Returns the day of the week for a date, in the range 1 to 7. DayOfWeek accepts one field parameter of type DateTime.

Syntax:

DayOfWeek(DateTime)

Example:

DayOfWeek({Last Modified})

14.8.14 DayOfYear

Returns the day of the year for a date, in the range 1 to 366. DayOfYear accepts one field parameter of type DateTime.

Syntax:

DayOfYear(DateTime)

Example:

DayOfYear({Last Modified})

14.8.15 Default

Creates a Default clause in a Switch statement. Switch can accept fields, expressions, and values of any type as parameters.

Syntax:

Switch(w)
  Case(x):(y)
  Default(z)

Example:

14.8.16 Else

Specifies the third clause of an If-Then-Else statement. Else can accept fields, expressions, and values of any type as parameters.

Syntax:

If(x)
  Then(y)
  Else(z)

Example:

IF(Process Instance Status=="ACTIVE")
  THEN(DATEDIFF(SQL_TSI_DAY,Process Start Time,NOW()))
  ELSE(DATEDIFF(SQL_TSI_DAY,Process End Time,NOW()))

14.8.17 Floor

Returns the largest integer less than or equal to the value of the specified field. Floor(2.9) returns 2 and Floor(-2.3) returns -3. Floor can accept one field parameter of type Integer, Float, or Decimal or a numeric value may be entered.

Syntax:

Floor(Number)

Examples:

Floor(Sales)
Floor(46.75)

14.8.18 Hour

Returns the hour value in the range 0-23. Hour accepts one field parameter of type DateTime.

Syntax:

Hour(DateTime)

Example:

Hour({Last Modified})

14.8.19 If

Specifies the first clause of an If-Then-Else statement. If can accept fields, expressions, and values of any type as parameters.

Syntax:

If(x)
  Then(y)
  Else(z)

Example:

IF(Process Instance Status=="ACTIVE")
  THEN(DATEDIFF(SQL_TSI_DAY,Process Start Time,NOW()))
  ELSE(DATEDIFF(SQL_TSI_DAY,Process End Time,NOW()))

14.8.20 IfNull

Returns a specified value, y, if the test value, x, is null. IfNull accepts two parameters that can be fields of any type or values of any type. However, the two parameters must be of the same data type.

Syntax:

IfNull(x,y)

Example:

IfNull(Quantity, 0)

14.8.21 Length

Returns the length of the string. Length accepts one parameter that can be a field of type String, a string value in quotes, or an expression containing strings or fields of type String.

Syntax:

Length(String)

Example:

Length(Description)
Length("string")
Length(Concat(Description,"Description"))

14.8.22 Lower

Converts the string to lowercase letters. Lower accepts one parameter that can be a field of type String, a string value in quotes, or an expression containing strings or fields of type String.

Syntax:

Lower(String)

Example:

Lower(Description)
Lower("Description")
Lower(Concat(Description,"Description"))

14.8.23 Max

Returns the maximum value of the specified field or expression. Max accepts one field parameter of any type, or another valid expression.

Syntax:

Max(x)

Example:

Max(Quantity)
Max(Concat(Description," overstock"))

14.8.24 Median

Returns the median of all values for the given field. Median can accept one field parameter of type Integer, Float, or Decimal.

Syntax:

Median(Number)

Example:

Median(Revenue)

14.8.25 Min

Returns the minimum value of the specified field or expression. Min accepts one field parameter of any type, or another valid expression.

Syntax:

Min(x)

Example:

Min(Quantity)
Min(Concat(Description," overstock"))

14.8.26 Minute

Returns the minute value in the range 0-59. Minute accepts one field parameter of type DateTime.

Syntax:

Minute(DateTime)

Example:

Minute({Last Modified})

14.8.27 Month

Returns the month value for a date in the range 1-12. Month accepts one field parameter of type DateTime.

Syntax:

Month(DateTime)

Example:

Month({Last Modified})

14.8.28 MonthName

Returns the month name for a date. MonthName accepts one field parameter of type DateTime.

Syntax:

MonthName(DateTime)

Example:

MonthName({Last Modified})

14.8.29 Noop

Does nothing. Use in a control function when you want one alternative to do nothing.

Syntax:

NOOP(Param)

Example:

IF("Process Running Time (millisecs)"/3600000 > 48)
  THEN("Overdue")
  ELSE(NOOP(1))

14.8.30 Now

Returns the current date and time. Now does not accept any parameters.

Syntax:

Now()

Example:

DateAdd(Now(), 0, 0, 7, 0, 0, 0, 0)

14.8.31 PercentOfTotal

Returns the percent the value represents of the total values for the specified field. PercentOfTotal accepts one field parameter of type Integer, Float, or Decimal.

CQL does not support this function.

Syntax:

PercentOfTotal(Number)

Example:

PercentOfTotal(Quantity)

14.8.32 Quarter

Returns the quarter value in the range 1-4. Quarter accepts one field parameter of type DateTime.

Syntax:

Quarter(DateTime)

Example:

Quarter({Last Modified})

14.8.33 Rank

Returns the rank of a value in comparison to other values in the column. Values are not consecutive when ties occur. For example, if two values have a rank of 3, the next rank is 5.

CQL does not support this function.

Syntax:

RANK(column)

Example:

RANK(SALES)

14.8.34 Repeat

Repeats a string for the specified number of times. Repeat accepts two parameter, the first of which may be a string value or a field of type String, the second of which may be an integer value or a field of type Integer. Either parameter can use an expression that returns a string for the first parameter and an integer for the second value.

Syntax:

Repeat(String,Integer)

Example:

Repeat("string", 5)
Repeat(Description, 2)
Repeat(Description, Quantity)
Repeat(Concat(Description," overstock"),Quantity+2)

14.8.35 Replace

Returns a string, x, with all occurrences of the string, y, replaced by the string z. Replace accepts three field parameters of type String, or string values.

Syntax:

Replace(String,String,String)

Example:

Replace(Description, "ing", "tion")

14.8.36 Round

Rounds the specified value in the first parameter to the number of decimal places specified in the second parameter, rounding up if the number in the N+1 decimal place is 5 or greater, and rounding down otherwise. Round accepts two parameters that can be fields of type Integer, Float, or Decimal, or numeric values.

Syntax:

Round(Number,N)

Example:

Round(Sales,2)

In this example, if Sales value is 12.345, it is rounded to 12.35.

14.8.37 Second

Returns the second value in the range 0-59. Second accepts one field parameter of type DateTime.

Syntax:

Second(DateTime)

Example:

Second({Last Modified})

14.8.38 StdDev

Returns the standard deviation of the values in a column.

Syntax:

STDDEV(column))

Example:

STDDEV(PROCESS_OPEN_HOURS))

14.8.39 StdDevsFromMean

Returns the number of standard deviations from the mean for a particular value.

CQL does not support this function.

Syntax:

STDDEVSFROMMEAN(column))

Example:

STDDEVSFROMMEAN(PROCESS_OPEN_HOURS))

14.8.40 Substring

Returns a substring z characters long from string x, starting at position y. Substring requires three parameters, the first of which must be a string value, or a field of type String, and the second and third of which must be an integer or field of type Integer.

Syntax:

Substring("source_string", start_position, substring_length)

Example:

Substring("some string", 6, 3)
// returns "str"

14.8.41 Sum

Returns a summation of all values for the specified field. Sum accepts one field parameter of type Integer, Float, or Decimal.

Syntax:

Sum(Number)

Example:

Sum(Total)

14.8.42 Switch

Creates a Switch statement. Switch can accept fields, expressions, and values of any type as parameters.

Syntax:

Switch(w)
  Case(x):(y)
  Default(z)

Example:

14.8.43 Then

Specifies the second clause of an If-Then-Else statement. Then can accept fields, expressions, and values of any type as parameters.

Syntax:

If(x)
  Then(y)
  Else(z)

Example:

IF(Process Instance Status=="ACTIVE")
  THEN(DATEDIFF(SQL_TSI_DAY,Process Start Time,NOW()))
  ELSE(DATEDIFF(SQL_TSI_DAY,Process End Time,NOW()))

14.8.44 TrimEnd

Trims the whitespace characters (space, tab, carriage return, line feed, page feed, form feed, and so on) from the end of the string. TrimEnd accepts one field parameter of type String. You can also enter an expression that returns a string value.

Syntax:

TrimEnd(String)

Example:

TrimEnd(Description)
TrimEnd(Concat(Description,Subcategory))

14.8.45 TrimStart

Trims the whitespace characters (space, tab, carriage return, line feed, page feed, form feed, and so on) from the beginning of the string. TrimStart accepts one field parameter of type String. You can also enter an expression that returns a string value.

Syntax:

TrimStart(String)

Example:

TrimStart(Description)
TrimStart(Concat(Description,Subcategory))

14.8.46 Upper

Converts a string to uppercase letters. Upper accepts one parameter of type String. You can also enter an expression that returns a string value.

Syntax:

Upper(String)

Example:

Upper({License Plate Number})

14.8.47 Variance

Returns the variance of the values in a column.

Syntax:

VARIANCE(column))

Example:

VARIANCE(PROCESS_OPEN_HOURS))

14.8.48 VariancesFromMean

Returns the variance from the mean for a particular value.

CQL does not support this function.

Syntax:

VARIANCESFROMMEAN(column))

Example:

VARIANCESFROMMEAN(PROCESS_OPEN_HOURS))

14.8.49 Week

Returns the week for a DateTime value, in the range 0 to 53, because there might be the beginning of a week 53, where Sunday is the first day of the week. Week 1 is the first week with a Sunday in this year.

For example, in the year 2006, January 1st is a Sunday, so there is no week 0. The year starts with week 1 and continues to week 53. Week 53 of 2006 includes only one day, which is December 31st (also a Sunday). The Monday through Saturday following this (January 1-6 of 2007) are in week 0 of 2007.

Syntax:

Week(DateTime)

Example:

Week({Last Modified})

14.8.50 Year

Returns the year value in the range 1000-9999. Year accepts one parameter of type DateTime.

Syntax:

Year(DateTime)

Example:

Year({Last Modified})