|
Rank: Newbie
Joined: 7/4/2013 Posts: 2 Location: Cincinnati, OH
|
The FlowForce user guide mentions Step Results, it shows how to assign the output of a step to them, but doesn't show how to use them. Specifically, how to use Step Results with all those Step Expressions. I've tried several permutations without success. Does anyone have any examples of how to use these? I've done all kind of Google and Bing searches and have found nothing beyond the Altova documentation.
What I'm trying to do is log and email the error message if a map execution step fails. I assign it to MapResult variable. Then I've tried stderr({MapResult}), {stderr(MapResult)}, {stderr({MapResult})}, and several other permutation, but none of these work and some cause an error when saving the map.
I'd appreciate any help. Thanks, David.
|
|
Rank: Advanced Member
Joined: 12/13/2005 Posts: 2,856 Location: Mauritius
|
Altova definitely needs to better document how to handle such cases. Below is what works. Note the use of failed-step() function, because result doesn't exist in case of a failed step.
{content(stdout(failed-step()))}
or
{as-file(stdout(failed-step()))}
depending on what you need.
|
|
Rank: Newbie
Joined: 7/4/2013 Posts: 2 Location: Cincinnati, OH
|
Vlad,
Thank you for your quick and helpful reply. I would have never guessed that that was the syntax! Also, there is no reference anywhere on the internet (google or bing) that mentions FlowForce and failed-step. How did you come up with that? Do you have an inside track with the developers?
So, if I wanted to see the non-error result of a step, would the syntax be: {content(stdout(MapResult))} ?
Anyways, I appreciate you helping me out. Thanks, David.
|
|
Rank: Advanced Member
Joined: 12/13/2005 Posts: 2,856 Location: Mauritius
|
>How did you come up with that?
I've had to ask Altova Support the same question in the past. They have more detailed knowledge than anybody in this user forum - not sure why people are at all coming here to ask.
|
|
Rank: Newbie
Joined: 11/3/2013 Posts: 8 Location: home
|
vlad wrote:Altova definitely needs to better document how to handle such cases. Below is what works. Note the use of failed-step() function, because result doesn't exist in case of a failed step.
{content(stdout(failed-step()))}
or
{as-file(stdout(failed-step()))}
depending on what you need.
Hi,
I'like to read flowforce job-variable from another txt-file. Any idea how it would be ? I've tried to read var1 from var1.txt file. And {folder} is trigger type as directory.
content(stdout({folder}/var1.txt), encoding = 'UTF-8')
This won't work :(
|
|
Rank: Newbie
Joined: 4/15/2014 Posts: 5 Location: Chicago, IL
|
We tried creating a very simple job with a map step designed to fail / throw an exception, followed by an "on error" to send an email with
{content(stdout(failed-step()))}
In the message body. However, the email never sends and the job is failing with these messages. Any clues?
2014-04-15 15:25:02 WARNING Step 1 of job /public/TEST/ExceptionTest.job: /public/TEST/ExceptionTest.job failed with error: no failed step 2014-04-15 15:25:02 ERROR Step MapForce.Mapping completed with status: 1 more
|
|
guest |