Assert Functoid is not working

Hi,

I am using assert functoid as follows:

My requirement is as follows:

if the division of input values is greater then 1 then I will get my output and when divison of input values is less then 1 then my message should be suspended and I will get exception message as  written in assert functoid 2nd parameter as follows:


I am applying this map on send port and make a filter of receive port name .But every time I am getting output file in send location and no message is suspended.While in biztalk mapper after testing the map , I am getting the error .

Why it is occuring ?

Any kind of help would be apprec

June 20th, 2015 9:58am

Because you are using the PassThru receive pipeline so message type is not getting promoted as a result the map is unable to determine the message type so it is not getting execute to make it work you either need to use the XMLReceive pipeline or need to create your own pipeline component to promote it.
Free Windows Admin Tool Kit Click here and download it now
June 20th, 2015 10:15am

Hi Rachit,

I already  used the XmlReceive Pipeline.

I am saying that for valid input file where the divison is greater then 1 , I am getting my desire output but for invalid input file where the divison is less then 1, I am not getting any error.

If my input is as follows:

<ns0:In xmlns:ns0="http://Schema.AssertFunctoidInput">
  <Value1>100</Value1>
  <Value2>20</Value2>
  <ProcessNumber>1234</ProcessNumber>
</ns0:In>

then my output is as follows:

<?xml version="1.0" encoding="utf-16" ?> - <ns0:Out xmlns:ns0="http://Schema.AssertFunctoidOutput">   <Answer>5</Answer>   </ns0:Out>

when my input is as follows:

<ns0:In xmlns:ns0="http://Schema.AssertFunctoidInput">
  <Value1>100</Value1>
  <Value2>120</Value2>
  <ProcessNumber>1234</ProcessNumber>
</ns0:In>

my output is as follows:

  <?xml version="1.0" encoding="utf-16" ?> - <ns0:Out xmlns:ns0="http://Schema.AssertFunctoidOutput">   <Answer>0.833333333333333</Answer>   </ns0:Out>

So my question is that why I am getting o/p in 2nd scenarion.

I think I should get error in 2nd scenario becoz I used assert functoid.

 
June 20th, 2015 10:29am

The Assert functoid only fires in development builds or when the Generate Debugging Information property in the project build settings is set to True. When your BizTalk Server application is compiled for deployment and the Generate Debugging Information property is set to False (the default), assertions are ignored.

Rachit

Free Windows Admin Tool Kit Click here and download it now
June 20th, 2015 10:41am

Hi Prakash,

you can use  scripting functiod instead like below to test the condition .

public string methodcheck(string value)
{
  if (value == "1")
     return value;
   else
     return "false";
}

For your issues there is already a earlier MSDN post for it .

Custom message in Scripting Functoid

https://social.msdn.microsoft.com/Forums/en-US/af8b5c9b-5ce3-4459-83eb-7ec2ec3c2f61/custom-message-in-scripting-functoid

Thanks

Abhishek

June 20th, 2015 11:40pm

Hi Prakash,

you can use  scripting functiod instead like below to test the condition .

public string methodcheck(string value)
{
  if (value == "1")
     return value;
   else
     return "false";
}

For your issues there is already a earlier MSDN post for it .

Custom message in Scripting Functoid

https://social.msdn.microsoft.com/Forums/en-US/af8b5c9b-5ce3-4459-83eb-7ec2ec3c2f61/custom-message-in-scripting-functoid

Thanks

Abhishek

Free Windows Admin Tool Kit Click here and download it now
June 21st, 2015 3:32am

Hi Prakash,

you can use  scripting functiod instead like below to test the condition .

public string methodcheck(string value)
{
  if (value == "1")
     return value;
   else
     return "false";
}

For your issues there is already a earlier MSDN post for it .

Custom message in Scripting Functoid

https://social.msdn.microsoft.com/Forums/en-US/af8b5c9b-5ce3-4459-83eb-7ec2ec3c2f61/custom-message-in-scripting-functoid

Thanks

Abhishek

June 21st, 2015 3:32am

Hi Prakash,

you can use  scripting functiod instead like below to test the condition .

public string methodcheck(string value)
{
  if (value == "1")
     return value;
   else
     return "false";
}

For your issues there is already a earlier MSDN post for it .

Custom message in Scripting Functoid

https://social.msdn.microsoft.com/Forums/en-US/af8b5c9b-5ce3-4459-83eb-7ec2ec3c2f61/custom-message-in-scripting-functoid

Thanks

Abhishek

Free Windows Admin Tool Kit Click here and download it now
June 21st, 2015 3:32am

Hi Rachit,

I am unable to find this property Generate Debugging Information .Could you please tell me how can I get this ?

It would be better if you post a screenshot here.

Thanks in advance.

July 4th, 2015 2:30am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics