Jason Hoover

Trying to clone an object in Blaze - need some advice

Discussion created by Jason Hoover on Oct 7, 2010
Latest reply on Oct 19, 2010 by Jostein Ulseth

Hello all,

I'm working on a solution for my company that requires me to run an object through a ruleflow, and to do it in about 20 different scenarios.  My input is one object, and I'm trying to put it into an array 20 times but manipulate a few values each time I append it.  Each time it returns from the ruleflow I compile the output into a separate array.  As you probably know, this object that is passed in is a reference so I end up with 20 objects all with the same values that the 20th object I put in the array had.  I would like to clone the object 20 times so I have a unique memory reservation for all and not a reference, but I don't see Java's clone method available to me.  

 

Does anyone know where I can find it, or has anyone encountered this situation before and can suggest a better solution?

 

Thanks,

Jason

Outcomes