Skip to main content
Question

FEM 2012 Sp2 - Custom transformers, Loops, ExpressionEvaluator

  • May 10, 2013
  • 7 replies
  • 95 views

Forum|alt.badge.img

Hello,

Is there an issue with having an expressionEvaluator inside a Custom Transformer that has a Transformer Loop?

I want to call a workbench passing a date of a possible file but I only want it to do so 32 times.

I am using a creator to initialise a counter variable, (I am using Creator instead of having to read in features), then I set an attribute with todays date via DateFormatter, then inside the loop, ExpressionEvaluator to increment the counter variable, then a tester to make sure I haven't gone through the loop more than 32 times, then some processing on the date, and then the Transformer Loop to go back to the start where ExpressionEvaluator than is supposed to increment the counter variable again.

When I the Inspection tool, I see that the counter variable and all the other variables are wiped.

Is there a bug in 2012 SP2?

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

7 replies

takashi
Celebrity
  • May 10, 2013
Hi,

 

 

I suppose the usage of Creator caused the unexpected result. But the exact reason cannot be specified unless the structure of your custom transformer will be more clear. Could you show us a screen shot of your custom transformer?

 

 

Takashi

Forum|alt.badge.img
  • Author
  • May 13, 2013
Hello takashi,

 

 

Can I send the workbench via drop box, if that helps?

 

 

 


takashi
Celebrity
  • May 13, 2013
Hi,

 

 

Yes. Paste the link here, then we all can see that.

mark2atsafe
Safer
Forum|alt.badge.img+59
I don't see a reason why it should be a problem, so we'll have to wait to see the workspace.

Forum|alt.badge.img
  • Author
  • May 16, 2013
Might have to close this question. I am using a Tranformer 'DateSetter' I downloaded from the FME store but I didn;t read the Requirements where it stated FME 2013 SP1+.

 

When I run WB 1 and loo at the returned date, the date is in the future by some amount of days i.e. 04/03/2014 , 02/04/2014 , 03/02/2014

 

 

Mights just not work in FME 2012 SP 4.

takashi
Celebrity
  • May 16, 2013
Hi,

 

 

I suppose it's a problem concerning to 'Source Format' parameter of DateFormatter. I would recommend you to look over whether the format of input date string is always same as 'Source Format', at every time in the loop.

 

Takashi

Forum|alt.badge.img
  • Author
  • May 29, 2013
Resolved, apologies for not getting back sooner,

 

the issue was I was converting the date to d/m/yyyy and the DateFormatter transformer doesn't like that. Helps to carefully read the help docco :)

 

The source string must be in a date and/or time format supported by the transformer.