Biztalk Message Promotions - biztalk

I'm relatively new to Biztalk and I'm having a bit of hassle with this:
I have built a simple orchestration, hooked it up correctly to a receive port, I'm using the correct schema and map and the orchestration seems to be subscribing ok.
However, when the file I want to process gets picked up at the port I'm getting the 'could not be routed because no subscribers were found' error.
I ran a HAT query and can see the orch has an active subsription to the correct thing, is there anything else I can check on this?

Is your port hooked directly to the orchestration or is the orchestration picking the message up from the message box? Has the orchestration receive been set to Activate?
What does your subscription filter look like for the orchestration?

As a futher test:
a) create a sendport (FILE)
b) add a filter to it; BTS.ReceivePortName =
c) grab the resulting file - it should be the XML thats produced by your Custom PL
d) Use this file with a receive location using an XML Receive PL and see how your orchestration reacts to
This will at least rule out a Pipeline issue...
HTH

Check your pipeline is XMLReceive. This will promote the MessageType property and hopefully your orchestration will subscribe successfully.

Find the failed message in HAT and look at the body of the message. Copy it out and then run validate it against the schema of the message you are expecting. If it doesn't validate then you have set your flat file disassembler up incorrectly.

Related

BizTalk - WMI script to publish the message to message Box

I am trying to publish a message to BizTalk message box using a WMI script . Basically, I am reading the message from non resumable instance. I need to publish this message back to message box instead of saving as file.
Is there a way to achieve this?
Actually, MQ would probably work for you. What you can do is 'encode' the properties and write them to the MSMQ Label property for example.
Then, you can use a custom Pipeline Component on the Receive Location that 'decodes' the MQ property and re-writes the message context properties.
I've done similar in the past and it works just fine.

Executing BizTalk Flat file disassembler pipeline inside orchestration

I am not new to BizTalk however this situation is somewhat new. I have below situation in an BizTalk Orchestration,
I get path of flat file from some other source.
I want to load this file in orchestration and disassemble it by executing pipeline.
I searched a lot but almost every one talks about feeding a XML document in pipeline inside orchestration.
I got below links too but I couldn't get the working solution so far,
Calling FlatFile pipeline inside orchestration
4 Different ways to process an XLANGMessage
When I implemented solution given at above links, I get error "No Disassemble stage components can recognize the data."
I also don't want to create dynamic receive locations because of performance constrains.
Below is my code so far,
Load file content in a stream
Create a CustomBTXMessage instance as suggested in link two.
Load stream as below
customBTXMessage = new CustomBTXMessage("MyMessageName",
Service.RootService.XlangStore.OwningContext);
customBTXMessage.AddPart(string.Empty, "Body");
customBTXMessage[0].LoadFrom(ms);
return customBTXMessage.GetMessageWrapperForUserCode();
I think this situation is not something new in BizTalk world. Any one who has done this must be able to help me quickly.
Here's what I would do...or at least try first.
Create a Receive Port and Receive Location for each Flat File type you get.
Get the list of files.
In the Orchestration, Move the file to the appropriate Receive Location.
Flat File Disassembler the file in Port Pipeline like normal.
Receive the File into the Orchestration with an Ordered Delivery Port bound to the Receive Port from Step 1.
Loop on Receiving the files, checking for BTS.LastInterchagneMessage.
When True, Exit that Loop and go back to step 3.

No output (send part) on BizTalk pipeline

I have built a flatfile schema with the flatfile schema wizard.
The schema is valid and I could successfully validate my test instance against the schema.(So the XML file was created correctly).
But when I put my test flat file into a receive location that uses a flatfile disassembler pipeline, nothing happens after the receive location has picked up the message (the logical receive port is bounded to an orchestration)
In the BizTalk Admin Console I only see in the tracked message events from the pipeline that the message has been received. But not sent.
Maybe some of you already had a similar issue and could help me here.
Tracked message events in the pipeline
So. The issue was a wrong declared header schema. I have rebuild it and after that it was working fine.
I have recognized the issue by removing the header schema from the pipeline properties and trigger a new process. At this time the message was created correctly (but with the header line due to a missing header schema that would prevent that line).
Thanks to all who helped here!

Promoting fields in HL7v2 Schemas for use in Correlation Sets

Say I were to create a promoted property on an HL7 v2 schema. I want to use this promoted property in order to correlate two messages in a parallel convoy. I did a dummy application without using HL7 schemas and all worked just as expected. To sum up what I did, see this tutorial.
It's actually quite simple, which is why I'm wondering there is a catch when it comes to the HL7 schemas.
I created the PropertySchema, Promoted the field I'm after in the HL7 body schema, everything compiled and deployed fine, I ran a query for the subscriptions on my receive ports and they look OK
http://schemas.microsoft.com/BizTalk/2003/system-properties.ReceivePortID == {D2F99A76-E28A-4B3E-AC52-F4E2F92453C3}
And
http://schemas.microsoft.com/BizTalk/2003/system-properties.MessageType == http://microsoft.com/HealthCare/HL7/2X#ORU_ALL_25_GLO_DEF
And
https://myNS.ECGCorrelationPropertySchema.CommonAccessionID Exists
However, I get a
The published message could not be routed because no subscribers were found. This error occurs if the subscribing orchestration or send port has not been enlisted, or if some of the message properties necessary for subscription evaluation have not been promoted.
and looking in the Biztalk Group admin console, when I view the suspended messages, I don't see that the property has been promoted
Edit to add message context
Error Report Context
I have checked and double-checked, the schemas are there, there are duplicate schemas the Event log even shows A message was received of type http://microsoft.com/HealthCare/HL7/2X#ORU_ALL_25_GLO_DEF when I receive a message.
So now, I guess I have 2 questions:
If the promotions were happening successfully, would they show in the Message --> Context dialog (they did in my non-HL7 dummy app)
If they aren't supposed to show, is there a setting/property/anything somewhere I missed that is unique to using HL7v2 schemas?
Short answers:
1. Yes, provided this message came directly from the Receive Pipeline
2. No, once emitted from the disassembler, there is nothing special about an HL7 Message.
Make sure you're looking at the actual Suspended Message and not the Error Report. The best way to check this is to Stop, don't Unenlist, the Orchestration. The Message will then suspend Resumable.

What could cause a message (from a polling receive location) to be ignored by subscribing orchestration?

I'll try provide as much information as possible:
No error message.
The instance stays in the "ready service instances".
The receive location has the same parameters (except URI, the three polling queries, user account/pw and receive pipeline) as another receive location that points to another database/table which works.
The pipeline is waiting for the correct schema.
The port surface and receive location are both waiting for the correct schema.
In my test example, there are only 10 lines being returned.
The message, which contains those 10 lines, validates against the schema.
I tried to let the instance alone to no avail - 30+ minutes - and no change in its condition.
I had also tried suspending and then resuming it which then places the instance in the "dehydrated orchestrations" list. Again, with no error message.
I'm able to get the message by looking at the body of the message that's in the "ready to run" service. (This is the message that validates versus the schema I use in Visual Studio.)
How might something like this arise?
Stupid question, but I have to ask... Is the corresponding host instance running?

Resources