community-content

Forum Replies Created

Viewing 15 posts - 2,206 through 2,220 (of 9,648 total)
  • Author
    Posts
  • in reply to: Evaluating on the amount of items returned in a message #23356

    Hi Daniel,

                 A really big thanks you!! I see the way now J

    If may ask one final thing please, I knock together what you mentioned.

     

    //Expression Shape (Get Record Count)

    nRecordCount = System.Convert.ToInt32(xpath(Input, “count(//*[local-name()=’Person’])”));

    nLoopCount =1;

     

    //Loop

    nLoopCount <= nRecordCount

     

    //Decide

    nLoopCount <= 30

    ////Expression Shape (Do Stuff)

    System.Diagnostics.EventLog.WriteEntry(“ExpressionTrre”,System.Convert.ToString(nLoopCount));

     

    ////Expression Shape

    nLoopCount = nLoopCount + 1;

     

    My first 30 records take this route and the others that the ELSE route.

    Now I think there is a problem with my counter in my loop, where would I reset this?

    Kind regards,

    Grant

    Hi ChrisG,

     

        I have a couple of suggestions for you to parse out this “special character” from your master file before you pass it through your custom pipeline:

    1) Create a C# Helper class that you call from your orchestration (before your custom pipeline) passing in your message stream to do the parsing.

    2) Or use XPath to replace any occurence of that special character in an Expression shape before hitting your custom pipeline.

     

        I hope you find this information useful.

     

        Daniel.

     

    in reply to: Remote Biztalk Administration #23353

    Hi,

     

       You might want to take a look at this tool, Biztalk Integration Monitoring: http://bizmontool.com/

        This might suit your needs.

        Regards,

     

       Daniel.

     

    in reply to: Evaluating on the amount of items returned in a message #23352

    Hi Grant,

     

       Have a look at the following link: http://blog.eliasen.dk/2006/11/05/LoopingAroundElementsOfAMessage.aspx

       You would follow the same pattern that the blog’s author details in Suggestion 1 with the loop and counters, etc.

        Inside your loop, you would assign the following statement to a String variable in an Expression shape: MyVar = MyVar + “<BACSBody>”+sbRemitMsg.ToString()+”</BACSBody>” every time you loop through. Then you would have a decide shape inside the loop to look for a counter of batch of 30 records: if it is 30 records then you will have an Expression shape where you will do RemitXmlDoc.LoadXml(strHeaderRemitMsg + MyVar + strTrailerRemitMsg); and ouptut this message to a Send Port (if you want), reset the counter and move along in the workflow.

        This scenario would work well if your message is not that large, assuming that’s the case, otherwise your orchestration will get a performance hit.

        Regards,

     

        Daniel.

     

    in reply to: Evaluating on the amount of items returned in a message #23351

    Hi Daniel,

                      I am using xPath to return  the count of the amount of records.

    Expression Sharp

    nRecordCount = System.Convert.ToInt32(xpath(Input, “count(//*[local-name()=’Person’])”)); //Say return 100

    ///This is the new part i wanted to do

    was if (nRecordCount ==< 30)

    {

    RemitXmlDoc.LoadXml(strHeaderRemitMsg+”<BACSBody>”+sbRemitMsg.ToString()+”</BACSBody>”+strTrailerRemitMsg);

    But the problem is I may have to repeat this as there could be a return of 300 or more:

    The part I do not understand is would I have to rewirte the adding of strHeaderRemitMsg+”<BACSBody>”+sbRemitMsg.ToString()+”</BACSBody>”+strTrailerRemitMsg

    if xPath?

    Kind Regards,

    Grant 

    } 

     

    in reply to: Evaluating on the amount of items returned in a message #23350

    Hi Grant,

     

        BizTalk uses XLANGs as its programming language in Orchestrations and underlying shapes, it’s derived from C# and is limited in its scope and syntax. For instance, the statement “Foreach” is not allowed.

     

        You can use XPath to achieve what you want in parsing and grouping the contents of your output message. Here’s a link on how to get started on XPath: http://www.w3schools.com/xpath/default.asp

        The following link is a sample from BizTalkGurus on using XPath in orchestrations (written for version 2004 but still applicable for 2006 R2):

    http://www.biztalkgurus.com/media/p/15516.aspx

        Here’s a link to another blog that you would find useful dealing with XPath: http://geekswithblogs.net/sthomas/archive/2004/10/25/13269.aspx

     

        I hope this is enough information to get you started… Let me know how you make out on this.

     

        Daniel.

     

    in reply to: Wcf-Sql adapter required #23349

    Thank you very much!

    I’ll check that.

    in reply to: Wcf-Sql adapter required #23348

    Generally you would install the WCF LOB ADAPTER PACK 2.0; the full version is downloadbale from MSDN, you will need a license for that, I believe.

    To use that you will also need to install the LOB ADAPTER SDK, details (and link) in the readme.

    Hoever, I do believe the standalone version you found is the same thing, as suggested by the taxt “This SQL adapter which is also a part of the BizTalk Adapter Pack 2.0″ on http://www.microsoft.com/downloads/details.aspx?FamilyID=CEB0BB34-F9D2-4D14-8BBE-0311D227B091&displaylang=en

    in reply to: Evaluating on the amount of items returned in a message #23347

    Hi All,

                is it possible to do a foreach statement within and expression shape:

     

    i.e.

    Foreach (BACSBody <= 30)

    {

    RemXmlDoc = new System.Xml.XmlDocument();

    RemitXmlDoc.LoadXml(strHeaderRemitMsg+”<BACSBody>”+sbRemitMsg.ToString()+”</BACSBody>”+strTrailerRemitMsg);

    }

    Or awa y do this?

    Kind Regards,

    Grant

    in reply to: Evaluating on the amount of items returned in a message #23345

    Hi Daniel,

                       thank you once again i will work on that solution.

    Thanks again for your time.

    Grant

    in reply to: every field in new column in CSV file #23344

    Hi,

     

       This sounds like there is an issue in how you defined the schema for your CSV file. Look into that to find the source of your problem.

     

    in reply to: Change BizTalk Message Body Part Attachment name #23343

    Hi,

     

        You should use the context property MIME.FileName in a Message Assignment shape like this:

    outmsg(MIME.FileName) = “order.csv”;

        Also, you may need to build a custom Send Pipeline and add a MIME/SMIME Encoder component in the Encode stage, and use this custom pipeline as the Send pipeline in the properties of your SMTP Send Port (in BizTalk Administration Console).

     

        I hope this information helps.

     

       Daniel.

     

    in reply to: Evaluating on the amount of items returned in a message #23339

    Hi Grant,

     

       If you can’t get the pipeline component to work, I would suggest that you use XPath and XQuery inside your orchestration to parse your BodyPart entity (to determine batch size) and construct your output message accordingly.

     

       Best,

     

       Daniel.

     

    in reply to: Evaluating on the amount of items returned in a message #23338

    Hi Daniel,

                     First of all thank you for your patients and help on this: I could spend more time to get the pipeline working but I am not sure if this will help in my issue:

     

    1.       I am constructing the message (InputMsg)

    2.       Expression for Header details

    TempRemitDoc = BACSRemittanceMsg;

     

    strHeaderRemitMsg = TempRemitDoc.OuterXml;

     

    strHeaderRemitMsg = strHeaderRemitMsg.Substring(0,strHeaderRemitMsg.IndexOf(“<BACSBody>”));

     

    strTrailerRemitMsg = TempRemitDoc.OuterXml;

     

    strTrailerRemitMsg = strTrailerRemitMsg.Substring(strTrailerRemitMsg.IndexOf(“<Trailor>”), strTrailerRemitMsg.Length – strTrailerRemitMsg.IndexOf(“<Trailor>”));

     

    3.       Expression for the BodyPart

    RemitXmlDoc = BACSRemittanceMsg;

     

    xmlRemitBodyNodeInit = RemitXmlDoc.SelectSingleNode(strRemitBodyNodeXPath);

     

    sbRemitMsg.Append(xmlRemitBodyNodeInit.InnerXml);

     

    4.       Expression to add it all up and assign it to a message

    RemitXmlDoc = new System.Xml.XmlDocument();

    RemitXmlDoc.LoadXml(strHeaderRemitMsg+”<BACSBody>”+sbRemitMsg.ToString()+”</BACSBody>”+strTrailerRemitMsg);

     

    Do you think the pipeline is still the best way forward?

     

    Kind Regards,

    Grant

    in reply to: Evaluating on the amount of items returned in a message #23337

    Have you tried placing your Flat File Disassembler after the batching component in the Disassemble stage or removing it entirely and see what happens? You can also try to troubleshoot that batching component by writing entries to a log file or Application Log in Event Viewer, just to make sure that the component is working as it should be…

     

    Regards,

     

    Daniel.

     

Viewing 15 posts - 2,206 through 2,220 (of 9,648 total)