^1418109550037
@
sname
DbSqlTask
slabel
DbSqlTask
sdescriptors
xworker.lang.MetaDescriptor3
sextends
xworker.app.monitor.dbtasks.DbCheckTask
smany
true
seditCols
2
sinitialization
false
sgroup
monitor.db
smodifier
public
sinheritDescription
false
Sdescription
#$@text#$@
<p>在任务参数中设置SQL等参数的SQL任务，具有执行SQL，使用Ognl表达式做判断和存储监控数据等功能。</p>

<p><strong>执行SQL</strong></p>

<p>&nbsp;&nbsp;&nbsp; 在编辑参数中输入要执行的SQL。</p>

<p><strong>消息返回</strong></p>

<p>&nbsp;&nbsp;&nbsp; 如果要返回报警消息，可以在SqlMessage和OgnlMessage中设置，其中SqlMessage优先级最高，设置了就自动忽略OgnlMessage，OgnlMessage只有当Ognl表达式返回true时才生效。</p>

<p>&nbsp;&nbsp;&nbsp; 两个Message都可以使用Freemarker文本模板。</p>

<p><strong>表达式判断</strong></p>

<p>&nbsp;&nbsp;&nbsp; 如果SqlMessage为空且Ognl表达式不为空，那么将判断Ognl表达式。</p>

<p><strong>监控消息存储</strong></p>

<p>&nbsp;&nbsp;&nbsp; 监控消息的存储按照SQL只返回一行记录或返回多行记录做不同的处理。</p>

<ul>
	<li><strong>单行记录</strong><br />
	指定列索引到数据名的映射，那么就会把映射了的列保存到监控数据中。<br />
	&nbsp;</li>
	<li><strong>多行记录</strong><br />
	如果设置为多行（true），指定数据的标识列索引和值索引，那么就会把每行记录的key-value取出来并保存到监控数据中，其中key作为监控数据的数据名。</li>
</ul>

<p><strong>值处理动作</strong></p>

<p>&nbsp;&nbsp;&nbsp; 如果指定的值处理的动作，那么任务将不会处理SQL返回的ResultSet，有值动作否则处理ResultSet。</p>

<p><strong>SQL返回的记录</strong></p>

<ul>
	<li><strong>单行记录</strong><br />
	用v1、v2、v3.......vn表示每列的值。<br />
	&nbsp;</li>
	<li><strong>多行记录</strong><br />
	首先每一行按照单行记录处理，其次多行的记录会放到一个名为vlist的列表中，列表中的值是以v1、v2、v3....vn等存储，其次还会放入到一个vmap的Map中，其中key是r1、r2、r3....rn等，如果指定定了行的标识索引，那么还会以行的标识的值作为Map的key。</li>
</ul>

<ul>
</ul>
#$@text#$@
snotXmlAttribute
false
sth_createIndex
true
sth_registThing
child|xworker.app.monitor.dbtasks.DbCheckTaskIndex
sth_registMyChilds
false
sth_mark
false
@/@actions
sname
actions
sdescriptors
xworker.lang.MetaDescriptor3/@actions
sinheritDescription
false
sth_createIndex
false
sth_registMyChilds
false
sth_mark
false
@/@actions/@run
sname
doCheck
sisSynchronized
false
sthrowException
true
suseOtherAction
false
suseOuterJava
true
souterClassName
xworker.app.monitor.db.DbSqlCheckTaskActions
smethodName
dbSqlRun
sdisableGlobalContext
false
sattributeTemplate
false
sinterpretationType
Action
svarScope
Global
screateLocalVarScope
false
ssaveReturn
false
sdescriptors
xworker.lang.actions.Actions/@JavaAction
sinheritDescription
false
sth_createIndex
false
sth_registMyChilds
false
sth_mark
false
@/@actions/@getParameterThing
sname
getParameterThing
stype
string
svalue
xworker.app.monitor.dbtasks.paramthings.DbSqlTaskParam
sinterpretationType
Self
sattributeTemplate
false
schildsAttributeTemplate
false
svarScope
Local
sisSynchronized
false
sthrowException
true
suseOtherAction
false
screateLocalVarScope
false
ssaveReturn
false
sdisableGlobalContext
false
sdescriptors
xworker.lang.actions.Actions/@ValueFactory
sinheritDescription
false
sth_createIndex
false
sth_registMyChilds
false
sth_mark
false
@/@name
sname
name
sshowLabel
true
sreadOnly
false
sinheritDescription
false
svalidateAllowBlank
true
LvalidateOnBlur
true
LallowDecimals
true
LallowNegative
true
snotXmlAttribute
false
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
sth_createIndex
false
sth_registMyChilds
false
sth_mark
false
@/@label
sname
label
sshowLabel
true
sreadOnly
false
sinheritDescription
false
svalidateAllowBlank
true
LvalidateOnBlur
true
LallowDecimals
true
LallowNegative
true
snotXmlAttribute
false
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
sth_createIndex
false
sth_registMyChilds
false
sth_mark
false
@/@message
sname
message
sinputtype
textarea
sshowLabel
true
ssize
70
sreadOnly
false
sinheritDescription
false
svalidateAllowBlank
true
LvalidateOnBlur
true
LallowDecimals
true
LallowNegative
true
snotXmlAttribute
false
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
sth_createIndex
false
sth_registMyChilds
false
sth_mark
false
@/@sql
sname
sql
sinputtype
textarea
sshowLabel
true
sinputattrs
codeName=sql codeType=sql wrap=false fillBoth=true cols= rows=
sreadOnly
false
sinheritDescription
false
svalidateAllowBlank
true
LvalidateOnBlur
true
LallowDecimals
true
LallowNegative
true
snotXmlAttribute
false
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
sth_createIndex
false
sth_registMyChilds
false
sth_mark
false
@/@description
sname
description
sinputtype
html
sshowLabel
true
sreadOnly
false
sinheritDescription
false
svalidateAllowBlank
true
LvalidateOnBlur
true
LallowDecimals
true
LallowNegative
true
snotXmlAttribute
false
sdescriptors
xworker.lang.MetaDescriptor3/@attribute
sth_createIndex
false
sth_registMyChilds
false
sth_mark
false
