From: Loren C. <lor...@gm...> - 2012-01-25 15:09:07
|
Hello folks, Currently the passing of parameters into a scheduled task is with strings only. Currently the parameters are passed in the format of: <parameters> <param name="param-name1" value="param-value1"/> </parameters> Could we change the format to: <parameters> <param name="param-name1">param-value1</param> </parameters> or <parameters> <param> <name>param-name1</name> <value>param-value1</value> </param> </parameters> The current code for processing the parameters is in org.exist.xquery.modules.scheduler.ScheduleFunctions.java and is: private void parseParameters( Node options, Properties properties ) throws XPathException { if( ( options.getNodeType() == Node.ELEMENT_NODE ) && options.getLocalName().equals( "parameters" ) ) { Node child = options.getFirstChild(); while( child != null ) { if( ( child.getNodeType() == Node.ELEMENT_NODE ) && child.getLocalName().equals( "param" ) ) { Element elem = ( Element )child; String name = elem.getAttribute( "name" ); String value = elem.getAttribute( "value" ); if( ( name == null ) || ( value == null ) ) { throw( new XPathException( this, "Name or value attribute missing for stylesheet parameter" ) ); } properties.setProperty( name, value ); } child = child.getNextSibling(); } } } Can the Quartz scheduler handle the passing of an item() or any other xs:* type as the value in the property? I am sure that we would have to do a copy of the value that is passed, but is the idea sound? Loren |