On 12/08/19 17:54, Noah Hansen . wrote:
Hi all,
I have written a simple groovy item transformer and I can't seem to be
able to tell if it's working or not? I have only changed what is under
the beforePull method. When I run my pull task it doesn't seem to be
changing anything.
Any suggestions?
Hi,
you can see a sample ItemTransformer in Groovy at [1]. Such class is
used for integration tests, thus the logic implemented by beforePull()
is simply to add a prefix to values coming from External Resource before
they reach Syncope for actual pull.
FYI, an example ItemTransformer in Java is [2], still used for
integration tests; here the logic is to convert Date values into Long
before sending to External Resource.
HTH
Regards.
[1]
https://github.com/apache/syncope/blob/2_1_X/fit/core-reference/src/test/resources/PrefixItemTransformer.groovy
[2]
https://github.com/apache/syncope/blob/2_1_X/fit/core-reference/src/main/java/org/apache/syncope/fit/core/reference/DateToLongItemTransformer.java
--
Francesco Chicchiriccò
Tirasa - Open Source Excellence
http://www.tirasa.net/
Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/