Topic Options
#31395 - 06/19/09 06:45 PM Create File task - getting extra lines
-nth- Offline
OL Expert

Registered: 04/01/03
Posts: 236
Loc: Lincoln, NE
I've noticed in V6 and now in V7, when I use the "Create File" input task I always get 2 extra blank lines at the end of the file. Normally this is not a big deal, but I'm using the task to create XML files that I'm combining in a later process and am getting a lot of extra white space in the resulting XML file. I can remove it using the "Add/remove text" task, but it seems odd that I would have to do this.

Is this normal/expected behavior for the create file task?

Thanks,
-nth-

Top
#31396 - 06/22/09 03:20 AM Re: Create File task - getting extra lines
Philippe F. Offline
OL Expert

Registered: 09/06/00
Posts: 1931
Loc: Objectif Lune, Montreal, Qc
Hi nth,

Yes, it's normal. The Create File task always adds a CR/LF pair to ensure you won't be creating a 0 byte file, which is always invalid in a workflow.

Remember that even if there are characters at design time, that doesn't mean there will be any at run time (e.g. if the task contains a variable reference like %{SomeVariableValue}.

We could detect whether there are any characters in the file at run time and adjust the behavior accordingly, but then that behavior would not be consistently predictable. And in automated processes, consistency is the most valuable quality.

Hope that clarifies things.
_________________________
Technical Product Manager
I don't want to achieve immortality through my work; I want to achieve immortality through not dying - Woody Allen

Top