Monday 8 August 2016

Microsoft BizTalk 2013 Accelerator for HL7 -- Service cannot be started. System.Runtime.Remoting.RemotingException: .Config file '%Drive%:\XXXX\XXXX\Bin\AuditingLoggingService.config' cannot be read successfully due to exception 'System.IO.FileNotFoundException: The system cannot find the file specified.


Hi All,

While installing HL7 or while starting HL7 Logging Service this error may occur

When you check your event viewer you will find error saying

Service cannot be started. System.Runtime.Remoting.RemotingException: .Config file '%Drive%:\XXXX\XXXX\Bin\AuditingLoggingService.config' cannot be read successfully due to exception 'System.IO.FileNotFoundException: The system cannot find the file specified. 

it will look like below


Cause: The error is quite self explanatory. it is not able to find AuditingLoggingService.config file.

Solution:  Check if the file exists or not in your system. If exists but at different location then copy the file and paste at specified location.

If not exists :

Open notepad or notepad++ 

Just copy below text :

<configuration><system.runtime.remoting><application name="alserver"><service><wellknown mode="Singleton" type="Microsoft.Solutions.BTAHL7.AuditingLogging.EventBroker, Microsoft.Solutions.BTAHL7.AuditingLogging" objectUri="EventBroker" /></service><channels><channel ref="tcp" port="4000" rejectRemoteRequests="true"><serverProviders><provider ref="wsdl" /><formatter ref="binary" typeFilterLevel="Full" /></serverProviders></channel></channels></application></system.runtime.remoting><appSettings><add key="ConfigDb" value="Integrated Security=SSPI;database=BTAHL7;server=BTS2010DEV" /></appSettings></configuration>

And save it with name as AuditingLoggingService.config

Now copy this file and paste at the specified location and continue with the Insatallation.

Thanks Anshu Kumar


Tuesday 12 July 2016

Create Additional Node in Target Schema using XSLT in Biztalk Map


Hi All,

Before telling the requirement I would show you my source schema, Sample file and target schema so that you can easily understand the Scenario:

Source Schema:
In this Product node is Set max occur=Unbound

Sample Source File:

Target Schema:

In Target Schema Count max occur =Unbound.

Now my requirement is that I have to take the value of element Cost price from all repeated node from source and Add it and assign to Count in target schema and element name "CostPrice" should be assigned to CountName Attribute.

For Example Output would be like:


As you can see we have Cost price repeated three times in source file and values are 40,50,30 so addition will be 120. So we have assigned 120 to count and under attribute "countname" we assigned the name of element from where we received these values for this example that is "CostPrice".

The same thing we want to do with SellPrice, So my final output would look like:



Solution:

To achieve this target we would use Scripting functoid and under that we will select Inline XSLT Call Template.

The map will look like:




Under scripting Functoid we have selected Inline XSLT Call Tempelate like below.



Here is the XSLT code written Under the tempelate:

<xsl:template name="MyXsltConcatTemplate">
    <xsl:variable name="var:v2" select="sum(/s0:Products/Product/Prices/CostPrice)" />
    <xsl:variable name="var:v4" select="sum(/s0:Products/Product/Prices/SellPrice)" />
 <Counts>
        <Count>
          <xsl:attribute name="countname">CostPrice</xsl:attribute>
          <xsl:value-of select="$var:v2" />
        </Count>
        <Count>
          <xsl:attribute name="countname">SellPrice</xsl:attribute>
          <xsl:value-of select="$var:v4" />
        </Count>
      </Counts>
</xsl:template>


Thanks.

Anshu Kumar


Tuesday 28 June 2016

Remove or Supress optional empty elements from target schema in Biztalk map (STRING Data Type)

Dear All,

I have a situation where in my target schema there are some optional elements whose data types are string. That elements can have value or may not have value. It means that element min occcur=0 and max occur = 1.

It will look like Name Element below snap in Source Schema:

Or  We may get empty single space under that element in source Schema like below Snap:


Solution:

By Using two functoids we can achieve this target:

1. Greater Than Functoid under Logical Functoids

2.Value mapping Functoid Under Advance Functoid.

The map will look like like below Snap:


Here in this map Name is having null value so what we did we took Greater than Functoid and that have two input parameters. In first parameter linked Name element to it and in Second parameter given one empty Space like below Snap:


and then in value mapping functoid linked first input as greater than functoid and second input parameter as Name element like below snap:



Thanks.










Get max length of data for a column in Oracle


There is a situation where a column of varchar type max length is 50. what my requirement is to know the max and min length of the data stored in that column.

Here are the queries:

Max Length of data:

Select max(length(your_col_name)) as max_length From your_table_name;

Min Length of data:

Select min(length(your_col_name)) as max_length From your_table_name;