Promotion Reaction Process 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 Process Definitions let you do this.
There are three types of promotion reaction processes:
- Pusher Process Definition: A Process Definition or Chain Definition that gets called automatically when you promote objects to a different RunMyJobs instance.
- Push Acceptor Process Definition: A Process Definition or Chain Definition that gets called automatically when a different RunMyJobs instance promotes objects to your RunMyJobs instance.
- Promote Further Pusher Process Definition: A Process Definition or Chain 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 Process Definition," because it lets you promote a CAR file rather than using an Export Rule Set to define which objects are promoted.)
You do not call these Process Definitions manually. Rather, you do this:
-
Set the Process Definition or Chain Definition's Reaction Process Type (in the Options tab) to Pusher, Push Acceptor, or Promote Further Pusher.
-
Select the Process Definition or Chain Definition in the Remote System object that you are using to promote objects.
Once this is set up, your promotion reaction processes 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 Process Definition and a Push Acceptor Process Definition, if your workflow would benefit from it.
Tip: You can set the run as user user for one of these Process 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 Chain Definition named System_Import_Archive_WithApproval is available. You can duplicate this Chain Definition and set the reaction process to Push Acceptor.
Using a Pusher Process Definition
A Pusher Process Definition is an optional Process Definition or Chain 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 Process 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 Chain Definition, you can add additional Steps, such as sending emails or raising Operator Messages.
Note that by default, a Pusher Process Definition will not actually push your objects to the other RunMyJobs system. Consequently, a Pusher Process Definition must either be a System_Promote Process Definition, or be a Chain ends in a System_Promote Process Definition.
The diagram below shows how to update exported objects with a Pusher Process Definition. In this approach, the objects are updated in the source RunMyJobs instance prior to promotion.
Using a Push Acceptor Process Definition
A Push Acceptor Process Definition is an optional Process Definition or Chain 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 Process Definition to make adjustments to the promoted objects prior to import. If you use a Chain 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 Process 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 Process Definition A."
A Push Acceptor Process Definition can be attached to Source or Both type Remote System objects.
Using a Promote Further Process 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.
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 Process Definition.
Examples
Pusher Process Definition
The following code demonstrates a simple Pusher Process Definition script.
{
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();
}
Push Acceptor Process Definition
To create an "allow everything" Push Acceptor Process Definition:
- Navigate to Definitions > Chains and locate System_Import_Archive_WithApproval.
- Right-click the Process Definition and choose Duplicate.
- In the New Chain Definition pop-up window, specify an appropriate name.
- On the Options tab, select Push Acceptor from the Reaction Process dropdown list.
- Click Save & Close.
Promote Further Pusher Process Definition
The following code demonstrates a simple Promote Further Pusher Process Definitionscript.
{
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();
}
SAP CTS+ (Change and Transport System Plus) Integration
Promotion reaction processes allow for Change Management System (CTS+) integration. See Integrating the Promotion Module into SAP CTS and Pusher Process Definition for SAP CTS+ Integration for more details.