SMP 3.0: Agentry Transaction Failure Handling
In this document I will show the basics of Agentry Transaction Failure Handling and how to enable it for SAP Work Manager 6.1 on SMP 3.0.
The Administration Cockpit on SMP 3.0 has settings for configuration of this, but these settings are unfortunately not implemented to take effect on SAP Work Manager 6.1 and surely also other SAP Agentry applications.
Due to the implementation not being upgraded to SMP 3.0, the Transaction Failure Handling will only work for development instances of Agentry, and only if it is configured the “old fashioned” way in the Agentry.ini file. But since this is not present for Agentry applications on SMP 3.0, the feature will not work here by standard.
Background for Agentry Transaction Failure Handling
When an update step in an Agentry transaction fails, the default behaviour of the Agentry client is to display the exception message received from the failing update step.
The only way to get past this step will be to correct the cause of the error, and in certain situations this may not be possible.
In this case some configuration (opening of posting periods) is missing on the backend, which may be fixed and after this a new transmit will successfully post the transaction.
In other cases the user may have entered invalid data into a transaction, and this may be corrected on the client if an Edit Transaction Screen is offered by the application.
In cases where no Edit Transaction Screen is offered or an existing transaction is somehow not editable, the user may be forced to delete larger chunks of data on the client or even resetting the client completely to be able to get past the failing transaction.
This is what Transaction Failure Handling is made for.
Effect of enabling Transaction Failure Handling
When Transaction Failure Handling is activated in Agentry, an error in an update step of an Agentry transaction will result in this behaviour on the client.
A popup with the error text will now display on the client.
After the message popup this popup will be displayed, with the following behaviour:
Continue: The Agentry client will delete the failing transaction, and the transmit sequence will continue.
Stop: The client will stop the transaction sequence, effectively resulting in same behaviour as no Transaction Failure Handling.
Personally I think the popup is kind of badly designed. Non-technical users may simply press Continue, without really reading the message text. In this case data will be lost, and the user may not really be aware of it.
But there are cases where this feature is really important to have to make sure, the user does not have data that gets stuck on his client, and where he may not continue.
Please note that Transaction Failure Handling is a global setting and will affect all failing transactions.
Configuration of TransactionFailurehandling of Agentry application in SMP 3.0
In Agentry prior to SMP 3.0, the Transaction Failure Handling was enabled via the Agentry.ini file.
This was done via the following lines:
On SMP 3.0 the Agentry.ini file no longer exist – at least for production instances.
There is now a configuration area in the App Specific Setting of an Agentry application.
For a production server the only way to configure Transaction Failure Handling is via the Management Cockpit.
Currently even some of the newest standard Agentry applications (eg SAP Work Manager 6.1 and 6.2) does
NOT use the SMP Management Cockpit configuration to determine if Transaction failure handling should be used. Below I will show how to enable it anyway. Hopefully SAP will, in the future releases, use above settings to determine this.
Workaround for enabling Transaction Failure Handling
The only workaround to enable Transaction Failure Handling, that I am aware of is by changing a standard class in the standard code of one of the core Agentry Java Classes. I originally posted the issue to SAP by the OSS incident system, and was given this workaround.
It requires access to the source code of the core Agentry Java code, and there is a special procedure for getting this from SAP. This is not generally available.
After importing the standard Agentry code to your Java IDE, in my case Eclipse, navigate to the package com.syclo.sap of the SAP-Common project.
In this package find the abstract Java class Steplet.java, and navigate to the implementation of method setErrorHandlingMethod.
The standard implementation of the SAP-Common archive.
It can be seen from the coding, that it indeed does inspect the Agentry.ini file for the configuration.
Since the file does not exist in production Agentry instances on SMP 3.0, it always sets the value false.
If you statically change the value to true, you can effectively enable the Transaction Failure Handling.
This implementation is of course a static implementation and will not respect the configuration made in the SMP Management Cockpit. At present I am unaware of how to get this value from the server.
After changing the code, you will need to export the SAP-Common project to a jar file, and reference this instead of the standard, which is named “SAPCommon-133461.jar”.