The Service Integration Framework (SIF) provides the "CleanTable" API, which allows for the deletion or truncation of the entire Base Object in the Operation Reference Store (ORS). In the following section, we will explore the process of accomplishing this task using a shell script
Sample Shell Script:
#!/bin/bash
###########################################################
# Author: Prasad J
# Date Created: 10/14/2021
#
# Purpose: - clean the BO table
###########################################################
# Cleane Bo Table - C_BO_PRTY
curl -m 60 --header "Content-Type: text/xml;charset=UTF-8" --header
"SOAPAction:urn:siperian.api/Soap/cleanTable" --data "@Bo_prty.xml"
--url http://hostname:8080/cmx/services/SifService
Modify the attributes according to your environment setup.@Bo_prty.xml file:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:urn="urn:siperian.api">
<soapenv:Header/>
<soapenv:Body>
<urn:cleanTable>
<!--Optional:-->
<urn:username>admin</urn:username>
<urn:password>
<urn:password>admin</urn:password>
<urn:encrypted>false</urn:encrypted>
</urn:password>
<!--Optional:-->
<urn:securityPayload/>
<!--Optional:-->
<urn:orsId>CMX_ORS</urn:orsId>
<!--Optional:-->
<urn:interactionId/>
<!--Optional:-->
<urn:asynchronousOptions>
<urn:isAsynchronous>false</urn:isAsynchronous>
<!--Optional:-->
<urn:jmsReplyTo/>
<!--Optional:-->
<urn:jmsCorrelationId>?</urn:jmsCorrelationId>
</urn:asynchronousOptions>
<urn:siperianObjectUid>BASE_OBJECT.C_BO_PRTY</urn:siperianObjectUid>
<!--Optional:-->
<urn:cleanStaging>false</urn:cleanStaging>
<!--Optional:-->
<urn:useTruncate>true</urn:useTruncate>
</urn:cleanTable>
</soapenv:Body>
</soapenv:Envelope>
cleanStaging:True - Removes the rows in the staging tables and the dependent tables
False - Retains the rows in the staging tables and the dependent tables
False - Retains the rows in the staging tables and the dependent tables
useTruncate:
True - Uses the TRUNCATE statement, which functions faster, to remove the records
False - Uses the DELETE statement, which functions slower, to remove the records
No comments:
Post a Comment