I am playing with SPEL inside SI.
Recently I faced a problem that took me couple of hours, most probably caused by my misreading of reference guide...
Anyway, if I have assignment expression on transformer, or service activator:
where payload is of type Transaction with enumerated field TransactionStatus status, my naive assumption was that I can transform object with expression and I will get transformed object in output channel.Code:<int:transformer expression="payload.setStatus(T(com.acme.model.TransactionStatus).pending)" input-channel="input" output-channel="output"/>
Wrong, since method setStatus(TransactionStatus) is VOID, so no message is put in output channel.
I had some difficulties to trace the problem (my next endpoint in chain could not be invoked simply because it didn't have message passed ).
No errors, warnings, anything in logs.
Ok, you can say, no return type in method within expression, no message passed, as stated in reference guide (spotted too late) but:
1. how to do then SPEL assignments, beyond simple Spring concatenation in examples?
2. All model classes have setters that are void (I am using Roo generated model, btw), so how to use SPEL to set the field in model class?
thanks & best,