So far, till we arrived at Java Single stack of PI, we have the luxury of scheduling most of the house keeping jobs on ABAP stack. One of the most important of those jobs is automatic message restarting. Let's see how we can create our own Automatic Message Restart Job in PI (This blog is based on PI 7.3 EHP1, SP05).
To begin with, the default jobs that were provided on the AAE are
- Default Version Archive Job
- Default Delete Job
- Default Recover Job
Let's consider a message that got failed (deliberately though) in the receiver file adapter. The message Id is 'f1042b3f-b580-11e2-a376-000001ffb7ce'.
Now, it's time to create our own message restarting job. Go to Configuration and Monitoring Home -> Adapter Engine -> Background Job Processing Monitor -> Create Job . You will get the below screen.
In the Job Details tab, select the job type as Restart and fill the other attributes. The job name is given to be MyMsgRestartJob in this case. Move on to the Parameters tab.
In the drop down list, there are two options. Select MAX-RESTART and fill the parameter with the appropriate value.
Move on to the Rules tab.
Create a Rule Definition. This rule definition has various options. Few of them are Sender Component, Receiver Component, Interface, Interface Namespace etc. Based on the above combinations, you can create your own rule. This job restarts only those messages that are in NDLV state and that meet the rule created in this step.
Save and Activate the Job.
Now that our job is active, it will be executed in the next one hour (as per scheduled earlier). But, in order not to wait till the next run and at the same time to prove that the job works fine, we will execute the job manually by hitting the button Execute Now in the above image.
Execute the job and check the message log of the same message that we considered in the beginning.
Observe the time that we had executed our message restart job and the log version that shows that the "Message restart triggered by restart job: MyMsgRestartJob".
Go ahead and create your own jobs...