Promotion Reaction Job Definitions
When you promote Objects from one RunMyJobs instance to another, you sometimes need to make changes to those Objects and/or validate the Objects prior to importing them in the target instance. For example, you might need to change the Objects' assigned Partitions or update the default values for Parameters. Promotion reaction Job Definitions let you do this.
There are three types of promotion reaction processes:
- Pusher Job Definition: A Job Definition or Workflow Definition that gets called automatically when you promote Objects to a different RunMyJobs instance.
- Push Acceptor Job Definition: A Job Definition or Workflow Definition that gets called automatically when a different RunMyJobs instance promotes Objects to your RunMyJobs instance.
- Promote Further Pusher Job Definition: A Job Definition or Workflow Definition that gets called automatically when a different RunMyJobs instance promotes Objects to your RunMyJobs instance, and which then promotes those Objects "further" to a third RunMyJobs instance. (You can also think of this as "Promote CAR File Job Definition," because it lets you promote a CAR file rather than using an Export Rule Set to define which Objects are promoted.)
Do not call these Job Definitions manually. Rather:
-
Set the Job Definition or Workflow Definition's Reaction Process Type (in the Options tab) to Pusher, Push Acceptor, or Promote Further Pusher.
-
Select the Job Definition or Workflow Definition in the Remote System Object that you are using to promote Objects.
Once this is set up, your promotion reaction Jobs are called automatically whenever the Remote System Object is used to promote Objects.
Note: You can combine these approaches if necessary. In other words, you can use both a Pusher Job Definition and a Push Acceptor Job Definition, if your workflow would benefit from it.
Tip: You can set the run as user user for one of these Job Definitions with the /configuration/jcs/importing/runasuser
registry entry.
When looking up a Remote System, RunMyJobs checks:
-
The name of the Remote System Object.
-
The value of the SystemId registry entry.
The name of the Remote System Object must match one of the following values:
- The value of the registry entry
/configuration/export/originator ID
in the remote system. - The Originator ID of the remote RunMyJobs instance.
Note: if you set the LockDown registry entry (/configuration/import/LockDown
), any inbound promotion request must have a corresponding Source or Both remote system for it to be considered. If you do NOT set the LockDown registry entry, the name *
will match any remote RunMyJobs instance.
Note: A built-in push-acceptor-like Workflow Definition named System_Import_Archive_WithApproval is available. You can duplicate this Workflow Definition and set the reaction process to Push Acceptor.
Using a Pusher Job Definition
A Pusher Job Definition is an optional Job Definition or Workflow Definition that you create in the source RunMyJobs instance and then specify in that instance's source Remote System Object. You can use a Pusher Job Definition to (for example) execute a RedwoodScript script that makes changes to the Objects being exported, and then exports the Objects. If you use a Workflow Definition, you can add additional Steps, such as sending emails or raising Operator Messages.
Note that by default, a Pusher Job Definition will not actually push your Objects to the other RunMyJobs system. Consequently, a Pusher Job Definition must either be a System_Promote Job Definition, or be a Workflow ends in a System_Promote Job Definition.
The diagram below shows how to update exported Objects with a Pusher Job Definition. In this approach, the Objects are updated in the source RunMyJobs instance prior to promotion.
Using a Push Acceptor Job Definition
A Push Acceptor Job Definition is an optional Job Definition or Workflow Definition that you create in the destination RunMyJobs instance and specify in that instance with a destination Remote System Object. Here, you can use a RedwoodScript Job Definition to make adjustments to the promoted Objects prior to import. If you use a Workflow Definition, you can add additional Steps, such as sending emails or raising Operator Messages.
The diagram below shows how to update promoted Objects with a Push Acceptor Job Definition. In this approach, the exported Objects are updated on the destination RunMyJobs instance after promotion (but before the Objects are persisted to the RunMyJobs database).
In this diagram, the "Dev_RO" Object in the "Test" RunMyJobs instance effectively says, "Anything that comes from the Dev RunMyJobs instance should be run through Push Acceptor Job Definition A."
A Push Acceptor Job Definition can be attached to Source or Both type Remote System Objects.
Using a Promote Further Job Definition
In some cases, depending on your development workflow, you may want to push Objects from the Dev environment to the Test environment, and then push them further to the Prod environment. In such situations, you can use a Promote Further Process Definition to promote a recently promoted CAR file onward to another remote system.
For example, assume develop a Job Definition in the Dev environment, then promote it to the Test environment for testing. Once the Job Definition is approved, it is a best practice to promote it from the Dev environment rather than from the Test environment, to avoid accidentally promoting changes made in the Test environment. This is a good use case for a Promote Further Process Definition.
A Promote Further Process Definition is defined on a destination Remote System object.
Note that by default, a Promote Further Process Definition will not actually push your objects to the other RunMyJobs system. Consequently, a Promote Further Process Definition must either be a System_Promote_Further Process Definition, or be a Chain that ends in a System_Promote_Further Process Definition.
An example of how to use the System_Promote_Further Job Definition.
Examples
Pusher Job Definition
The following code demonstrates a simple Pusher Job Definition script.
{
JobDefinition jDefinition = jcsSession.getJobDefinitionByName("System_Promote");
Job job = jDefinition.prepare();
job.getJobParameterByName("exportRuleSetBusinessKey").setInValueString(exportRuleSetBusinessKey);
job.getJobParameterByName("remoteSystemBusinessKey").setInValueString(remoteSystemBusinessKey);
job.getJobParameterByName("sendToRemoteSystem").setInValueString(sendToRemoteSystem);
jcsSession.persist();
}
Push Acceptor Job Definition
To create an "allow everything" Push Acceptor Job Definition:
- Navigate to Configure > Automate > Workflows and locate System_Import_Archive_WithApproval.
- Right-click the Workflow Definition and choose Duplicate.
- In the New Workflow Definition pop-up window, specify an appropriate name.
- On the Options tab, select Push Acceptor from the Reaction Job Type dropdown list.
- Click Save & Close.
Promote Further Pusher Job Definition
The following code demonstrates a simple Promote Further Pusher Job Definitionscript.
{
JobDefinition jDefinition = jcsSession.getJobDefinitionByName("System_Promote_Further");
Job job = jDefinition.prepare();
job.getJobParameterByName("SourceObject").setInValueString(SourceObject);
job.getJobParameterByName("SourceObjectType").setInValueString(SourceObjectType);
job.getJobParameterByName("SourceObjectUniqueId").setInValueNumber(SourceObjectUniqueId);
job.getJobParameterByName("Address").setInValueString(Address);
job.getJobParameterByName("CARFile").setInValueString(CARFile);
job.getJobParameterByName("OriginalJobId").setInValueString(OriginalJobId);
if(Message != null)
{
job.getJobParameterByName("Message").setInValueString(Message);
}
else
{
job.getJobParameterByName("Message").setInValueString("Some default message.");
}
if(Data != null)
{
job.getJobParameterByName("Data").setInValueString(Data);
}
else
{
job.getJobParameterByName("Data").setInValueString("SomeFile");
}
jcsSession.persist();
}
SAP CTS+ (Change and Transport System Plus) Integration
Promotion reaction processes allow for Change Management System (CTS+) integration. For more information, see Integrating the Promotion Module into SAP CTS and Pusher Job Definition for SAP CTS+ Integration.