Redwood Documentation

Product Documentation

 

›RedwoodScript

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
← Controlling Queues with RedwoodScriptSubstitution Parameters →

Managing Applications with RedwoodScript

You can use RedwoodScript to manage applications. ApplicationObjects are objects that can have an application and the application can be retrieved by the getParentApplication() method. This differs from most other properties, because of the Parent part of the method name. This has been done, so that the method name matches the name of the method you use on application objects.

Example

You want to move all objects from the Global.App1 to the Global.App1.Part1.App2 application.

{
  Partition partition = jcsSession.getPartitionByName("Part1");
  Application oldApplication = jcsSession.getApplicationByName("App1");
  Application newApplication = jcsSession.getApplicationByName(partition, oldApplication, "App2");
  for (ApplicationObject o : oldApplication.getChildApplications())
  {
    o.setParentApplication(newApplication);
    jcsSession.persist();
  }
}


You want to force users to specify an application when ApplicationObjects (except Applications) are created. (Note that ApplicationObjects are objects which can have a parent application). This can be used as a trigger.

{
  Object o = jcsTriggerContext.getSchedulerEntity();
  if (o instanceof ApplicationObject && ((ApplicationObject) o).getParentApplication() == null && !( o instanceof Application))
  {
    throw new RuntimeException("Object " + jcsTriggerContext.getSchedulerEntity().getErrorNameEN() + " does not have an Application set. Please set an application!");
  }
}


Redwood Script

← Controlling Queues with RedwoodScriptSubstitution Parameters →
  • Example
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 |