-2

I have an Employee class. In my workflow i want to pass array of Employees to the promise object. While passing the array of objects I am getting the de serialization Error. Kindly help.

Promise<ArrayList<Employee>> emp=new Employee().getEmployeeDetails();
yole
  • 92,896
  • 20
  • 260
  • 197
Nithin
  • 9,661
  • 14
  • 44
  • 67
  • 1
    From the code snippet it is not clear what happens in the getEmployeeDetails method. Unless it calls an activity serialization should never happen. – Maxim Fateev Apr 13 '15 at 18:45
  • Can you provide the employee code snippet? Also just a pointer that if you are using default deserializers then you need to have at least one constructor in your class that has no parameters. – Rohit Apr 13 '15 at 19:48
  • I am not calling activity serialisation. Can you please provide a sample snippet for activity serialisation? – Nithin Apr 14 '15 at 01:20
  • It is impossible to help you without understanding what you are doing. The provided code snippet contains no information about how the Promise instance is created. – Maxim Fateev Apr 14 '15 at 17:20

1 Answers1

0

If all that you are trying to achieve is to create a promise object then use Promise.asPromise method. It returns you a promise object which is available immediately. I hope you are using the flow framework provided by the aws sdk. The Promise class that I referred to above is from flow framework code

Rohit
  • 842
  • 6
  • 8