Hi Bhathiya, >From my knowledge, creating my query with a dynamic value is the best way. If we do like this, that value will be set to message context.
Thank you On Fri, Aug 21, 2015 at 5:26 AM, Bhathiya Jayasekara <[email protected]> wrote: > Hi all, > > I want to execute $subject. I could achieved it like below, but I believe > there must be a better way. > > <property name="UserQuery" value="Select a.name, a.age From Users a where > name='"/> > <property name="Username" value="newuser"/> > <property name="Apostrophe" value="'"/> > <property name="CompleteUserQuery" > expression="fn:concat(get-property('UserQuery'), get-property('Username'), > get-property('Apostrophe'))"/> > > > <payloadFactory media-type="xml"> > <format> > <qu:user xmlns:qu="user.com"> > <qu:query>$1</qu:query> > </qu:user> > </format> > <args> > <arg evaluator="xml" > expression="get-property('CompleteActivityQuery')"/> > </args> > </payloadFactory> > > > <salesforce.query> > <batchSize>1</batchSize> > <queryString xmlns:qu="user.com">{//qu:user/qu:query/text()}</queryString> > </salesforce.query> > > > I'd like to know 2 things. what is the best way, > > 1) to create my query with a dynamic value (i.e. property)? > 2) to set a property value to queryString? > > Thanks, > > -- > *Bhathiya Jayasekara* > *Senior Software Engineer,* > *WSO2 inc., http://wso2.com <http://wso2.com>* > > *Phone: +94715478185 <%2B94715478185>* > *LinkedIn: http://www.linkedin.com/in/bhathiyaj > <http://www.linkedin.com/in/bhathiyaj>* > *Twitter: https://twitter.com/bhathiyax <https://twitter.com/bhathiyax>* > *Blog: http://movingaheadblog.blogspot.com > <http://movingaheadblog.blogspot.com/>* > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Shakila Sivagnanarajah Associate Software Engineer Mobile :+94 (0) 770 760240 [email protected]
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
