Redwood Documentation

Product Documentation

 

›Promoting Objects

RunMyJobsAutomation Concepts

Automation Concepts

  • Central Scheduling Concepts
  • Automating Processes Across the System Landscape
  • Processes, Chains, and History
  • Queues and Process Servers
  • Workload
  • SAP Systems
  • Events and Event Definitions
  • Scheduling
  • Applications
  • Editing Objects in XML

Locks and Events

  • Prevent Simultaneous Execution of Processes
  • Creating Locks
  • Creating Event-Driven Schedules with Events

Documents

  • Documenting Code, Procedures, and Messages with Documents

Applications

  • Organizing Processes in Applications
  • Creating Applications

End User Overviews

  • End User Interfaces
  • Process Monitors Overview
  • Process Monitors Overview Columns
  • User Message Monitor
  • Designing User Message Forms
  • User Message Monitor Columns
  • Interacting with User Messages
  • Feeds

Managing Output Formats

  • Managing Output Formats

Regular Activities

  • Regular Activities for Redwood Server

Promoting Objects

  • Migrating Objects with the Promotion Module
  • Exporting Redwood Server Objects
  • Export Rule Sets
  • Creating Export Rule Sets
  • Importing Objects
  • Importing Redwood Server Objects with Imports
  • Using Import Rule Sets to Customize Imports
  • Importing Objects with Import Rule Sets
  • Creating Remote Systems
  • Promotion Reaction Processes
  • Integrating Redwood Server Promotion into SAP CTS+
  • Pusher Process Definitions for SAP CTS+ Integration

Backup and Recovery

  • Backup and Recovery of Redwood Server
  • Database Backup
  • Restore Data from Backup

Reference

  • Managing Output Formats
← Importing Redwood Server Objects with ImportsImporting Objects with Import Rule Sets →

Using Import Rule Sets to Customize Imports

You use import rule sets to customize your imports. Import rule sets allow you to organize the flow of processes between Development, Test (Quality Assurance) and Production systems. You can adapt default values of parameters, for example, to the target system. Import rule set actions allow you to further customize the objects during the import process with RedwoodScript.

When you import an object, except for tables (see below), the object is overwritten with the object in the CAR archive.

note

The Promotion Module requires the Module.ImportExport license key.

Tabs & Fields

The following sections cover the tabs in the Import Rule Set editor screen.

Import Rule Set

FieldDescription
PartitionThe partition of the import rule set.
NameThe name must start with a letter and contain only US ASCII letters, numbers, and underscores (_). Limited to 80 characters.
ApplicationThe application of the import rule set. Applications are used to group different objects for easy migration.
DescriptionFree text description; you can use any printable UTF-8 characters; note that depending on the platform/browser, some characters of the symbol and other Unicode tables will not be displayable. Limited to 255 characters.
Variable PrefixThe variable prefix is used when you import the special System_Values table. New rows that were added during the import will be prefixed by the value of this property. This field accepts free text, any printable UTF-8 character combination.

Partition Renames

FieldDescription
Old PartitionAll objects that were in a partition named like this will be moved to the New Partition in the current system
New PartitionThe new partition for all objects that resided in the Old Partition in the old system.

This will not take care of partitions specified in Redwood Expression Language (REL) expressions. You use the $ to specify the partition of the process definition or chain definition in REL; it will be replaced with the partition of the process definition or chain definition on which it is specified. You keep objects in the same partition as the process definition or chain definition, and promote these objects along with those that reference them. See REL Functions and Contexts for more information.

Import Rules

Import rule sets can hold one or more import rules. When you create an import, you may specify an import rule set according to which Parameters, like INSTANCE, CLIENT, or USERNAME for SAP process definitions, can be adjusted to the new system with overrides.

FieldDescription
NameThe name of the rule must start with a letter, can only contain US ASCII letters, numbers, and underscores (_); limited to 80 characters.
DescriptionThe description of the rule, will be used as the name of the rule when set. Free-form text, any printable UTF-8 character combination is allowed; note that depending on the platform/browser, some characters of the symbol and other Unicode tables will not be displayable. Limited to 255 characters.
DocumentationA comment about the rule. Free-form text, any printable UTF-8 character combination is allowed; note that depending on the platform/browser, some characters of the symbol and other Unicode tables will not be displayable. Limited to 255 characters. Limited to 1000 characters.
Object TypeRules can be created for either process definitions (JobDefinition) or chain processes (JobChainCall) and allow you to change parameters or scheduling parameters.
MatchingThis field groups the match criteria for a process definition/chain process and process/scheduling parameter.
Matching > NameThe name to match, you can use GLOB wildcards (*, ?). Empty means all process definitions or chain process will match.
Matching > Script Run-as-userThe Run As User to match for the process definition.
Matching > ParameterUsed to match zero or more parameters.
Matching > Parameter > Mapping ExpressionUsed with chain process only, it is the parameter mapping that the parameter has in the chain definition.
Matching > Parameter > Default ExpressionUsed with process definitions, this is used to differentiate parameters with the same name but different default values.
Matching > Hold On SubmitThe Hold on Submit value to match.
Matching > QueueThe queue value to match.
Matching > PriorityThe priority to match.
ReplacesThis field groups the new values of the previously matched items.
Ignore FailureWhen the new value is invalid, by default, the import will fail. You can override this with the Ignore Failure for specific changes.
Replaces > Script Run-as-userThe new Run As User for the process definition/chain process.
Replaces > ParameterThe new value(s) of the parameters.
Replaces > Hold On SubmitThe new value for the Hold on Submit scheduling parameter.
Replaces > QueueThe new default queue of the process definition/chain process.
Replaces > PriorityThe new priority of the process definition/chain process.

Import Action Parameters

FieldDescription
NameThe name of the parameter must start with a letter, contain only US ASCII letters, numbers, and underscores. Limited to 80 characters.
DescriptionThe description of the parameter can contain free-form text, any printable UTF-8 character combination is allowed; note that depending on the platform/browser, some characters of the symbol and other Unicode tables will not be displayable. Limited to 255 characters.
DocumentationA comment about the parameter. Free-form text, any printable UTF-8 character combination is allowed; note that depending on the platform/browser, some characters of the symbol and other Unicode tables will not be displayable. Limited to 255 characters. Limited to 1000 characters.
Default ValueFree text default value that will be used when the parameter has not been set elsewhere; can contain any printable UTF-8 character combination. Limited to 1000 characters.
OptionalWhen this checkbox is checked, then the value of the parameter is allowed to be empty. Note that the parameter in question will be initialized with a null value in the import action; when this checkbox is checked, null checks need to be in place in the import action.

Import Actions

Import rule sets support pre-import and post-import actions; the pre-import action is executed before the CAR file is scanned for contents, the post-import action is executed after the CAR is scanned immediately before the objects are committed to the database. The ImportActionScriptObject.getObjects() method is empty during execution of the pre-import action.

FieldDescription
NamePre Import - executed prior to the import, a DataContainer Map is available for storing information for the actual import
Tost Import - actual import, has access to DataContainer and UnresolvedObjects Maps (the latter provided you specify //@pragma:Unresolved on the first line of your script source).
Post Import - action that allows you to perform post import operations, such as submit a process to clean up or prepare the environment.
LibraryThe library to add to your classpath; this allows you to call code from the library in your import action source.
SourceYou fill your code into this field.

Using Import Actions

Actions on import rule sets allow you to specify RedwoodScript code to be executed against the imported objects after Redwood Server has imported the objects, resolving all references in the process (default), and before the objects are written to the database. The code is specified on the Actions tab and optionally makes use of the classes that you have stored in a library.

The following table lists predefined objects that you use in your source code:

ObjectClassExample Code
jcsSessioncom.redwood.scheduler.api.model.SchedulerSessionjcsSession.getQueueByName("PRD_QUEUE");
jcsImportRuleSetcom.redwood.scheduler.api.scripting.variables.ImportActionScriptObjectfor (Object o : jcsImportRuleSet.getObjects()) {...} Iterator i = unresolved.values().iterator(); //Map is <Long, ImportActionUnresolvedObject>
jcsOutLogcom.redwood.scheduler.infrastructure.logging.api.LoggerjcsOutLog.warn("This does not look good!");
jcsErrLogcom.redwood.scheduler.infrastructure.logging.api.LoggerjcsErrLog.fatal("Cannot determine the application of imported object.");
note

You should not persist the session in import rule set actions as this is done for you at a later stage.

Modifying Objects

Import rule sets have built-in functions to modify objects.

  • You use Partition Renames to change the partition.
  • You use Import Rules to change parameters on process definitions or chain processes.
  • You use the Variable Prefix for tables you import; this prefix allows you to flag newly created table rows for inspection.

You use the ImportActionScriptObject.getObjects() call to retrieve a List of objects that are to be imported.

Resolving Objects

When you import objects that reference other objects that do not exist in the CAR file nor in the target system, you must replace these references with valid references to objects in the target system. Since the import action is executed after references have been resolved you specify //@pragma:Unresolved (case-sensitive) on the first line of your code. When you set this comment, you can call ImportActionScriptObject.getUnresolvedObjects() to retrieve a map over all unresolved objects. These need to be replaced with valid references, see Importing Objects with Import Rule Sets for a specific example.

Note that if you fail to replace all invalid references, the import process will fail; the strerr.log file will contain the number of invalid references. To get a list of all invalid references, run the import processes without ImportRuleSet.

Importing Tables

The import will fail when you import existing tables that differ in contents, except for the special System_Values table. This special table, when imported, will append additional rows that are found in the CAR archive to the existing table, modified rows will, however not be modified during the import.

Import Rule Set Parameters

Import rule sets accept parameters that can be set in the following manners:

  • In the The properties of the import rule set (ImportRuleSetProperties) parameter of System_Import_Archive.
  • Embedded in the CAR file in META-INF/ImportRuleSet-parameters.properties.
  • On the command line using the api-tool.jar.

The parameters can be retrieved in the import rule set action using the jcsImportRuleSet.getProperty(<name>) method, where <name> is the name of the property of which you want to retrieve the value.

Embedded Import Rule Sets

Import rule sets can be embedded in CAR files, this allows you to specify any import rules, such as partition renames, directly in the CAR file.

The import rule set must be named ImportRuleSet.xml and reside in the META-INF/ directory in the CAR file, alongside the export-info.xml file.

Partition Renaming in Embedded Import Rule Sets

Import rule sets embedded in CAR files can specify a partition variable that can be set in the import rule set action using the ${TargetPartition} variable; a default value can be specified using the ${TargetPartition}:<default_value> syntax. If no default value is specified in the export rule set, the parameter is mandatory and must be set on the command line, for example.

The following excerpt of an import rule set specifies a partition rename with default value; when no TragetPartition variable is set for the import rule set, all objects will be imported into the DEFAULT_PARTITION partition.

<ImportRuleSetPartitionRename>
  <ProcessOrder>0</ProcessOrder>
  <OldPartition>GLOBAL</OldPartition>
  <NewPartition>${TargetPartition:DEFAULT_PARTITION}</NewPartition>
</ImportRuleSetPartitionRename>

Context-Menu

Import rule sets support the following context-menu actions:

ActionDescription
Submit Import JobSubmits an import process with the current import rule set
Edit SecurityEdit the security of the import rule set
DuplicateMake a copy of the import rule set to create a similar one
DeleteDelete the import rule set
Export > ExportExport the import rule set into a CAR file
Export > Export with related objectsExport the import rule set 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 import rule set to another Redwood Server instance
EditEdit the import rule set
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 import rule setCreate a new import rule set
Filter > New FilterCreate a new import rule set filter
Filter > Edit FilterEdit current import rule set filter
Filter > DeleteDelete current import rule set 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 Import Rule Sets

You can search for import rule sets using filters and the Search Import Rule Sets box, known as the IntelliSearch box, 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 import rule sets with the term dev in the comment, you would use the search criteria as follows:

c:dev

You can search more than one property, as follows:

c:dev 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 import and export rule sets:

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 import rule sets that changed before a certain ISO-8601 period

Security

PrivilegeDescription
ImportRuleSet.CreateCreate import rule sets
ImportRuleSet.DeleteDelete import rule sets
ImportRuleSet.EditEdit import rule sets
ImportRuleSet.ViewAccess import rule sets

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.

note

The Promotion Module requires the Module.ImportExport license key

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

See Also

  • Importing Objects with Import Rule Sets
  • Importing Objects
  • Importing Redwood Server Objects with Imports
  • Migrating Objects with the Promotion Module
  • Privileges Required to use ImportRuleDefinition
  • Privileges Required to use ImportRuleSets
  • Privileges Required to use ImportSources
  • Export Rule Sets
  • Creating Export Rule Sets
  • Exporting Redwood Server Objects
  • Promoting Objects with Remote Systems

ImportRuleSet import rule set

← Importing Redwood Server Objects with ImportsImporting Objects with Import Rule Sets →
  • Tabs & Fields
    • Import Rule Set
    • Partition Renames
    • Import Rules
    • Import Action Parameters
    • Import Actions
  • Using Import Actions
    • Modifying Objects
    • Resolving Objects
  • Importing Tables
  • Import Rule Set Parameters
  • Embedded Import Rule Sets
    • Partition Renaming in Embedded Import Rule Sets
  • Context-Menu
  • Finding Import Rule Sets
  • Security
  • 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 |