Skip to main content

I’m finding a strange behavior on
usage of custom Transformers I create.

So, I created a CustomTransformerA with all
the necessary default settings/parameters. I tested it, all good, results as expected,
done …. Export as Custom Transformer (tried all insert modes. Embedded always
and default)

Starting a new workbench I can call and insert my CustomTransformerA from gallery and make it available on my new
workspace.

Then if I duplicate or insert
again from gallery the CustomTransformerA it will be automatically renamed to CustomTransformerA_2,
CustomTransformerA_3 and so on. All fine … multiple Customs, all different names.

There is my problem now –
Every time I do a change in any of the customs that were duplicated or inserted
from gallery, the changes are replicated across all the copies.

So, my goal to use CustomTransformerA
is to remove duplicate work working in isolation to any other copy of it making it reusable in diferent scenarios inside same workbench. Somehow
there seems to be a link that keeps them all in sync and any change done in one, gets
reflected in all copy’s.

I have gone through this
reading below but so far no click yet.

https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Workbench/Workbench/custom_transformers_multiple_copies.htm

Have you seen this … ?

Thanks,

Jorge

Hi @jorge_vidinha

Even if a Custom Transformer is Embedded within a workspace, all instances of that transformer within that workspace will share the same logic. They cannot be modified individually.

What you can do is structure your CT with the appropriate logic and parameters to allow it to handle any of the scenarios you wish to use it for. This may increase the complexity of the transformer.


Hi @DaveAtSafe, Thanks for the reply.

But was this something that changed along the way of FME ? Asking this because we have old CT's that were build with FME versions of maybe .. 2011,2012,2013 ... and those CT's they work in isolation. Meaning that each copy keeps its own logic after changes applied. Kind of importing the base class and extending it it other capabilities, each class inherits the base methods and any extra ones added. Im confuse ...

 

 

 


Hi @DaveAtSafe, Thanks for the reply.

But was this something that changed along the way of FME ? Asking this because we have old CT's that were build with FME versions of maybe .. 2011,2012,2013 ... and those CT's they work in isolation. Meaning that each copy keeps its own logic after changes applied. Kind of importing the base class and extending it it other capabilities, each class inherits the base methods and any extra ones added. Im confuse ...

 

 

 

As far as I know, it's always been the way DaveAtSafe describes. To the best of my knowledge this has never changed.

Hello @DaveAtSafe and @david_r , Here is what we found .

If we drag CT A from the Gallery , make changes on it --> instance 1 of CT A .

We drag CT A again , its autorenamed to CT A_2 --> instance 2 of CT A (changes made at instance 1 are not reflected in instance 2 and vice versa)

Can you confirm this is also the case on your side ?


Could it be that your custom transformer is stored as an external .fmx and configured to be inserted as embedded rather than linked? That could explain the behavior. If you want CT B to have the same definition as CT A, you should copy/paste CT A rather than "importing" the original definition from the transformer gallery.

If you want the changes to custom transformers to automatically propagate between instances and workspaces, you may want to look into using linked rather than embedded custom transformers. See also https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Workbench/Workbench/custom_transformer_embedding_linking.htm


@david_r

// This customs are exported and stored as .fmx files with insert mode 'embedded always'. And the exact behaviour im looking for, is to NOT have replication of changes accross copys/instances of the same CT in the same workspace. The drag and drop exercise from gallery i just posted seems to be working.

Were you able to replicate the drag and drop scenario ?

Thanks,

Jorge


Well that explains it. If you drag the externally defined custom transformer into the workspace as embedded, you actually create a local copy of the transformer definition, meaning that there is no link between your workspace instance and the fmx version.

 

So if you modify the local copy and then then create another instance based on the fmx (by dragging it from the transformer gallery), you will get the fmx version, whereas if you copy/paste the workspace version, you get exactly that.

 

 

The behavior you observe sounds about correct to me.

Well that explains it. If you drag the externally defined custom transformer into the workspace as embedded, you actually create a local copy of the transformer definition, meaning that there is no link between your workspace instance and the fmx version.

 

So if you modify the local copy and then then create another instance based on the fmx (by dragging it from the transformer gallery), you will get the fmx version, whereas if you copy/paste the workspace version, you get exactly that.

 

 

The behavior you observe sounds about correct to me.
Thanks david_r , i think it clears my doubts . Not sure if there is documentation about this topics, so hope this thread can help others.

 

Regards,

 

Jorge

 

 


Thanks david_r , i think it clears my doubts . Not sure if there is documentation about this topics, so hope this thread can help others.

 

Regards,

 

Jorge

 

 

I would expect the subject matter to be mentioned in the FME training material somewhere, but I'm not quite sure to which extent.

Reply