Flat File Problem
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server General > Flat File Problem




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Flat File Problem  
Gary


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-14-06 10:52 PM

Hi All,

I am currently working on a project where we receive a flat file which
contains no header or trailer but multiple records in the file. We are
wrapping the FFDasm in a custom pipeline so we can dynamically set the schem
a
property.

What we are wanting to do is use a sequential convoy to enforce sequencing.
Therefore we have figured that we could do this by counting the records in
the flat file and then updating the stream by inserting our own header recor
d
before calling the FFDasm disassemble method.

We have currently hard coded the head so our file is as follows:

RecordCount2
Rec....... etc
Rec....... ect

We have assigned a schema to the DocumentSpecName and also a header schema
to the HeaderSpecName. Our problem is we dont know how to get the value from
the Header in an orchestration. We have tried promoting the RecordCount
property in the header schema and setting the promoted element to
MessagePropertyContextBase and we have set the PreserveHeader property to
true in the pipeline component but it doesn't seem to be populated in the
orchestration.

Can anyone give us a clue with this one please?

Cheers,
Gary





[ Post a follow-up to this message ]



    Re: Flat File Problem  
Leonid Ganeline


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-14-06 10:52 PM

Hi Gary,
As I can remember the header information is not accessible inside the Orch.
It is only immutable transfering from receive port to the send port.
Why do you use a header schema?
If you anyway use a custom pipeline you can add a node with a record ID to
the body schema.
Keep in mind that XmlDisassembler component promotes nodes to the context.
No XmlDisassembler - no promotion.

--

Regards,

Leonid Ganeline
BizTalk developer
Vancouver
http://geekswithblogs.net/leonidganeline
===================================


"Gary" <Gary@discussions.microsoft.com> wrote in message
news:B924A764-3FAC-48D7-813C-AC182E8A4D9D@microsoft.com...
> Hi All,
>
> I am currently working on a project where we receive a flat file which
> contains no header or trailer but multiple records in the file. We are
> wrapping the FFDasm in a custom pipeline so we can dynamically set the
> schema
> property.
>
> What we are wanting to do is use a sequential convoy to enforce
> sequencing.
> Therefore we have figured that we could do this by counting the records in
> the flat file and then updating the stream by inserting our own header
> record
> before calling the FFDasm disassemble method.
>
> We have currently hard coded the head so our file is as follows:
>
> RecordCount2
> Rec....... etc
> Rec....... ect
>
> We have assigned a schema to the DocumentSpecName and also a header schema
> to the HeaderSpecName. Our problem is we dont know how to get the value
> from
> the Header in an orchestration. We have tried promoting the RecordCount
> property in the header schema and setting the promoted element to
> MessagePropertyContextBase and we have set the PreserveHeader property to
> true in the pipeline component but it doesn't seem to be populated in the
> orchestration.
>
> Can anyone give us a clue with this one please?
>
> Cheers,
> Gary







[ Post a follow-up to this message ]



    Re: Flat File Problem  
Greg Forsythe


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-14-06 10:52 PM

Rather than modifying the flat file why don't you promote the property
yourself in your custom pipeline component.
baseMessage.Context.Promote("RecordCount", "Your RecordCount property
namespace", record count value);
You can do this just before returning from GetNext()

This would be much easier than modifying the input data, using a header
schema and relying on the FFDasm to promote the property for you.

The FFDasm will promotes properties
And you can promote properties from the Header into the message context, and
have access to them in the orchestration. If the input message is split by
the FFDasm each message will contain the header properties.

Greg


"Leonid Ganeline" <leo_gan_57@hotmail.com> wrote in message
news:%23$B2qd6RGHA.256@TK2MSFTNGP14.phx.gbl...
> Hi Gary,
> As I can remember the header information is not accessible inside the
> Orch. It is only immutable transfering from receive port to the send port.
> Why do you use a header schema?
> If you anyway use a custom pipeline you can add a node with a record ID to
> the body schema.
> Keep in mind that XmlDisassembler component promotes nodes to the context.
> No XmlDisassembler - no promotion.
>
> --
>
> Regards,
>
> Leonid Ganeline
> BizTalk developer
> Vancouver
> http://geekswithblogs.net/leonidganeline
> ===================================
>
>
> "Gary" <Gary@discussions.microsoft.com> wrote in message
> news:B924A764-3FAC-48D7-813C-AC182E8A4D9D@microsoft.com... 
>
>







[ Post a follow-up to this message ]



    Re: Flat File Problem  
Gary


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-15-06 12:48 PM

I have tried this morning to go down the route of promoting the property jus
t
before returning from GetNext() i.e.

newMsg.Context.Promote("RecordCount", propertyschema namespace, value);

I have set the RecordCount property in the schema file to be
MessageContextPropertyBase

The property value is not set and debugging an orchestration using the
orchestration debugger I cannot see this property anywhere. However if I loo
k
at the consumed message from the biztalk admistration screen I can see that
the property is promoted in this. It seems to me that the property is
promoted on the consumed message but once it gets into an orchestration then
the promoted property is lost.

Any ideas?

Thanks


"Greg Forsythe" wrote:

> Rather than modifying the flat file why don't you promote the property
> yourself in your custom pipeline component.
> baseMessage.Context.Promote("RecordCount", "Your RecordCount property
> namespace", record count value);
> You can do this just before returning from GetNext()
>
> This would be much easier than modifying the input data, using a header
> schema and relying on the FFDasm to promote the property for you.
>
> The FFDasm will promotes properties
> And you can promote properties from the Header into the message context, a
nd
> have access to them in the orchestration. If the input message is split by
> the FFDasm each message will contain the header properties.
>
> Greg
>
>
> "Leonid Ganeline" <leo_gan_57@hotmail.com> wrote in message
> news:%23$B2qd6RGHA.256@TK2MSFTNGP14.phx.gbl... 
>
>
>





[ Post a follow-up to this message ]



    Re: Flat File Problem  
Greg Forsythe


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-16-06 12:48 PM

If you can see the property in the message context of the consumed message,
then it should be available for use by the orchestration.
What are you doing with the promoted property in the orchestration.
Have you deployed the Biztalk Assembly that contains the property schema
that contains this property.
Does the property name and namespace you use in the pipeline component match
those in the property schema

Greg


"Gary" <Gary@discussions.microsoft.com> wrote in message
news:1A257D61-BB46-4A97-BBC0-628A5EA36865@microsoft.com...[vbcol=seagreen]
>I have tried this morning to go down the route of promoting the property
>just
> before returning from GetNext() i.e.
>
> newMsg.Context.Promote("RecordCount", propertyschema namespace, value);
>
> I have set the RecordCount property in the schema file to be
> MessageContextPropertyBase
>
> The property value is not set and debugging an orchestration using the
> orchestration debugger I cannot see this property anywhere. However if I
> look
> at the consumed message from the biztalk admistration screen I can see
> that
> the property is promoted in this. It seems to me that the property is
> promoted on the consumed message but once it gets into an orchestration
> then
> the promoted property is lost.
>
> Any ideas?
>
> Thanks
>
>
> "Greg Forsythe" wrote:
> 







[ Post a follow-up to this message ]



    Re: Flat File Problem  
Gary


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-21-06 08:09 AM

Hi Greg,

Thanks for your response. In the orchestration I have simply created a
variable of type string and in an expression shape I have assigned the
variable to the value of the promoted property i.e.

RecCount = Message(promotedproperty);

When I debug the orchestration the RecCount variable is null. I think from
what you say I have done about 95% correct and I'm just tripping up on
something small. I'll have a look around again this week and see if I can
solve it.

Thanks,
Gary

"Greg Forsythe" wrote:

> If you can see the property in the message context of the consumed message
,
> then it should be available for use by the orchestration.
> What are you doing with the promoted property in the orchestration.
> Have you deployed the Biztalk Assembly that contains the property schema
> that contains this property.
> Does the property name and namespace you use in the pipeline component mat
ch
> those in the property schema
>
> Greg
>
>
> "Gary" <Gary@discussions.microsoft.com> wrote in message
> news:1A257D61-BB46-4A97-BBC0-628A5EA36865@microsoft.com... 
>
>
>





[ Post a follow-up to this message ]



    Re: Flat File Problem  
Gary


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-21-06 01:02 PM

Hi, thanks for your help.

I have managed to solve the problem. It was the namespace I was using to
write the context. Having read an article on microsoft I thought that when
writing a property to the context it was creating a distinguished property
which would have used the namespace
http://schemas.microsoft.com/BizTal...inguishedFields

this was where I was going wrong, I needed to use the property schema
namespace which had the property defined.

Thanks.
Gary

"Gary" wrote:
[vbcol=seagreen]
> Hi Greg,
>
> Thanks for your response. In the orchestration I have simply created a
> variable of type string and in an expression shape I have assigned the
> variable to the value of the promoted property i.e.
>
> RecCount = Message(promotedproperty);
>
> When I debug the orchestration the RecCount variable is null. I think from
> what you say I have done about 95% correct and I'm just tripping up on
> something small. I'll have a look around again this week and see if I can
> solve it.
>
> Thanks,
> Gary
>
> "Greg Forsythe" wrote:
> 





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 03:12 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register