Here,
"inTag" is the tag of the property for which new value was requested."s" is the Switch object representing the old flow element.
"c" is the Connection object representing the old connection element.
The value returned is an array of two strings where the first item is the new value and the second item is the type of this value (which means the editor which virtually "was used" to set the value).
If the entry point is not implemented or if the array is empty then the corresponding "inTag" property will remain unchanged.
If the array does not contain two items then a warning message will be logged and the property will remain unchanged.
Additionally, if the array contains two items but they cannot be used to set the new property value, a warning message will be logged and the property will remain unchanged.
They can be accessed in the script by using the constants like s.LiteralName.
For example:
function getUpdatedValueForProperty( s : Switch, inTag : String ) : Array
{ var theResArray = new Array(); if( inTag == "dataset" ) { theResArray.push( "Xml" ); theResArray.push( s.EditorSingleLineText ); } else if( inTag == "dataModel" ) { theResArray.push( "XML" ); theResArray.push( s.EditorDropdownList ); } else if( inTag == "locationPath" ) { theResArray.push( s.LiteralNone ); theResArray.push( s.EditorLiteral ); } return theResArray; }
function getUpdatedValueForConnectionProperty( s : Switch, c : Connection, inTag : String ) : Array
{ var theResArray = new Array(); if( inTag == "Name" ) { if( c.getName().isEmpty() ) { theResArray.push( "New name" ); theResArray.push( s.EditorSingleLineText ); } } else if( inTag == "Error" ) { if( !c.allowsSuccess() && !c.allowsError() ) { theResArray.push( "Yes" ); theResArray.push( s.EditorNoYesList ); } } return theResArray; }