Files
2021-01-12 23:30:48 +08:00

57 lines
1.6 KiB
XML

<?xml version='1.0' encoding='UTF-8'?>
<Root>
<!--订阅-->
<!--
必需输入域:Message|subscriber|rule|key|
选择输入域:
正常输出域:MSG_TYP|RSP_CD|
出错输出域:RSP_CD|
-->
<Transaction code="Subscribe">
<DynSentence name="query1">
<Sentence>select name from pubmsginf where name='%s'</Sentence>
<Fields>message|</Fields>
</DynSentence>
<DynSentence name="query2">
<Sentence>
select RCV_TYP,Addr,Para from pubsuber where name='%s'
</Sentence>
<Fields>subscriber|</Fields>
</DynSentence>
<FlowCtrl>
<!--参数检查
所订阅消息检查 (检查消息定义表中是否存在)
-->
<Exec func="PUB:ReadRecord" error="IGNORE">
<Arg name="SqlCmd" value="query1" />
</Exec>
<If condition="~RetCod=2">
<Set>MSG_TYP=E</Set>
<Return />
</If>
<Quote name="ErrorProc" />
<Exec func="PUB:ReadRecord" error="IGNORE">
<Arg name="SqlCmd" value="query2" />
</Exec>
<If condition="~RetCod=2">
<Set>MSG_TYP=E</Set>
<Return />
</If>
<Quote name="ErrorProc" />
<!--If condition="IS_EQUAL_STRING($Rule,1)=1">
<Set>Key=$Subject</Set>
</If>
<Else>
<Set>Key=$Class</Set>
</Else-->
<!--登记订阅信息-->
<Exec func="PUB:InsertRecord" error="IGNORE">
<Arg name="TblNam" value="pubsubinf" />
</Exec>
<Quote name="ErrorProc" />
</FlowCtrl>
</Transaction>
</Root>