Redwood Documentation

Product Documentation

 

›Chain Definitions

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
← StepsCreating Chain Definitions with Sequential Processes →

Chain Processes

A chain process in a chain definition is a call to a process definition. It may also have an optional

The attributes of the chain process itself are:

  • Process Definition - The name of the process definition or chain definition to be called.
  • Precondition - A condition that must be evaluated to true for the chain process to start, if it evaluates to false, then it is skipped. See precondition function for more information.
  • Parameter Mappings - Process definition parameters, can be filled or inherit parameters from the chain or chain processes from previous steps.
  • Scheduling Parameters - Parameters that specify if, how (on hold or not), when, and in which queue a process should be started.
  • Process Monitor Updates - Used to update one or more process monitor tasks.

If a process definition requires that parameters be specified, or has parameter values that must come from other chain processes, then parameter mappings must also be supplied under Input Parameters.

Parameter values can refer to other parameters in the chain definition, be set manually, or via an expression.

  • Reference - allows you to choose which chain definition or chain process parameter value to use for this parameter. The naming works in the following way: {chain definition name| step name:job number}:Parameter, for example,
    • ORA_DATALOAD:SID - the value of the chain definition level parameter SID of the current chain definition named ORA_DATALOAD.
    • DATALOAD:Job 3:SID - the value of the parameter SID of the 3rd job in the DATALOAD step.
  • Expression - the value of the parameter, can be a string, number, character, date time zone, or an expression in Redwood Expression Language.
note

When a job reaches status Error, Unknown, or Killed then Out values of parameters might not get set properly; this depends on the job, if it had time to set the Out parameters before it reached a final status then the parameter should be set.

Preconditions

Chain Processes have a single, optional precondition function. A chain process with no precondition always executes. A chain process with a precondition only executes if the precondition returns true. If the precondition returns false, then the chain process is skipped.

The default input format for expressions is a string, in preconditions are usually made of functions, function expressions must start with an equals sign (=).

The precondition is an expression in Redwood Expression Language.

note

Preconditions may be executed before the chain process is persisted, or, saved to the database. This can occur in chains when the step reaches status Console and is restarted; it has the effect that it is not possible to access itself or any other chain process in the same chain.

Raise and Wait Events

All conditions must be met for the process to raise or wait on the event.

Raise Event

FieldDescription
Event DefinitionEvent to raise.
Status To Raise OnProcess status at which to raise the event.
Error CodeError code that causes the event to be raised.
Raise CommentComment to leave on the event as it is raised.
When time windowTime window to use for raising the event.
isStatus of the time window for the event to be raised.
in time zoneTime zone to use for the time window.
When expressionExpression to use which, when evaluated to true, will raise the event if the process reached the given status the process.

Wait Event

FieldDescription
Event DefinitionEvent to attach to process.
Clears EventWhen this is checked, the process clears the event, optionally with clearer comment if specified. Default: will not clear the event.
Clearer CommentComment to leave on the event, as it is cleared by the process.
When time windowTime window to use for attaching the event to the process.
isStatus of the time window for the event to be attached to the process.
in time zoneTime zone to use for the time window.
When expressionExpression to use which, when evaluated to true, will attach the event to the process.

Scheduling Parameters

If a chain process in a chain definition requires scheduling parameters to be specified then these parameters must also be set. This window allows for setting chain process scheduling parameters.

The following scheduling parameters can be set:

  • HoldOnSubmit - expression for hold on submit. Can be true, false (the default), or boolean REL expression (=<expression>).
  • Submit Disabled - disable the submit of the chain process. Can be true, false (the default), or boolean REL expression.
  • Priority - number from 1 to 100, the higher the number, the higher the priority. Can hold a numeric REL expression which must return a number between 1 and 100.
  • Queue - name of the default queue. Can hold a String REL expression which returns the name (<partition>.<queue>) of a queue; the <partition> is options defaults to GLOBAL.
  • Time Window - time window for the start time of the chain process. Can hold a String REL expression which returns the name (<partition>.<timewindow>) of a queue; the <partition> is optional and defaults to GLOBAL.
  • Start time - start time of the chain process, if the time is in the past when the parent step is started, the chain process will run immediately, otherwise it will wait until the start time has been reached. Can hold a String REL expression which returns the time expression or the start time as a string. Can also hold a DateTimeZone REL expression which returns the start time of the process. See below for more information on time expressions.
  • Ignore Status - the final status of this chain process is ignored when evaluating the status of the step. For example, when a chain process with Ignore Status enabled reaches status Error and all other chain processes in this step reach status Completed, the step will be set to Completed.
  • Wait For Completion - wait for this chain process to reach a final status. If this is set to false, the step step will both ignore the status and not wait for this chain process to reach a final status.
note

For SAP chain processes, the queue defines which SAP instance it will run against; SAP chain processes require the Queue scheduling parameter or the SAP System parameter be set as there is no default queue for SAP chain processes.

Start Time Syntax

Chain process scheduling parameter Start time controls when the step starts.

The syntax is as follows:

  • HH:mm[:ss] - fixed start time (24 hour), date relative to the start time of the step, seconds optional; when seconds are not specified, the seconds at submit time are used.
  • +HH:mm[:ss] - innermost chain run start plus the specified amount of time, seconds optional.
  • <time_expression> - time expression applied to the start time of the step.
  • +<time_expression> - time expression applied to innermost chain run start.
  • yyyy/MM/dd HH:mm:ss,SSS i - <year>/<month>/<date> <hour>:<minute>:<second>,<millis> <Olsen name for time zone> (example 2021/12/24 15:45:59,123 Europe/Paris).
  • =<expression> - REL expression with all of the usual variables available in call scheduling parameters.
    • String REL expressions can return either the start time in the format [+]HH:mm:ss, +<time_expression>, and yyyy/MM/dd HH:mm:ss,SSS i.
    • DateTimeZone REL expressions should return an date, time, and time zone in the DateTimeZone format.

The step is the parent of the chain process on which the scheduling parameter is specified.

Time Expressions

The following time expressions are supported.

  • set <specifier> <value> - set <specifier> to <value>
  • add <value> <specifier> - add <value> to <specifier> (This may propagate)
  • subtract <value> <specifier> - subtract <value> from <specifier> (This may propagate)
  • truncate <specifier> - truncate at <specifier> (This will zero everything below <specifier>).
  • The days of the week start at 1 for Sunday.
  • The days of the year start at 1 for January 1st.

Supported Specifiers

  • add/subtract: second, minute, hour, day, week, month, year
  • truncate: second, minute, hour, day, month
  • set: second, minute, hour, day, day_of_week, day_of_year, week_of_month, month

Plurals with an additional 's' are accepted (eg. days, weeks, ...). The day is always the day of the month. English names are accepted for day of week (`day_of_week`) and month; for example set day_of_week Monday or set month January, three letter abbreviations are accepted as well.

Examples

  • add 1 minute
  • add 3 seconds
  • set hour 1
  • set day_of_week Mon
  • truncate day
  • subtract 2 days

Event Expression Example

  1. Attach an event to be raised by process 1 of the first step for status Error only if any of two events is raised.
  2. Choose "Definitions > Chains".
  3. Choose process 1 of the first step.
  4. Choose Raise Events, choose and select an event definition.
  5. Fill =Event.isEventRaised('Mypartition.MyEvent1') || Event.isEventRaised('Mypartition.MyEvent2') in the When expression field.
  6. Choose Save and Close to save the chain definition close the dialog.

See Also

  • Using Chain Definitions
  • Date Format

JobChain

← StepsCreating Chain Definitions with Sequential Processes →
  • Preconditions
  • Raise and Wait Events
    • Raise Event
    • Wait Event
  • Scheduling Parameters
  • Start Time Syntax
    • Time Expressions
    • Supported Specifiers
    • Examples
  • Event Expression 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 |