cancel
Showing results for 
Search instead for 
Did you mean: 

The variables need to be serialized?

rodolfobarbeiro
Champ in-the-making
Champ in-the-making
Hi!

I trying to invoke a Java Service. My code that executes the logic is as follows:


  public void execute(DelegateExecution execution) throws Exception {
       
       Long value = (Long) parameter.getValue(execution);
      
       Service rmService = this.getService();
             
       Object response = rmService.getCustomer(value);
      
       if (returnValue!=null) {
         String returnVariableName = (String) returnValue.getValue(execution);
         execution.setVariable(returnVariableName, response);
       }
     }


My question is: the "response" need to be Serializable?

Because occurs a failure to execute "execution.setVariable(returnVariableName, response)".
2 REPLIES 2

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
Yes, unless it is something like a String, boolean etc or a jpa entity

rodolfobarbeiro
Champ in-the-making
Champ in-the-making
Thanks for your help!