Hi,
is it possible to pass self created objects between workflow elements? And when it's possible, how can it be accomplished?
In example:
var myVlans = [];
myVlans.push( {vlanid: 100, found: false, type="local", Network: PortGroup_100} )
myVlans.push( {vlanid: 101, found: false, type="distributed", Network: dvpg_100} )
I tried to define myVlans as an Array of Any (Workflow attribute) to get access in an other worfklow element.
Failure: Workflow:initializeWorkflowVariables / Find Host (item13) : ch.dunes.model.type.ConvertorException: Unable to serialize object of class : org.mozilla.javascript.NativeObject
Thanks in advance,
Stephan
vCO saves all outputs to its databse between each boxes to make sure the workflow can be resumed. It does it only with the objects it knows (not the custom ones you create in javascript). For example you can use the Properties object to pass your vlan properties from one box to another one.
Christophe.
vCO saves all outputs to its databse between each boxes to make sure the workflow can be resumed. It does it only with the objects it knows (not the custom ones you create in javascript). For example you can use the Properties object to pass your vlan properties from one box to another one.
Christophe.
Hi Stephan,
had the same problem these days also for using it inside the worklfows. You can use JSON or serialize it in a way you want or write an specific action like "serialize" to build the objects. The best way in my opinion are Array/string for the "transport", they look similar to key paired values.
http://mighty-virtualization.blogspot.com/2011/07/vco-out-parameter-serialization-with.html
best regards
Christian
@Christophe: Damn, you win the speed contest again
At least we did not answer the same thing. More options is better.
I like the properties because you can set and get any objects type without converting them back and forth.
Christophe.
Hi guys,
the "Properties"-Solution ismore straightforward to me, so I will stuck with it. Hopefully you understand it Christian :smileylaugh:
Here is a little example (Don't ask for the sense, it's just a test.)
Workflow element A)
Workflow element B)
for ( var i in vlan ) {
System.debug("Name: " +vlan[i].get("name"));
System.debug("ID: " +vlan[i].get("id"));
System.debug("VcNetwork: " +vlan[i].get("vcNetwork"));
}
Works like a champ.
Thanks,
Stephan
Just wanted to say thanks, I was looking to pass things between workflows and the Properties object was exactly what i was looking for.
in 5.1 there is an improvement for reliablility on this:
you can define custom "strongly typed" so called Compositions.
They are used comparable to properties, but have type-safety even at development time.
Cheers,
Joerg
Even better, I'll take a look at that.
Thanks,
Magnus