Quantcast
Channel: SCN : Unanswered Discussions - Process Integration (PI) & SOA Middleware
Viewing all articles
Browse latest Browse all 6719

Re-write Custom Module PI7.0 to PI 7.1

$
0
0

Hi

I was looking a blog to force the Middleware to send a ACK when the client does not require it.

for example assume i have an async scenario and i need an ACK in the SXI_Monitor if the message could or could not be sent to the backend.

i found this blog 

scn.sap.com/community/pi-and-soa-middleware/blog/2012/03/05/acknowledgment-request-generated-by-adapters-of-adapter-engine-not-possible-not-any-more#comment-432619

 

but the problem in here is the code version. actually it apply for PI 7.0 and i need it for PI 7.1 i dont have much experiencie when developing custome module so i need your help.

does anyone could help me to migrate the code???

 

private ModuleData process_receiver(ModuleContext imc, ModuleData imd)

 

            throws ModuleException

 

      {

 

            try

 

            {

 

                  XIMessage aXIMessage = (XIMessage) imd.getPrincipalData();

 

                  amk = new AuditMessageKey(aXIMessage.getMessageId(),AuditDirection.INBOUND);

 

                  Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS, "Entry_INBOUND");

 

 

 

//******************what do those line used for?********************************

 

                 XMBMessage xmb = aXIMessage.getXMBMessage();

 

                  Message xmbm = (Message) xmb;

 

//**********************************************************************************

 

 

 

                  MessageStore ms = MessageStore.getInstance();

 

                  QueueMessage qm = ms.getQueueMessage(aXIMessage.getMessageKey());

 

 

 

                  if(qm != null)        

 

      ((XIMessage)qm.getTransportableMessage()).setAckRequestType(AckRequestType.SYSTEM);

 

 

 

            }

 

            catch(Exception ex)

 

            {

 

                  Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS, " Error Inbound: " + ex.getMessage());                             

 

            }

 

            return imd;

 

      }

 

 

Best Regards


Viewing all articles
Browse latest Browse all 6719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>