When using ccBPM (cross-component Business Process Management) in SAP Exchange Infrastructure or SAP Process Integration problems might occur with archiving of ccBPM messages or deletion of ccBPM message persistency. Typically these problems show only after a while when database tables grow and slow down the system. This article gives a short overview about ccBPM message deletion and describes some situations which can lead to problems with ccBPM message deletion or archiving.
When using ccBPM there are three different types of ccBPM runtime data or messages produced that need to be reorganized:
1. 1. PI Messages (including ccBPM copies in pipeline PE_ADAPTER)
2. 2. Process Instances (Work Items)
3. 3. ccBPM message proxies or ccBPM message persistency in Tables SWFRXI*
The following sections describe how to reorganize the relevant data.
Sometimes problems occur with PI Messages that cannot be deleted or archived because of their message and adapter status. To analyse this situation a special report RSXMB_SHOW_STATUS was provided with SAP Note 944727 - Status overview of XI messages. It checks the PI messages in the system regarding their message status and adapter status. As a result it gives an overview about how many messages can be archived or not and shows the number of messages per status.
The report might have a long runtime, so please make sure that SAP Note 1236724 - XI3.0/7.0x/7.1x: Termination of report RSXMB_SHOW_STATUS is implemented on your system and execute the report as a batch job.
The report shows the number of messages in different message statuses:
For messages in message status 003 (successful) it also includes the adapter status:
From ccBPM point of view messages with message status 029 or message status 003 combined with adapter status different from 000 or 006 typically cannot be reorganized and have to be analyzed in detail.
Usually the procedure described in SAP Note 1042379 - BPE-HT: Deleting messages that are no longer used helps in these cases. The note does not have to be implemented, it just describes the procedure to delete old messages and clean up the system from failed process instances. It is important that each step is executed one after another. When there are many ‘old’ process instances in status ‘STARTED’ or ‘ERROR’ in the system that shall not be restarted, maybe it is not applicable to logically delete the messages manually as described under section 1c) of the note. Then the mass cancellation feature in transaction SWIA introduced with SAP Note 1286336 - SWIA: New "Logically Delete" function for mass processing might be used.
It is important not to forget to archive or delete the process instances that are created when using ccBPM. If workitem archiving or deletion is not done regularly this leads to an increasing table size of SWWWIHEAD and other workflow tables like SWWCNTP0, SWPCMPCONT or SWWLOGHIST.
The procedure to archive or delete the workitems is described in SAP Note 836092 - Archiving/deleting work items in the XI .
During execution of a ccBPM scenario there is also additional data created for the ccBPM message persistence or also called ccBPM message proxies. These message proxies have to be deleted regularly. These message proxies and related process-specific data are stored in tables SWFRXICNT, SWFRXIHDR and SWFRXIPRC.
The two reports used for displaying respectively deleting entries from these tables are RSWF_XI_INSTANCES_SHOW and RSWF_XI_INSTANCES_DELETE, which are described in SAP Help Page "Deleting Process Data No Longer Required". RSWF_XI_INSTANCES_SHOW can be used to display and check the relevant data first. Here it is important to use also the deletion timestamp as selection criteria. Otherwise there are also messages shown for which the deletion timestamp is not set. Such messages show no value in the second column from the right. Message proxies with no deletion timestamp set cannot be deleted. In this case also the procedure of SAP Note 1042379 - BPE-HT: Deleting messages that are no longer used should be applied.
There are a few additional SAP Notes available for the report RSWF_XI_INSTANCES_DELETE, which correct program errors in this area. Please check if the following SAP Notes are already implemented on your system:
1421003 - BPE-RUN: Synchronous message proxies cannot be deleted
1157044 - BPE-RUN: All message proxies set as deletable
1147377 - BPE-RUN: Messages not picked up by reorganisation
There are also two SAP Notes that improve the performance of report RSWF_XI_INSTANCES_DELETE:
1163662 - BPE-RUN: Poor performance from RSWF_XI_INSTANCES_DELETE
1139941 - BPE_RUN: Bad performance of RSWF_XI_INSTANCES_DELETE
When there are many problematic XML Messages in the system, it is useful to search for the reason why they cannot be reorganized. Either the situation is caused by some programming errors, which are already corrected with the SAP Notes mentioned earlier in the blog or it can be also caused by process design errors.
This section shows some examples why the XML Messages stay in a not reorganizable status, the most common cases are these two:
There are messages with a green flag (‘Scheduled for outbound processing’) in column ‘Outbound Status’ in monitoring transaction SXI_MONITOR. These messages are in pipeline ‘CENTRAL’.
Report RSXMB_SHOW_STATUS shows messages with message status 003 and adapter status 001.
In SXI_MONITOR for such a message clicking on the PE or SA_COMM hotspot in column ‘Outbound’ leads to:
You can identify this problem also in CCMS Monitoring in transaction RZ20. Choose ‘CCMS Monitor Templates’ ->’Exchange Infrastructure’ or ‘Process Integration’-> ’<System>_xxx_Business Process Engine’ -> ‘Process Data’ -> ‘XML Messages’ -> ‘Unprocessed Messages’. You can find entries like the following:
Due to an open correlation the message was delivered to a process instance, but the process instance had no active receive step at this time that could receive the message. Nevertheless the Delivery Mode ‘Buffering Possible’ was defined for this process using transaction SWF_INB_CONF or by default. If the process instance, that the message was delivered to and buffered at, never reaches a matching receive step the message remains unprocessed.
Often using a global correlation can be the reason for the problem. Then the solution is to change the process definition in the Integration Repository so that the process is divided into a message reception part and a transformation/send part. Then the correlation can be defined local at a block that contains only the receive phase of the process. In that case the correlation is only valid during message reception. Time consuming transformation and send steps are executed outside the block when the correlation is not valid anymore.
SAP Note 1040354 - BPE-TS: Unprocessed Messages helps in these cases.
You can find these unprocessed messages via report RSWF_XI_UNPROCESSED_MSGS. This report is also available via a CCMS Monitor Template, see also SAP Note 1040354 above for details. The note includes also a reference to SAP Note 894906 - BPE-RUN: Finding unprocessed messages, which describes the features of report RSWF_XI_UNPROCESSED_MSGS. It is possible to resend the affected messages with the report.
If the messages shall not be reprocessed, it is possible to finalize these messages without processing them by using report RSWF_XI_UNUSED_MSGS. Please see SAP Note 894193 - BPE-RUN: find messages that are no longer used and delete for documentation of the report.
You can also change the Delivery Mode using transaction SWF_INB_CONF to ‘Without Buffering’ for the affected process. Then in case a message cannot be received directly by a process instance, the queue is set to status ‘SYSFAIL’ and all following messages for this process are waiting in the queue until the error is resolved and the queue is restarted afterwards.
Transaction SXI_MONITOR shows messages with message status 029 (Transfer to Process Engine, symbol is a grey arrow).
When executing the report RSXMB_SHOW_STATUS it shows messages with message status 029 in the system. These can be messages from process instances which did not end correctly, the process instances are in status ‘ERROR’ or ‘STARTED’. These process instances can be found using transaction SXMB_MONI_BPE and the different transactions available there (e.g. Process Selection).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
40 | |
25 | |
17 | |
14 | |
8 | |
7 | |
7 | |
7 | |
6 | |
6 |