AnsweredAssumed Answered

For service task return values, is Serializable required?

Question asked by matt1 on Apr 2, 2015
Latest reply on Apr 8, 2015 by trademak
I'm new to Activiti so please bear with me.

I was playing around with returning values from service tasks and then passing that value to the subsequent task, and I was only able to return a POJO and use it in the subsequent task if I implemented Serializable. (maybe I'm doing something wrong.)

So this worked
public class Claim implements Serializable {
    long claimId;
    DateTime created;



But this causes some type of serialization exception:
public class Claim {
    long claimId;
    DateTime created;



More specifically I was using return value from task1 and passing it as an argument to task2, in both cases using Expressions.

task1 expression
#{prepareClaim()}
(return value set to 'claim')

task 2 expression
${claimService.create(claim)}


If Serializable is required, my question would then be why?

BTW, still not sure when to use
$
vs
#















Outcomes