Skip to main content
Question

Iam using FME desktop 2022.1 Is there a way to get the name of a transformer via a parameter value?

  • September 8, 2023
  • 4 replies
  • 59 views

essb
Contributor

In the same manner as I can get the name of the workspace via the $(WORKSPACE_NAME)

 

Trying to make it easier to bugfix scripts if they fail or get terminated by a terminator transformer. The message is then sent to a teams-channel.

4 replies

nielsgerrits
VIP
Forum|alt.badge.img+64

I like the idea, but I'm not sure if this is possible.

How I do my server logging:

  • AttributeCreator downstream of the outputport with a "log" attribute, where I describe the TransformerName (like "Tester_02 Failed") and a description what went wrong ("square has 6 points which is not ok").
  • Add timestamp.
  • Collect and merge all logmessages.
  • Send collected log to channel. In my case, this is email.

essb
Contributor
  • Author
  • Contributor
  • September 8, 2023

I like the idea, but I'm not sure if this is possible.

How I do my server logging:

  • AttributeCreator downstream of the outputport with a "log" attribute, where I describe the TransformerName (like "Tester_02 Failed") and a description what went wrong ("square has 6 points which is not ok").
  • Add timestamp.
  • Collect and merge all logmessages.
  • Send collected log to channel. In my case, this is email.

Hi thanks, that's what i'am doing right now but the lazy person in me wanted a faster way :)


nielsgerrits
VIP
Forum|alt.badge.img+64

Hi thanks, that's what i'am doing right now but the lazy person in me wanted a faster way :)

I understand :) lazy is good. Let's hope someone with a better idea chimes in.


kailinatsafe
Safer
Forum|alt.badge.img+23

Hi thanks, that's what i'am doing right now but the lazy person in me wanted a faster way :)

Hello @essb​, I was thinking similarly to @nielsgerrits​, the logfile may be the best option. You could also try the LogMessageStreamer, however, it looks like you'd still need to parse the transformer name from log.message (eg. Creator_XML_Creator (CreationFactory): Created 1 features). Hope this helps, Kailin.