All Downloads are FREE. Search and download functionalities are using the official Maven repository.

xworker.problem.Problem.dml Maven / Gradle / Ivy

The newest version!
%1658308978979
@
sname=Problem
slabel=Problem
sdescriptors=xworker.lang.MetaDescriptor3
smany=true
seditCols=2
sinitialization=false
sgroup=xworker.problem
smodifier=public
sinheritDescription=false
Sdescription=
#$@text#$@

问题的接口定义。是xworker.app下的应用。

问题框架

    问题是一类事物,用来表明存在某种问题,通常这些用问题需要解决。

  • 处理问题的流程
    执行doResolve()方法,执行后执行isResolved()方法,如果isResolved()方法返回false或异常,执行onUnresolved()方法,否则执行onResolved()方法。
     
  • Handler
    问题通常含有Handlers子节点,可以用来快速处理问题。 
     
  • 如何生成问题
     问题一般可修改和需要长期存储的,可以通过动作GetOrCreateProblem来获取或生成问题。

需要实现的方法:

  • void doResolve()
    处理问题。

可以重写的方法:

  • void notify()
    通知问题,默认实现是把本问题发送到系统通知里。
     
  • boolean isResolved()
    问题是否已经解决。默认返回resolved属性的值。

事件:

  • void onResolved()
    当问题解决后触发的事件,默认实现什么也不做。
     
  • void onUnresolved()
    当问题不能解决后触发的事件,默认实现调用notify方法。

 

#$@text#$@ snotXmlAttribute=false sjson_isArray=false sth_createIndex=false sth_registThing=child|xworker.lang.util.ThingIndex sth_registMyChilds=false sth_registDisabled=false sth_sortWeight=-1000 sth_mark=false @/@actions sname=actions sdescriptors=xworker.lang.MetaDescriptor3/@actions sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_mark=false sid=actions @/@actions/@resolve sname=resolve sisSynchronized=false sthrowException=true suseOtherAction=false svarScope=Local sdisableGlobalContext=false Scode= #$@text#$@ import xworker.lang.util.UtilAction; import xworker.lang.util.UtilData; try{ //处理问题 self.doAction("doResolve", actionContext); //检查是否已解决问题 if(UtilData.isTrue(self.doAction("isResolved", actionContext))){ self.doAction("onResolved", actionContext); }else{ self.doAction("onUnresolved", actionContext, "exception", null); } }catch(Exception e){ def exception = UtilAction.getCauseStackTrace(e); //发送未处理 self.doAction("onUnresolved", actionContext, "exception", exception); } #$@text#$@ sinterpretationType=Action screateLocalVarScope=false ssaveReturn=false sdebugLog=false sdescriptors=xworker.lang.actions.Actions/@GroovyAction sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_mark=false sid=resolve @/@actions/@onResolved sname=onResolved sunimplementedException=false sdescriptors=xworker.lang.actions.Actions/@NOOP sinterpretationType=Self sattributeTemplate=false schildsAttributeTemplate=false svarScope=Local sisSynchronized=false sthrowException=true suseOtherAction=false screateLocalVarScope=false ssaveReturn=false sdisableGlobalContext=false sdebugLog=false sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_mark=false sid=onResolved @/@actions/@onUnResolved sname=onUnresolved sisSynchronized=false sthrowException=true suseOtherAction=false svarScope=Local sdisableGlobalContext=false Scode= #$@text#$@ //默认执行notify方法 if(self.getBoolean("notifyOnUnresolved")){ self.doAction("notify", actionContext); } #$@text#$@ sinterpretationType=Action screateLocalVarScope=false ssaveReturn=false sdebugLog=false sdescriptors=xworker.lang.actions.Actions/@GroovyAction sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_mark=false sid=onUnResolved @/@actions/@notify sname=notify schangeSelf=true sselfVarName=data sinterpretationType=Self sattributeTemplate=false schildsAttributeTemplate=false svarScope=Local sisSynchronized=false sthrowException=true suseOtherAction=false screateLocalVarScope=false ssaveReturn=false sdisableGlobalContext=false sdebugLog=false sdescriptors=xworker.lang.actions.Actions/@ActionGroup sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_mark=false sid=notify @/@actions/@notify/@actions sname=actions sdescriptors=xworker.lang.actions.Begin/@actions sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_mark=false sid=actions @/@actions/@notify/@actions/@setWebUrl sname=setWebUrl [email protected]@getWebUrl() sinterpretationType=Self sattributeTemplate=false schildsAttributeTemplate=false svarScope=Local sisSynchronized=false sthrowException=true suseOtherAction=false screateLocalVarScope=false ssaveReturn=true sreturnVarName=webUrl sdisableGlobalContext=false sdebugLog=false sdescriptors=xworker.lang.actions.Actions/@Ongl sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_mark=false sid=setWebUrl @/@actions/@notify/@actions/@doNotify sname=doNotify sactionContext=var:actionContext sinterpretationType=Self sattributeTemplate=false schildsAttributeTemplate=false svarScope=Local sisSynchronized=false sthrowException=true suseOtherAction=false screateLocalVarScope=false ssaveReturn=false sswitchResult=false sdisableGlobalContext=false sdebugLog=false sdescriptors=xworker.lang.executor.ExecutorActions/@RequestUI sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_noThingRegistViewer=false sth_fileMonitor=false sth_mark=false sth_registQueryOnlySelf=false snotXmlAttribute=false sjson_isArray=false sid=doNotify @/@actions/@notify/@actions/@doNotify/@ThingDesc sname=ThingDesc sthing=var:data sdescription=

问题的通知。

spriority=normal stimeout=360 srequestId=ognl:data.getMetadata().getPath() Svariables= #$@text#$@ { data:"var:data" } #$@text#$@ sdescriptors=xworker.lang.executor.RequestIndex/@ThingDesc sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_noThingRegistViewer=false sth_fileMonitor=false sth_mark=false sth_registQueryOnlySelf=false snotXmlAttribute=false sjson_isArray=false sid=ThingDesc @/@actions/@notify/@actions/@doNotify/@ThingDesc/@actions sname=actions sdescriptors=xworker.lang.executor.Request/@actions1 sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_noThingRegistViewer=false sth_fileMonitor=false sth_mark=false sth_registQueryOnlySelf=false snotXmlAttribute=false sjson_isArray=false sid=actions @/@actions/@notify/@actions/@doNotify/@ThingDesc/@actions/@getLabel sname=getLabel sexpression=data.getMetadata().getLabel() sinterpretationType=Self sattributeTemplate=false schildsAttributeTemplate=false svarScope=Local sisSynchronized=false sthrowException=true suseOtherAction=false screateLocalVarScope=false ssaveReturn=false sdisableGlobalContext=false sdebugLog=false sdescriptors=xworker.lang.actions.Actions/@Ongl sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_mark=false sid=getLabel @/@actions/@doResolve sname=doResolve sunimplementedException=false sdescriptors=xworker.lang.actions.Actions/@NOOP sinterpretationType=Self sattributeTemplate=false schildsAttributeTemplate=false svarScope=Local sisSynchronized=false sthrowException=true suseOtherAction=false screateLocalVarScope=false ssaveReturn=false sdisableGlobalContext=false sdebugLog=false sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_mark=false sid=doResolve @/@actions/@isResolved sname=isResolved sattributeName=resolved sBoolean=false sinterpretationType=Self sattributeTemplate=false schildsAttributeTemplate=false svarScope=Local sisSynchronized=false sthrowException=true suseOtherAction=false screateLocalVarScope=false ssaveReturn=false sdisableGlobalContext=false sdebugLog=false sdescriptors=xworker.lang.actions.ActionUtil/@GetBoolean sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_mark=false sid=isResolved @/@name sname=name sshowLabel=true smodifier=public 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_registDisabled=false sth_mark=false sid=name @/@label sname=label sshowLabel=true smodifier=public 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_registDisabled=false sth_mark=false sid=label @/@notifyOnUnresolved sname=notifyOnUnresolved sinputtype=truefalse sgroup=Problem sshowLabel=true slabelAlign=right slabelVAlign=baseline smodifier=public sreadOnly=false sdefault=true sinheritDescription=false sdescription=

是否在为解决问题时时发送系统通知。

svalidateAllowBlank=true LvalidateOnBlur=true LallowDecimals=true LallowNegative=true snotXmlAttribute=false sdescriptors=xworker.lang.MetaDescriptor3/@attribute sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_mark=false sid=notifyOnUnresolved @/@resolved sname=resolved sinputtype=truefalse sgroup=Problem sshowLabel=true slabelAlign=right slabelVAlign=baseline smodifier=public sreadOnly=false sdefault=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_registDisabled=false sth_mark=false sid=resolved @/@description sname=description sinputtype=html sshowLabel=true smodifier=public 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_registDisabled=false sth_mark=false sid=description




© 2015 - 2025 Weber Informatics LLC | Privacy Policy