XML-COS

基礎語義:
<def xmlid="" clazz=""/>
<action key="" event="{}" input="{}" config="{}" output="{}" xmlid=""> <action key="" event="{}" input="{}" config="{}" output="{}" xmlid=""/>
</action>
def定義一個基礎功能,xmld為系統內的唯一編號,系統啟動時只是載入,不實例化。
action 定義一個具體的業務功能,key為系統內唯一實例化編號,系統啟動時該配置項將實例化。event為該功能事件,系統內置了一些事件如:worktime(定時調用),asyn(異步調用) ......,也可以自己定義。input為入參格式,config為該功能的配置屬性,output為出參格式,每個功能參數都由JSON語言配置。
判斷邏輯:
<if cond=“”>
<action.../>
</if>
<while cond=“”>
<action.../>
</while>
<for collection=“”>
<action.../>
</for>
系統參數容器:
參數可以以xml形式在運行時導出,格式如下:
<root>
<env><item .../></env>
<context><item.../></context>
<session><item.../></session>
<request><item.../></request>
</root>
每次請求都會帶著這個格式數據在各功能間穿梭,最終帶著結果返回。