How to correlate on part of filename?

Home Page Forums BizTalk 2004 – BizTalk 2010 How to correlate on part of filename?

Viewing 1 reply thread
  • Author
    • #13552

      The Scenario i’m facing:

      Send a file G0001.TXT (using Passingthrough) and then get a response file either to be G0001.ACK or G0001.ERROR.

      The orchestration i set up is like this:
      Receive Gfile (activate)
      Send Gfile (initialize correlation)
      Listen (for response)
      | |
      Receive ACK Receive ERROR
      (Follow Correlation) (Follow correlation)
      | |
      Send ACK Send ERROR
      How can i set up the correlation properly? Since file extension is different.

      I tried just use the correlation to be FILE.ReceivedFileName, Files can be transmitted but got warnings like this:

      \”The FILE send adapter cannot open file C:\\TestLocation\\G0005.INT for writing.\”

    • #13553

      Thanks for your reply.

      I was wondering how to extract ACK filename since no expression shape is allowed before a Receive in Listen Shape. Apparently a cutome pipeline will do.

      Even though i’m on the halfway to achieve this, we decide to avoid the complexity to split the transaction into two parts. One interface just sent G file, and another to receive ACK/ERROR.

      For those also face the problem, here’s a really good article includes details about using custom pipleine to extract and change the context properties.

      • #13554

        One way you could do this would be to create a new custom context property on a property schema, and then correlate on that.

        What you would do then is have the orchestration write the name of the file (e.g. \”FILE001\”) as the value to this custom property when sending the message while initializing a correlation set built on that property.

        Then, I’d have a receive pipeline in the receive port bound to my receive shape that follows the correlation set. The pipeline would have a custom pipeline component that promoted my custom context property to the received message context by extracting the name of the file from the value in the FILE.ReceivedFileName property.

        Does that make sense?

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.