Biztalk EDIFACT processing - biztalk

I'm trying to process an edifact file using Biztalk. I have setup a very simple map which is applied to send port. However, Biztalk complains about the message. I tried searching the net, but without any result. You can see the edi file here. I have setup parties and agreement using EDIFACT protocol, though I'm not sure how correctly I did. Whenever I try to provide biztalk with that message, I can see in event log the following message:
A message received by adapter "FILE" on receive location "Receive
Location1" with URI "C:\Temp*.edi" is suspended. Error details: An
output message of the component "Unknown " in receive pipeline
"Microsoft.BizTalk.Edi.DefaultPipelines.EdiReceive,
Microsoft.BizTalk.Edi.EdiPipelines, Version=3.0.1.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35" is suspended due to the following
error:
Error: 1 (Field level error) SegmentID: UNB Position in TS: 1 Data Element ID: UNB5 Position in Segment: 5 Data Value: 37:
Invalid character(s) found in data element. The sequence number of
the suspended message is 1. MessageId:
{DDE54B67-8907-49A2-BDE9-4763495B9B87} InstanceID:
{892EC28B-AC4C-4EA4-8DCC-C49D5FC2869C}
I'm not sure what it means. Any help, indication would be greatly appreciated.
Thanks.

The message you provide looks like a properly formatted EDIFACT message for syntax version 1 (Syntax version 4 is current). I don't know Biztalk, but you probably have to set something to make sure it is expecting syntax version 1. The UNA segment is different for syntax version 1 (it expects 5 delimiters) compared to the more recent syntax versions (where it expects 6 delimiters), so if Biztalk is expecting a UNA segment for a higher syntax version, then it won't be able to properly deal with the message.

You are missing your UNA5 (Repetition seperator) in your UNA specification line.
Without this, the BizTalk EDI disassembling pipeline is unable to correctly parse the content of your EDI file.
You will most likely need to coordinate with your trading partner(s) to ensure the UNA line (first line of the file) looks something like the following:
UNA:+,?*'

Related

NServiceBus MessageDeserializationException on DataBusProperty<byte[]>

We have an NServiceBus 6 environment with a number of services that send files between each other using DataBusProperty over a custom SqlDataBus : IDataBus.
This works fine on NSB6 using the built in JSON serializer, but is now broken after we moved to NSB7 and the NewtonsoftSerializer.
Removing DataBusProperty from our classes and just using byte[] works fine. We also tried changing the DataBus to FileShareDataBus but got the same exception:
NServiceBus.MessageDeserializationException: An error occurred while attempting to extract logical messages from incoming physical message c7b5cd47-c1b7-4610-9f6c-aa7800cc9b64 --->
Newtonsoft.Json.JsonReaderException: Error reading bytes. Unexpected token: StartObject. Path 'Data.Key', line 1, position 68.
This fails even if a service is sending messages to itself. Also we can see the files written to the file store, whether on Sql or File Share, so they're serializing fine.
An example payload from the error queue is
{"ExecutionId":"1db85105-a71c-4b29-87da-9b7ae6518c1c","Data":{"Key":"2019-06-26_13\\6a2b63c7-12b0-46dd-8b92-f1fc743d27c1","HasValue":true}}
How can we get this to deserialize in NSB7+NewtonsoftSerializer when it works fine in NSB6+JsonSerializer?
Thanks
I just spent about 8 hours trying to figure out what was going on, and realized, that for whatever reason, NSB7 wants a paramaterless constructor and settable properties. I am going back to Particular to see if this change is expected, but I expect we will have to adjust all of our message classes to fit that paradigm.
Although data bus properties should work there is also an alternative to data bus properties which is using stream attachments via send options:
https://docs.particular.net/nservicebus/messaging/attachments-sql
Depending on the use case using Streams might be a more efficient approach.

NiFi: GetHTTP Processor Regular Expression Invalid Error

I have a simple NiFi flow, with GetHTTP and PutFile processors. I am trying to connect the GetHTTP processor to the DC Metro data API, with this link:
https://api.wmata.com/TrainPositions/TrainPositions?contentType={contentType}
(The website can be found here)
I can get this error:
I can't debug this error in the log, since it has not run yet. I also cannot find any other examples of this error. I put the link above in the URL part of the configuration, and gave it a sample Filename of wmata_data.json. Thanks.
I think you are having a Newline in the URL property value as shown below
To resolve the issue Remove the newline in URL property and try again.

sc-win32-status code is -2147023901 in IIS7

We are receiving the sc-win32-Status code as -2147023901 in case of Failed Requests. We didnt get much info when we googled on net.
Please throw some light as to whether the issue is related to any Network issue.
I would guess that error is really 995:
ERROR_OPERATION_ABORTED
The I/O operation has been aborted because of either a thread exit or an application request.
Some libraries combine normal Windows error codes with some flags in the upper 16 bits of a DWORD value, which can hide the original number. If I see a negative number error code around -2100000000, I do this:
Convert to hex (with calc.exe or whatever) In this case decimal -2147023901 is hex 0x800703E3.
Take the lower 16 bits (0x00003E3)
Try to look that up. For instance, on MSDN.
Another handy trick that often works is to see if it can be decoded by certutil -error. From a command line:
C:\>certutil -error -2147023901
0x800703e3 (WIN32: 995) -- 2147943395 (-2147023901)
Error message text: The I/O operation has been aborted because of either a thread exit or an application request.
CertUtil: -error command completed successfully.

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?

Biztalk Message Promotions

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.

Resources