Redwood Documentation

Product Documentation

 

›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
← Processes with LocksRestart Behavior on the Process Status Tab →

Reaction Processes

Reaction processes are used to react to specific conditions in Redwood Server. Several types of reaction processes are supported:

  • Any - can be called from a process server as well as remote systems.
  • Check - can be called from a process server when a process server check fails.
  • Promote Further Pusher - is called when you promote a System_Import_Archive file to another remote system.
  • Push Acceptor - can be called when a CAR file is imported from its Source or Both remote system.
  • Pusher - can be called to push objects to remote systems.

Reaction process definitions can be of any definition type, allowing you to fix certain situations like a hanging MS SQL Server database or Windows Server. As soon as you select the reaction definition type, the process definition is populated with the required parameters, any unknown parameters might be removed in the process. When you create a reaction type process definition, ensure you start off by specifying the correct reaction type prior to creating parameters.

All reaction process types have the following set of parameters, additional reaction process-specific parameters are available:

  • Address - the address to use, for promotion reaction processes this will be URL of the remote system.
  • Data - free form expression.
  • Message - optional message.
  • Source Object - name of the source system that fired the reaction job.
  • Source Object Type - type of the source system that fired the reaction job.
  • Source Object UniqueId - UniqueId of the source system that fired the reaction job.

Procedure

Creating a Process Server Check Reaction Process

  1. Navigate to Definitions > Processes.
  2. Choose New Process Definition from the context-menu.
  3. Fill in the Name and the Source fields.
  4. On the Process Control tab, fill the Default Queue field; this is needed as the definition is submitted automatically.
  5. On the Options tab, select Check in the Reaction Process Type field.
  6. Choose Save and Close.
  7. Navigate to Environment > Process Servers.
  8. Choose Edit from the context menu of you platform agent process server.
  9. On the Checks tab, create a process server check, see Oracle database check for an example.
  10. Select your previously created definition in the Process Definition field; when this check fails, the process definition will be submitted automatically.
  11. Choose Save & Close.

Creating Promotion Reaction Processes

See the examples in the dedicated topic.

Examples

Reaction Process Type Any

A CMD script that handles some types of MS SQL database service outages.

net start MSSQLSERVER 2>&1|FIND "2182"
IF errorlevel 1 goto :already_started

echo "service was stopped, has been restarted"
sc query MSSQLSERVER
exit /b 0

:already_started
echo "service was already started, attempting to restart it"
net stop MSSQLSERVER 2>&1 |FIND "HELPMSG"
IF errorlevel 1 goto :start_sql

:failure
rem get state of service and exit, manual intervention required
sc query MSSQLSERVER
exit /b 1

:start_sql
net start MSSQLSERVER 2>&1 |FIND "HELPMSG"
IF errorlevel 1 exit /b 0
goto :failure

Reaction Definition Type Check

A simple CMD script that reboots MS Windows Servers

shutdown /r /f /c "Restarted by central process automation" /d u 254:254

Reaction Definition Type Push Acceptor

The following is a allow everything Push Acceptor RedwoodScript process definition.

{
  //do nothing, accept everything
}

Reaction Process Type Pusher

The following code illustrates a simple Pusher reaction job:

{
  JobDefinition jDefinition  = jcsSession.getJobDefinitionByName("System_Promote");
  Job process = jDefinition.prepare();
  process.getJobParameterByName("exportRuleSetBusinessKey").setInValueString(exportRuleSetBusinessKey);
  process.getJobParameterByName("remoteSystemBusinessKey").setInValueString(remoteSystemBusinessKey);
  process.getJobParameterByName("sendToRemoteSystem").setInValueString(sendToRemoteSystem);
  jcsSession.persist();
}

Reaction Process Type Promote Further Pusher

The following code illustrates a simple Promote Further Pusher reaction job:

{
  JobDefinition jDefinition  = jcsSession.getJobDefinitionByName("System_Promote_Further");
  Job process = jDefinition.prepare();
  process.getJobParameterByName("SourceObject").setInValueString(SourceObject);
  process.getJobParameterByName("SourceObjectType").setInValueString(SourceObjectType);
  process.getJobParameterByName("SourceObjectUniqueId").setInValueNumber(SourceObjectUniqueId);
  process.getJobParameterByName("Address").setInValueString(Address);
  process.getJobParameterByName("CARFile").setInValueString(CARFile);
  process.getJobParameterByName("OriginalJobId").setInValueString(OriginalJobId);

  if(Message != null)
  {
    process.getJobParameterByName("Message").setInValueString(Message);
  }
  else
  {
    process.getJobParameterByName("Message").setInValueString("Some default message.");
  }
  if(Data != null)
  {
    process.getJobParameterByName("Data").setInValueString(Data);
  }
  else
  {
    process.getJobParameterByName("Data").setInValueString("SomeFile");
  }
  jcsSession.persist();
}

See Also

  • Process Server Checks
  • Promotion Reaction Processes

JobChain JobDefinition ProcessDefinition ReactionJobDefinition ReactionProcessDefinition

← Processes with LocksRestart Behavior on the Process Status Tab →
  • Procedure
    • Creating a Process Server Check Reaction Process
    • Creating Promotion Reaction Processes
  • Examples
    • Reaction Process Type Any
    • Reaction Definition Type Check
    • Reaction Definition Type Push Acceptor
    • Reaction Process Type Pusher
    • Reaction Process Type Promote Further Pusher
  • 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 |