Friday, October 21, 2011

Polling using BizTalk WCF Oracle Adapter

Came across this scenario of polling an Oracle table from BizTalk Server 2010 using the WCF Oracle Adapter and a requirement of running a post poll statement which updates the table in one of my forum posts. Used the WCF Consume Adapter Service to do a small POC for this and following are a few steps that I followed.

  • Used the Consume Adapter Service Wizard to connect to the oracle DB using the oracleEBSBinding and create a Service inbound operation for a schema artifact Test table. This will create a set of Schemas and a binding file with a receive port

Fig.1 Consume Adapter Service
  • Next I created the receive port using the auto-generated binding file and then a send port to a file location with a filter to subscribe the messages which will published by the receive port. As shown in Fig.2, I have set the required polledDataAvailableStatement, pollingAction,pollingInput(FOR UPDATE), pollingInterval and postPollStatement(UPDATE) properties on the receive port. The pollingAction can be taken from the metadata of the auto-generated schema. Following is an example(have changed the schema name)
          <doc:action xmlns:doc="

Fig.2 WCF Custom Transport Properties for Receive Port
  • To test this I deployed the auto-generated schemas and started the send port and enabled the receive port. The results in the outbound folder as shown in Fig.3
Fig.3 Outbound Folder.
  • Note that the result of the polling input in this case is after applying the postPollStatement.

No comments:

Post a Comment