Redwood Documentation

Product Documentation

 

You are currently viewing the legacy RunMyJobs documentation site. This site will be taken down later this month.
All current and future RunMyJobs documentation, including versions 2023.3 and later, can be found here.
Please update your bookmarks. Use the version dropdown menu to select the documentation you need.

›Processes and Chains

RunMyJobsProcess and Chain Definitions

Process Definitions

  • Creating Process Definitions
  • Setting Chain Definition and Chain Definition Properties
  • Integrating Redwood Server with Web Services
  • Redwood Definition Types
  • Maintenance Process Definitions
  • Template Process Definitions
  • Top Level Process Definition
  • Submit Form Editor
  • Default System Process Definitions

Processes and Chains

  • Advanced Chain Diagram Quick Reference
  • Chain Diagram Quick Reference
  • Chain Runtime Viewer Quick Reference
  • Advanced Chain Definition Editor Quick Reference
  • Advanced Chain Runtime Viewer Quick Reference
  • Advanced Diagram Quick Reference
  • Parameter Validation using Constraints
  • Processes Waiting on Events
  • Setting the Scheduling Behavior on the Control Tab
  • Setting the Retention Period for Processes
  • Runtime Limits
  • Setting Process Definition Options
  • Defining Parameters
  • Constraint Definitions
  • Constraint Class
  • Raising Events
  • Processes with Locks
  • Reaction Processes
  • Restart Behavior on the Process Status Tab
  • Searching Files
  • Setting the Name and Editing the Process Definition Source
  • Customizing Processes with Specific Actions
  • Using Table Parameters
  • Automatically Deleting Old Processes and Chains
  • Editing Process Definitions Safely
  • Parameter Formats

Chain Definitions

  • Using Chain Definitions
  • Creating Chain Definitions
  • Steps
  • Chain Processes
  • Creating Chain Definitions with Sequential Processes
  • Creating Chain Definitions with Parameter Handling
  • Creating Chain Definitions with Parallel Chain Processes
  • Creating Chain Definitions with Chain Processes Dependencies
  • Creating Chain Definitions for Multiple SAP Systems
  • Precondition Functions

Restart Behavior

  • Controlling Global and Partition Restart Behavior
← Customizing Processes with Specific ActionsAutomatically Deleting Old Processes and Chains →

Using Table Parameters

Table parameters hold table data with rows and columns, much like a spreadsheet. Table parameters come in four types:

  • TableParameterType.Inline - Table parameters of type Inline hold a String value with an Inline: prefix followed by the XML data. Processing instructions <?...?> are optional, however, must be followed by newline characters before the <table> tag if specified.
  • TableParameterType.JobFile - Table parameters of type JobFile hold a String value with a prefix JobFile: followed by reference to a process file (<ID>:<file_name>) such as JobFile:1234:stdout.rtx which evaluates to the file stdout.rtx on process with ID 1234.
  • TableParameterType.RelativeFile - Table parameters of type RelativeFile hold a String value with a prefix RelativeFile: followed by a file specification of a relative process such as Relative:<step_name>, Job <process_ID>:<file_name>, for example RelativeFile:Initialization, Job 3:output.rtx
  • TableParameterType.Table - Table parameters of type Table hold a BusinessKey of a table (Table:<partition>.<table>), such as Table:MyPartition.MyTable.

Prerequisites

  • Table parameters are supported by the RedwoodScript process definition and certain Redwood Finance Automation-specific definition types

API

The TableParameterRuntime interface (Table parameters at Runtime) has getRTXReader() and getRTXWriter() methods that allow you to read and write Tables, respectively. Each column has a data type (String, DataeTimeZone, BigDecimal), the value of each row in a column must be convertible to the data type or the table will be considered invalid. See the com.redwood.scheduler.api.rtx package for classes and how to use them.

Sample RTX File

<?xml version="1.0" encoding="UTF-8"?>
<table xmlns="http://schema.redwood.com/report/rtx.xsd">
  <metadata>
    <columns>
      <column>
        <name>symbol</name>
        <string></string>
      </column>
      <column>
        <name>value</name>
        <number></number>
      </column>
      <column>
        <name>date</name>
        <date></date>
      </column>
    </columns>
  </metadata>
  <data>
    <r><k></k><v>APPL</v><v>156.41</v><v>2023/11/16</v></r>
    <r><k></k><v>SDY</v><v>93.14</v><v>2023/11/16</v></r>
    <r><k></k><v>INTC</v><v>40.80</v><v>2023/11/16</v></r>
    <r><k></k><v>BRKB</v><v>189.71</v><v>2023/11/16</v></r>
    <r><k></k><v>FB</v><v>170.60</v><v>2023/11/16</v></r>
    <r><k></k><v>GOOG</v><v>973.33</v><v>2023/11/16</v></r>
  </data>
</table>

Writing an RTX File

This technique uses a Table parameter named outParameter on the definition that is an Out parameter. The out value of the parameter will be set to a file reference ( JobFile:1234:stdout.rtx ). You use getRTXWriterInline() if you want to have the table data inline.

import java.math.BigDecimal;
import com.redwood.scheduler.api.date.DateTimeZone;
import com.redwood.scheduler.api.rtx.*;

{
  try (RTXWriter writer = outParameter.getRTXWriterToStandardOutput())
  {
    writer.addColumn(new RTXColumn("symbol", RTXType.String));
    writer.addColumn(new RTXColumn("value", RTXType.Number));
    writer.addColumn(new RTXColumn("date", RTXType.Date));
    writer.addColumn(new RTXColumn("date2", RTXType.String));

    DateTimeZone dtz = DateTimeZone.valueOf("2023/11/16 00:00:00,000 America/New_York");
    String date2 = dtz.toFormattedString("dd-MM-yyyy");

    writer.addRow(new Object [] { "AAPL", "156.41",  dtz, date2, });
    writer.addRow(new Object [] { "SDY",  "93.14" ,  dtz, date2, });
    writer.addRow(new Object [] { "INTC", "40.80" ,  dtz, date2, });
    writer.addRow(new Object [] { "BRKB", "189.71",  dtz, date2, });
    writer.addRow(new Object [] { "FB",   "170.60",  dtz, date2, });
    writer.addRow(new Object [] { "GOOG", "973.33",  dtz, date2, });
  }
}

See Also

  • Defining Parameters

Table Parameter JobParameter JobChainParameter JobDefinitionParameter ProcessDefinitionParameter

← Customizing Processes with Specific ActionsAutomatically Deleting Old Processes and Chains →
  • Prerequisites
  • API
  • Sample RTX File
  • Writing an RTX File
  • 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 |