Redwood Documentation

Product Documentation

 

›Using Tables

RunMyJobsRedwoodScript Development

Developing Applications

  • Developing Applications

RedwoodScript

  • RedwoodScript
  • Scripting in the Shell
  • Mixing REL and RS Code in a Library
  • Controlling Process Servers with RedwoodScript
  • Controlling Queues with RedwoodScript
  • Managing Applications with RedwoodScript
  • Substitution Parameters
  • Date Formatting and Parsing
  • Impact of Modified Process Definitions or Chain Definitions on Processes and Chains
  • Using the RedwoodScript Definition Type
  • Using RedwoodScript in Processes
  • Using Eclipse to Create and Edit Process Definitions

Debugging Your Code

  • Changing Process Logging Levels

Triggering Custom Code

  • Triggering Custom Code
  • Using Triggers
  • Trigger and Action Examples
  • Using Actions
  • Executing Your Own Classes from a Library
  • Library Examples
  • Extending Redwood Server Functionality with Extension Points
  • Extending Edit Pages with ObjectPageExtensionPoint
  • Creating Extension Points
  • Extending Redwood Server Functionality with Extension Points

Using Tables

  • Using Tables to Store Frequently Used Values

PL/SQL API

  • Cronacle PL/SQL API Module
  • Creating the OracleJob Process Server
  • Using the OracleJob Definition Type
  • Packages
  • RS/JCS Views

Tuning Redwood Platform

  • Tuning Redwood Platform

Memory Tuning

  • Tuning Memory Usage and Garbage Collection

Reference

  • Using SQL to Query the Data Model
  • Embed Redwood Server Overviews into Extension Points with the Embed API
  • API Documentation
  • Script Date Formats
  • Datamodel
  • Redwood Expression Language Functions and Implicit Objects
  • RedwoodScript Scripting Contexts and Implicit Objects
← Extending Redwood Server Functionality with Extension PointsCronacle PL/SQL API Module →

Using Tables to Store Frequently Used Values

Tables are used to store data to be used in processes; for example, you could map customer ID numbers to end-user friendly customer names in tables and have your processes use this to present customer names instead of customer ID's to operators.

Also, many complex processes consist of processes that work with the same parameter values, for instance:

  • The name of an external system
  • The processing day (or business day) which may not be the same as today
  • The name of an SAP instance or client to use for a particular task

These values tend to be used by a large number of processes, and change rarely. They might change:

  • On a daily basis (for the business day)
  • Between the Development, Quality Assurance and Production environments (for external system names).

In some cases there may be a predefined set of values from which the user can choose:

  • A list of countries, provinces or cities
  • A list of departments or cost codes

In these cases it is also useful to be able to validate the value a user has entered to ensure it is correct, and to prompt them with a list of valid values. This means that validation can occur at process submission time, rather than at runtime.

  • Tables - Tables allow you to store frequently used values and have these form a list in the submit wizard.
  • Table definitions - Table definitions define tables, listing valid columns and data types.
note

Unlike most objects, you cannot create a Table in the object's overview page. Tables are created in the Table Definitions overview via the context-menu of the table definition you want to use for the table.

Importing Tables

When you import tables, you have the option to overwrite all values in the table or append only new rows to the table.

In-Memory Tables

You store table data in memory to speed up the retrieval of values. This option is useful for tables that have 1000 or more rows. Note that you should use the option with care, very large tables will use a lot of memory.

Tabs & Fields

The following table illustrates the fields of each tab of Credentials editor dialogs.

TabFieldDescription
TablePartitionThe Partition of the table.
TableNameThe name of the table can contain any combination of US ASCII letters, digits, and underscores; limited to 80 characters.
TableDescriptionA free text description of the table; can contain any combination of printable UTF-8 characters, limited to 255 characters.
TableApplicationThe Application of the table.
TableImport ModeWhen you re-import this table from a CAR file, you overwrite the table data (Import Table) or append rows defined in the CAR file (Import Rows)
TableIn MemoryTables that have In Memory checked will be cached in memory; this drastically improves the performance of value retrieval, however, in memory tables consume more memory. This feature should only be used for big tables, over 1000 rows.
TableDefinitionThe table definition of the table.
DocumentationDocumentationFree text field for documentation purposes.
Values

The table data, the number of columns and column type depend on the table definition.
Security

This is where you can specify who can access/change/remove the table.

Accessing Tables from REL

You access tables using the REL table functions.

Context-Menu

Tables and table definitions support the following context-menu actions:

ActionDescription
Edit SecurityEdit the security of the table or table definition
DuplicateMake a copy of the table or table definition to create a similar one
New TableCreate a new table from the current table definition
DeleteDelete the table or table definition
Export > ExportExport the table or table definition into a CAR file
Export > Export with related objectsExport the table or table definition into a CAR file including referenced objects
Promote > Promote to systemPromote the object to a remote system
Promote > Edit further then promoteEdit the export rule set prior to promoting
PromotePromote the table or table definition to another Redwood Server instance
EditEdit the table or table definition
Show permalinksShow links that can be used from third party applications to link to the object
Add to navigation barAdd the current object to the navigation bar
New table definitionCreate a new table definition
Filter > New FilterCreate a new table or table definition filter
Filter > Edit FilterEdit current table or table definition filter
Filter > DeleteDelete current table or table definition filter
Filter > Duplicate FilterCreate a copy of the filter
Filter > Export FilterExport the filter into a CAR file
Filter > Add to navigation barAdd the filter to a navigation bar
Filter > Create filter from searchCreate a filter from the current IntelliSearch query

Finding Tables and Table Definitions

You can search for tables and table definitions using filters and the Search Tables or Search Table Definitions box on the Tables or Table Definitions tabs, respectively. These boxes are known as the IntelliSearch boxes and located under your username on the top right-hand side of the user interface. Filters allow you to specify a list of objects with static criteria. IntelliSearch allows you to specify complex queries in a simple way using prefixes. Prefixes are used to specify which property you are searching in and have short as well as long syntaxes. For example, if you want to display all tables with the term users in the comment, you would use the search criteria as follows:

c:users

You can search more than one property, as follows:

c:users n:ORA

note

No spaces should be entered before or after the colon (: ).

See the Advanced Object Search for more information.

The following table illustrates the available prefixes for tables and table definitions:

PrefixesDescription
n, namesearches the name property
c, comm, commentsearches the documentation property
d, desc, descriptionsearches the description property
a, applicationsearches the application property
cb, changedbefore(internal) search for tables and table definitions that changed before a certain ISO-8601 period

Deleting Table Definitions and Tables

You can only delete table definitions and tables when no other objects relate to them. For example, if there are process definitions that use the table, the table cannot be deleted until all process definitions that use it have been modified. You can see process definitions that relate to the table in Related Objects in the lower detail pane and on the show page. You cannot delete table definitions if there is a table using it.

The table in related objects contains three columns:

  • Type - the type of object with a link to it
  • Related Object - the name of the object with a link to it
  • Used As - objects can sometimes be used in different roles

Security

PrivilegeDescription
TableDefinition.CreateCreate table definitions
TableDefinition.DeleteDelete table definitions
TableDefinition.EditEdit table definitions
TableDefinition.ViewAccess table definitions
Table.CreateCreate tables
Table.DeleteDelete tables
Table.EditEdit tables
Table.ViewAccess tables

You can grant privileges on two levels, Access and Admin; a privilege granted on Admin level allows the grantee to grant the privilege to other users. These privileges can be granted per partition or system-wide.

The Security tab allows you to specify which users can access, edit, and delete the table and table definition.

  • Granting and Revoking System Privileges
  • Granting or Revoking Object Privileges

Procedure

Create a table definition

  1. Navigate to "Scripting > Table Definitions".
  2. Choose New Table Definition from the context-menu and enter a name and application (optional).
  3. Choose the Columns tab, and fill in some columns, with data types and specify if the value is allowed to be null.
  4. Choose Save & Close.

Create a table

  1. Navigate to "Scripting > Table Definitions".
  2. Choose New Table from the context-menu of a table definition and enter a Name and Application (optional).
  3. Choose the Values tab, and fill in some columns, the column names must exist in the table definition you specified. The Key column is the field that should contain the data that you want to use.
  4. Choose Save & Close.

Use a table as a reference in a parameter for parameter values

  1. Navigate to "Definitions > Processes".
  2. Choose Edit from the context-menu of the process definition.
  3. Choose the Parameters tab and select the parameter you would like to use.
  4. In the Simple Constraint Type field choose table, enter the name of the table into the Simple Constraint Data field.
  5. Choose Save & Close.

Result

When you submit the process definition, records in the table are available as list-of-values in the parameter field of the process definition.

Example

The following code checks the System_Variables table for a system variable with key RW_DEMO, if it does not exist it will create it and assign a value to it, finally, it will print all entries in the table.

{
  Partition p = jcsSession.getPartitionByName("GLOBAL");
  Table t = jcsSession.getTableByName(p, "System_Variables");
  if (t.getTableValueBySearchKeySearchColumnName("RW_DEMO", "SystemValue") == null)
  {
    TableValue ctv = t.createTableValue();
    ctv.setKey("RW_DEMO");
    ctv.setColumnName("SystemValue");
    ctv.setColumnValue("SomeValue");
    jcsSession.persist();
  }
  t.getTableValues().forEach(item -> jcsOut.println(item.getKey() + " : " + item.getColumnName()+" > " + item.getColumnValue()));
}

See Also

  • RedwoodScript

table TableDefinition

← Extending Redwood Server Functionality with Extension PointsCronacle PL/SQL API Module →
  • Importing Tables
  • In-Memory Tables
    • Tabs & Fields
  • Accessing Tables from REL
  • Context-Menu
  • Finding Tables and Table Definitions
  • Deleting Table Definitions and Tables
    • Security
  • Procedure
  • Result
  • Example
  • See Also
Docs
Getting StartedInstallationFinance InstallationConcepts
TroubleshootingArchiving
Learn and Connect
Support Portal
BlogEventsResources
ISO/ IEC 27001 Information Security Management
Automate to be human

2023 All Rights Reserved |

Terms of Service | Policies | Cookies | Glossary | Third-party Software | Contact | Copyright | Impressum |