Difference between revisions of "Placeholders"

From GreenVulcano Wiki
Jump to: navigation, search
(Created page with "This section contains the placeholders used by {{GVESB}}. # fixed : a text string; # <nowiki>${{propname}} </nowiki> : a System property name; # <nowiki>sp{{propname}} </nowiki...")
 
Line 1: Line 1:
This section contains the placeholders used by {{GVESB}}.
+
{{GVESB}} provides some placeholders and metadata. Their numerous applications ranging from the definition of the properties and setting attributes of the elements useful in the development of the flow to more concrete applications as the evaluations of JavaScript scripts and database queries.
  
# fixed : a text string;
+
Next comes a table with all the metadata used by {{GVESB}} and their description. It is also available for each item a link for deepening into, with concrete examples.
# <nowiki>${{propname}} </nowiki> : a System property name;
+
 
# <nowiki>sp{{propname}} </nowiki> : a System property name;
+
{|  class="gvtable"
# <nowiki>@{{propname}} </nowiki> : a inProperties property name;
+
! Placeholders / Metadata !! Brief description
# <nowiki>timestamp{{pattern}} </nowiki>: return the current timestamp formatted as ''pattern''
+
|-
# <nowiki>dateformat{{date::source-pattern::dest-pattern}} </nowiki>: reformat ''date'' from 'source-pattern'' to ''dest-pattern''
+
| [[More about Placeholders|fixed]] || You can use a text string
# <nowiki>decode{{field[::cond1::val1][::cond2::val2][cond...n::val...n]::default}} </nowiki>: evaluate as if-then-else; if ''field'' is equal to cond1...n, return the value of val1...n, otherwise ''default''
+
|-
# <nowiki>decodeL{{sep::field[::cond1::val1][::cond2::val2][cond...n::val...n]::default}}</nowiki> : is equivalent to ''decode'', with the difference that ''condX''  can be a list of values separated by ''sep''
+
| [[More about Placeholders|<nowiki>${{propname}} </nowiki>]] || Use if you want a property previously defined by System. <br/> ''propname''represents the System property name
# <nowiki>js{{scope::script}}</nowiki> : evaluate a JavaScript script, using the scope ''scope''
+
|-
# <nowiki>sql{{[conn::]statement}}</nowiki> : execute a select sql statement sql and return the value of the first field of the first selected record.<br/> The ''conn'' parameter is the JNDI name of a DataSource, if not defined is used the current connection
+
| [[More about Placeholders|<nowiki>sp{{propname}} </nowiki>]] || Use if you want a property previously defined by System. <br/> ''propname''represents the System property name
# <nowiki>sqllist{{[conn::]statement}}</nowiki>: execute a select sql statement sql and return the value of the first field of all selected records as a comma separated list. <br/> The ''conn'' parameter is the JNDI name of a DataSource, if not defined is used the current connection
+
|-
# <nowiki>sqltable{{conn::statement}}</nowiki>: executes a select sql statement and returns all values of returned cursor as an XML. <br/>  The ''conn'' parameter is the JNDI name of a DataSource
+
| [[More about Placeholders|<nowiki>@{{propname}} </nowiki>]] || Use this if you want a property passed as input. <br/> ''propname''represents the inProperties property name
# <nowiki>ognl{{script}}</nowiki> : evaluate a OGNL script
+
|-
 +
| [[More about Placeholders|<nowiki>timestamp{{pattern}} </nowiki>]] || return the current timestamp formatted as ''pattern''
 +
|-
 +
| [[More about Placeholders|<nowiki>dateformat{{date::source-pattern::dest-pattern}} </nowiki>]] || reformat ''date'' from ''source-pattern'' to ''dest-pattern''
 +
|-
 +
| [[More about Placeholders|<nowiki>decode{{field[::cond1::val1][::cond2::val2][cond...n::val...n]::default}} </nowiki>]] || evaluate as if-then-else; if ''field'' is equal to cond1...n, return the value of val1...n, otherwise ''default''
 +
|-
 +
| [[More about Placeholders|<nowiki>decodeL{{sep::field[::cond1::val1][::cond2::val2][cond...n::val...n]::default}}</nowiki>]] || is equivalent to ''decode'', with the difference that ''condX''  can be a list of values separated by ''sep''
 +
|-
 +
| [[More about Placeholders|<nowiki>js{{scope::script}}</nowiki>]] || evaluate a JavaScript script, using the scope ''scope''
 +
|-
 +
| [[More about Placeholders|<nowiki>sql{{[conn::]statement}}</nowiki>]] || execute a select sql statement sql and return the value of the first field of the first selected record.<br/> The ''conn'' parameter is the JNDI name of a DataSource, if not defined is used the current connection
 +
|-
 +
| [[More about Placeholders|<nowiki>sqllist{{[conn::]statement}}</nowiki>]] || execute a select sql statement sql and return the value of the first field of all selected records as a comma separated list. <br/> The ''conn'' parameter is the JNDI name of a DataSource, if not defined is used the current connection
 +
|-
 +
| [[More about Placeholders|<nowiki>sqltable{{conn::statement}}</nowiki>]] || executes a select sql statement and returns all values of returned cursor as an XML. <br/>  The ''conn'' parameter is the JNDI name of a DataSource
 +
|-
 +
| [[More about Placeholders|<nowiki>ognl{{script}}</nowiki>]] || evaluate a OGNL script
 +
|}

Revision as of 08:04, 31 January 2012

GreenVulcano® ESB provides some placeholders and metadata. Their numerous applications ranging from the definition of the properties and setting attributes of the elements useful in the development of the flow to more concrete applications as the evaluations of JavaScript scripts and database queries.

Next comes a table with all the metadata used by GreenVulcano® ESB and their description. It is also available for each item a link for deepening into, with concrete examples.

Placeholders / Metadata Brief description
fixed You can use a text string
${{propname}} Use if you want a property previously defined by System.
propnamerepresents the System property name
sp{{propname}} Use if you want a property previously defined by System.
propnamerepresents the System property name
@{{propname}} Use this if you want a property passed as input.
propnamerepresents the inProperties property name
timestamp{{pattern}} return the current timestamp formatted as pattern
dateformat{{date::source-pattern::dest-pattern}} reformat date from source-pattern to dest-pattern
decode{{field[::cond1::val1][::cond2::val2][cond...n::val...n]::default}} evaluate as if-then-else; if field is equal to cond1...n, return the value of val1...n, otherwise default
decodeL{{sep::field[::cond1::val1][::cond2::val2][cond...n::val...n]::default}} is equivalent to decode, with the difference that condX can be a list of values separated by sep
js{{scope::script}} evaluate a JavaScript script, using the scope scope
sql{{[conn::]statement}} execute a select sql statement sql and return the value of the first field of the first selected record.
The conn parameter is the JNDI name of a DataSource, if not defined is used the current connection
sqllist{{[conn::]statement}} execute a select sql statement sql and return the value of the first field of all selected records as a comma separated list.
The conn parameter is the JNDI name of a DataSource, if not defined is used the current connection
sqltable{{conn::statement}} executes a select sql statement and returns all values of returned cursor as an XML.
The conn parameter is the JNDI name of a DataSource
ognl{{script}} evaluate a OGNL script