locked
Biztalk Strange Behavior in Functoid RRS feed

  • Question

  • Hi Guys

    I have updated my functoid to return value 1 if boolean is true and 0 if false 

    this is the code i used 

     public string GetVatMark(string param1)
        {
            bool condition;
            string returnValue = "0";

            if (bool.TryParse(param1, out condition) && condition)
            {
                returnValue = "0";
            }
            return returnValue;
        }

    Updated the resource redeployed to the server, tested through SOAPUI all worked great.

    I stopped the application and started it again and it stopped working result being returned is just 1 no idea why?


    Regards Ismail

    Tuesday, September 20, 2016 2:06 PM

Answers

  • Hi,

    There you go..that seems to be the problem...BUT make sure that the test map produces an entry in the event log..if it does then

    Do the following:

    If It is your Dev Box:

    1) Delet The app from BizTalk Admin Console

    2) Deploy the app completely from the Visual Studio

    3) Configure the app and restart the Host Instances

    OR

    If you want to go by add/Modify Process

    1) Build the dll in Vuisual Studio

    2) Copy the dll into the folder wherr BizTalk application is created (Its generally C:/GeneratedByBizTalk/AppName)

    3) Go To admin Console >App>Resources>Select the required dll >Right Click>Modify>Refresh

    4) Now navigate to the app folder where you have just copied the dlll and select the dll

    5) You need select all the three options in the options tab and ClickOK.

    6) Go To C:>Windows>Microsof.Net>assembkly>GAC_MSIL and check if the latest dll is reflected in the GAC

    7) Restart the necessary Host Instances and test

    Regards


    Mandar Dharmadhikari


    Wednesday, September 21, 2016 9:06 AM
    Moderator

All replies

  • Hi ,

    Are you sure that nothing was changed other than app restart??

    Have tried Host Instance restart??

    Regards,


    Mandar Dharmadhikari

    Tuesday, September 20, 2016 2:09 PM
    Moderator
  • what about debug points to your functiod like
    System.Diagnostics.EventLog.WriteEntry("my_app", "GetVatMark: " + param1);
    Tuesday, September 20, 2016 2:30 PM
  • Are there multiple servers present in the Group?

    Was the assembly GAC'ed on all servers, if that is the case?


    Thanks Arindam

    Tuesday, September 20, 2016 2:30 PM
    Moderator
  • Yes, I am sure nothing has changed, I am baffled

    Regards Ismail

    Tuesday, September 20, 2016 2:30 PM
  • Hi,

    as arindam asked,

    do you have multi server environment???

    If yes, make sure the assemblies are GACed on both servers.

    Regards,


    Mandar Dharmadhikari

    Tuesday, September 20, 2016 2:35 PM
    Moderator
  • Is this inline c# or a Pipeline Component.

    Really, just to the Deploy again, noting every step. It will work, trust me.

    Tuesday, September 20, 2016 3:23 PM
    Moderator
  • WAIT!

    The code you posted will never return 1. Period. It will always return "0".


    My Technet Articles

    If you like this or another reply, vote it up!
    If you think this or another reply answers the original question, mark it or propose it as an answer.


    Mauricio Feijo
    www.mauriciofeijo.com

    Tuesday, September 20, 2016 3:45 PM
  • Hi,

    Most likely it is a deployment glitch, most of the cased in a muti server environment we sometimes miss to install the msi on any of the server instance : 

    1>Restart Host instances and check

    2>Check if the assembly of your map is present in GAC on the servers see below.

    C:\Windows\assembly

    If above 2 doesn't work redeploy.


    Regards Pushpendra Singh : Please mark the reply as answer or vote it up, as deemed fit.


    Tuesday, September 20, 2016 3:52 PM
  • Hi

    I have single server environment


    Regards Ismail

    Wednesday, September 21, 2016 5:37 AM
  • inline C#

    Regards Ismail

    Wednesday, September 21, 2016 5:37 AM
  • Hi,

    What you need to do is for time being, add some customlogging to the code just to check what is the issue.

    Add the logging and deploy the app again. Then it will give a foir idea what is going on.

    You can something like below.

    public string GetVatMark(string param1)
         {
             bool condition;
             string returnValue = "0";
    
             if (bool.TryParse(param1, out condition) && condition)
             {
                 returnValue = "0";
    System.Diagnostics.EventLog.WriteEntry("Inside the if condition","return value 0");
             }
    System.Diagnostics.EventLog.WriteEntry("FinalReturn Value is",returnValue);
             return returnValue;
    
         }

    That way it will let you know, if the latest dll is GACEd or not and also tell you about the execution of the map.

    Regards,

    Regards,

    Mandar Dharmadhikari


    Mandar Dharmadhikari

    Wednesday, September 21, 2016 6:09 AM
    Moderator
  • I cant find anything being written to the EventViewer so i can only assume that the latest has not being gac'd

    The current process i have used to update my resources is 

    stop the application

    i have tried add/modify resource

    Update the path to the updated .dll

    Restart application

    Restart Host.


    Regards Ismail

    Wednesday, September 21, 2016 8:56 AM
  • Hi

    Try to Remove the resource first from Resources. Right-click -> Remove.

    After that, try to add the new assembly back as a new resource and check all GAC options.

    Restart the Host Instance.


    Thanks Arindam


    Wednesday, September 21, 2016 8:59 AM
    Moderator
  • Hi,

    There you go..that seems to be the problem...BUT make sure that the test map produces an entry in the event log..if it does then

    Do the following:

    If It is your Dev Box:

    1) Delet The app from BizTalk Admin Console

    2) Deploy the app completely from the Visual Studio

    3) Configure the app and restart the Host Instances

    OR

    If you want to go by add/Modify Process

    1) Build the dll in Vuisual Studio

    2) Copy the dll into the folder wherr BizTalk application is created (Its generally C:/GeneratedByBizTalk/AppName)

    3) Go To admin Console >App>Resources>Select the required dll >Right Click>Modify>Refresh

    4) Now navigate to the app folder where you have just copied the dlll and select the dll

    5) You need select all the three options in the options tab and ClickOK.

    6) Go To C:>Windows>Microsof.Net>assembkly>GAC_MSIL and check if the latest dll is reflected in the GAC

    7) Restart the necessary Host Instances and test

    Regards


    Mandar Dharmadhikari


    Wednesday, September 21, 2016 9:06 AM
    Moderator