No more Records to process - Oracle Adapter (Full Version)

All Forums >> [BizTalk Utilities] >> BizTalk 2004/2006 Utilities and Adapters



Message


shamir.ali -> No more Records to process - Oracle Adapter (8 January 2007)

Hi,

I have a situation where there are no more data to be processed from a table, how could i handle this situation since when i try to find a field value from that data (which is not there) by
 
strDecidingFactor = SQLResponseMsg(PropertySchema.EXAMSTATUSID);
 
here name is a string variable and gets the value from a tables field called ExamStatusId which i have promoted. now in the orchestration when it comes into this expression it hangs and does nothing. I have made an XML file before this situation for both NO records to process and for some records to process.
 
XML file for no records to process:
<?xml version="1.0" encoding="utf-8" ?>
- <ReceiveResponse xmlns="http://Receive/SendQRad">
- <Operation1>
- <RadPacsSendQueue>
  <Select />
  </RadPacsSendQueue>
  </Operation1>
  </ReceiveResponse>
 
-------------------------------------------------------------------------
   XML file when there are some records in the database for processing:
 <?xml version="1.0" encoding="utf-8" ?>
- <ReceiveResponse xmlns="http://Receive/SendQRad">
- <Operation1>
- <RadPacsSendQueue>
- <Select>
- <Record>
  <URN>45</URN>
  <TABLENAME>EXAMREPORT</TABLENAME>
  <PATIENTMPI>675390</PATIENTMPI>
  <PATIENTUNITNUMBER>074-18-91</PATIENTUNITNUMBER>
VISITID>RV000369</VISITID>
  <VISITLOCATION>RAD</VISITLOCATION>
  <<EXAMSTATUSID>D</EXAMSTATUSID>
  <REPORTID>89</REPORTID>
  <RADIOLOGISTID>IMRA</RADIOLOGISTID>
  < </Record>
  </Select>
  </RadPacsSendQueue>
  </Operation1>
  </ReceiveResponse>




Pieter -> RE: No more Records to process - Oracle Adapter (9 January 2007)

First use a Decision shape using the XPath method to check for the existence of the field. If it is null, then do not access the value.




shamir.ali -> RE: No more Records to process - Oracle Adapter (9 January 2007)

Thanks Pieter,
Now the problem is that i am not playing with an XML document therefore cant just use XPath as such.
When i use this propertyschema which is null it returns an XLANG's exception, can i just catch this exception inside the expression editor or do something so that the instance does not terminate after throwing an unhandled exception.

------------------------------------------------------
Uncaught exception terminated service Receive.Orchestration_1(f9cf1c03-bceb-8514-4136-f7fa9986d11c), instance fea07569-3612-41eb-ad65-9255ba16f229

There is no value associated with the property 'Receive.PropertySchema.EXAMSTATUSID' in the message.
      
Exception type: MissingPropertyException
Source: Microsoft.XLANGs.BizTalk.Engine
Target Site: System.Object GetPropertyValueThrows(System.Type)




Pieter -> RE: No more Records to process - Oracle Adapter (10 January 2007)

Unless you are using some special binary handling in your orch, the document will always be xml.

You can catch the exception and simply set the value to a default.

The other alternative would be to use a .NET Component that does the retrievasl for you. If ythe value is null, you can simply return a default from the .NET Component.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.046875