热搜
您的位置:首页 >> 科技

Tempo研究之FDS

2019年11月05日 栏目:科技

在往下说之前,有必要阐述两个FDS内部的概念:User Process 和Workflow Process。User Process其实代表

在往下说之前,有必要阐述两个FDS内部的概念:User Process 和Workflow Process。User Process其实代表是bpel engine所处理的process,而Workflow Process则代表Tempo这边所关注的people task的处理。——这两个概念刚开始时令人混淆的,至少我在一开始跟踪代码的时候是理解反了。

当Intialo BPM engine(内部apache ode bpel engine)在启动一个process的时候,如果碰到一个People Activity,则会向Tempo FDS发送一个create task的请求(UP-->WP)。当Task执行人完成task,并提交的时候,FDS向User Process发出notifyTaskCompletion请求(WP-->UP)。这中间tempo内部各个组件之间的调用关系和执行顺序,可以参考http://www.intalio.org/confluence/display/TEMPO/Creating+and+Completing+a+Task 这上面的详细内容。

在FDS内部的实现逻辑大约是这个样子的:

FDS来回所对应的都是http请求和响应,所以消息都是由FormDispatcherServlet这个serlvet接收并处理的。

如果FDS接收的请求url是以 /fds/workflow/ib4p结尾的,则表示是WP-->UP的过程;否则是UP-->WP的过程。

建议在 Intalio\Server\var\log目录下的 server-log4j.properties(这是一个log4j的配置文件)中,增加对 org.intalio.tempo包结构的DEBUG日志信息输出,可以在 D:\Intalio\Server\var\log\geronimo.log 跟踪输出,这样可以查看来回的request/response message的xml消息格式,以及详细的处理过程。

Tempo FDS本身内部实现并不是很复杂,逻辑比较简单,主要是消息的来回转换。

一下是一个complete task处理的后台日志,方便看看具体的实现逻辑:

19:52:45,937DEBUG[org.intalio.tempo.workflow.wds.servlets.WDSServlet][SocketListener2-22]doGetrequest=org.mortbay.jetty.servlet.JSR154Filter$Request@10057d3

19:52:45,937DEBUG[org.intalio.tempo.workflow.wds.servlets.WDSServlet][SocketListener2-22]ResourceURI:'PeopleActivity/PA.xform.xsd'

19:52:45,937DEBUG[org.intalio.tempo.workflow.wds.servlets.WDSServlet][SocketListener2-22]Participanttoken:''

19:52:45,937DEBUG[org.intalio.tempo.workflow.wds.servlets.WDSServlet][SocketListener2-22]Retrievingtheitem.

19:52:45,937DEBUG[org.intalio.tempo.workflow.wds.servlets.WDSServlet][SocketListener2-22]Sendingthedata..

19:52:45,937DEBUG[org.intalio.tempo.workflow.wds.servlets.WDSServlet][SocketListener2-22]Itemretrieved&sentOK.

19:52:46,828DEBUG[org.intalio.tempo.workflow.auth.n3.N3AuthProvider][SocketListener2-19]Token'VE9LRU4mJnVzZXI9PWludGFsaW9cYWRtaW4mJmlzc3VlZD09MTE5NTY0MzM1MTczNCYmcm9sZXM9PWludGFsaW9ccHJvY2Vzc2FkbWluaXN0cmF0b3IsZXhhbXBsZXNcZW1wbG95ZWUsaW50YWxpb1xwcm9jZXNzbWFuYWdlcixleGFtcGxlc1xtYW5hZ2VyJiZmdWxsTmFtZT09QWRtaW5pbmlzdHJhdG9yJiZlbWFpbD09YWRtaW5AZXhhbXBsZS5jb20mJm5vbmNlPT0tMzU0NDYwNjI1MzA3NTkxMzMwMyYmdGltZXN0YW1wPT0xMTk1NjQzMzUxNzM0JiZkaWdlc3Q9PW92OXlVbUNyTGgvcXZQajdNdXZDZkNWMU9DTT0mJiYmVE9LRU4='isresolvedto[Lorg.intalio.tempo.security.Property;@fae917

19:52:46,828DEBUG[org.intalio.tempo.workflow.auth.n3.N3AuthProvider][SocketListener2-19]Userintalioadminwithrolesintalioprocessadministrator,examplesemployee,intalioprocessmanager,examplesmanager

19:52:46,828DEBUG[org.intalio.tempo.workflow.tms.server.dao.JDBCTaskDAOConnectionFactory][SocketListener2-19]GettingconnectiontoTMSDB

19:52:46,828DEBUG[org.intalio.tempo.workflow.tms.server.dao.JDBCTaskDAOConnection][SocketListener2-19]AbouttoretrieveWorkflowTaskwithID1228262541d53628:-5bad7914:11661f87cf4:-7fab192.168.67.2403670017

19:52:46,843DEBUG[org.intalio.tempo.workflow.tms.server.dao.JDBCTaskDAOConnection][SocketListener2-19]WorkflowTask1228262541d53628:-5bad7914:11661f87cf4:-7fab192.168.67.2403670017hasbeenreadfromTMSDB

19:52:46,843DEBUG[org.intalio.tempo.workflow.tms.server.dao.JDBCTaskDAOConnection][SocketListener2-19]Abouttoretrieveuserownersfortask1228262541d53628:-5bad7914:11661f87cf4:-7fab192.168.67.2403670017

19:52:46,843DEBUG[org.intalio.tempo.workflow.tms.server.dao.JDBCTaskDAOConnection][SocketListener2-19]UserOwner:intalioadmin

19:52:46,843DEBUG[org.intalio.tempo.workflow.tms.server.dao.JDBCTaskDAOConnection][SocketListener2-19]Abouttoretrieveroleownersfortask1228262541d53628:-5bad7914:11661f87cf4:-7fab192.168.67.2403670017

19:52:46,843DEBUG[org.intalio.tempo.workflow.tms.server.dao.JDBCTaskDAOConnection][SocketListener2-19]Abouttoretrieveattachmentsfortask1228262541d53628:-5bad7914:11661f87cf4:-7fab192.168.67.2403670017

19:52:46,843DEBUG[org.intalio.tempo.workflow.auth.BaseRestrictedEntity][SocketListener2-19]isAvailableTocredentials:UserRoles{user=intalioadmin,roles=[intalioprocessadministrator,examplesemployee,intalioprocessmanager,examplesmanager]}

19:52:46,843DEBUG[org.intalio.tempo.workflow.auth.BaseRestrictedEntity][SocketListener2-19]isAvailableTousers:[intalioadmin]

19:52:46,843DEBUG[org.intalio.tempo.workflow.auth.BaseRestrictedEntity][SocketListener2-19]isAvailableToroles:[]

19:52:46,843DEBUG[org.intalio.tempo.workflow.tms.server.dao.JDBCTaskDAOConnection][SocketListener2-19]AttempttodeleteWorkflowTask1228262541d53628:-5bad7914:11661f87cf4:-7fab192.168.67.2403670017

19:52:46,875DEBUG[org.intalio.tempo.workflow.tms.server.dao.JDBCTaskDAOConnection][SocketListener2-19]XMLparsedtostring:

<?xmlversion="1.0"encoding="UTF-8"?><axis2ns3:inputxmlns="http://example.com/PA/xform"xmlns:axis2ns3="http://example.com/PA/xform">

<username>

</username>

</axis2ns3:input>

19:52:46,875DEBUG[org.intalio.tempo.workflow.tms.server.dao.JDBCTaskDAOConnection][SocketListener2-19]XMLparsedtostring:

<?xmlversion="1.0"encoding="UTF-8"?><axis2ns4:outputxmlns="http://example.com/PA/xform"xmlns:axis2ns4="http://example.com/PA/xform"xmlns:fe="http://example.com/PA/xform"participantToken="VE9LRU4mJnVzZXI9PWludGFsaW9cYWRtaW4mJmlzc3VlZD09MTE5NTY0MzM1MTczNCYmcm9sZXM9PWludGFsaW9ccHJvY2Vzc2FkbWluaXN0cmF0b3IsZXhhbXBsZXNcZW1wbG95ZWUsaW50YWxpb1xwcm9jZXNzbWFuYWdlcixleGFtcGxlc1xtYW5hZ2VyJiZmdWxsTmFtZT09QWRtaW5pbmlzdHJhdG9yJiZlbWFpbD09YWRtaW5AZXhhbXBsZS5jb20mJm5vbmNlPT0tMzU0NDYwNjI1MzA3NTkxMzMwMyYmdGltZXN0YW1wPT0xMTk1NjQzMzUxNzM0JiZkaWdlc3Q9PW92OXlVbUNyTGgvcXZQajdNdXZDZkNWMU9DTT0mJiYmVE9LRU4="taskId="1228262541d53628:-5bad7914:11661f87cf4:-7fab192.168.67.2403670017"user="intalioadmin"><username>w1</username></axis2ns4:output>

19:52:46,875DEBUG[org.intalio.tempo.workflow.tms.server.dao.JDBCTaskDAOConnection][SocketListener2-19]WorkflowPATask1228262541d53628:-5bad7914:11661f87cf4:-7fab192.168.67.2403670017isabouttoberegisteredinTMSDB

19:52:46,875DEBUG[org.intalio.tempo.workflow.tms.server.dao.JDBCTaskDAOConnection][SocketListener2-19]WorkflowPATask1228262541d53628:-5bad7914:11661f87cf4:-7fab192.168.67.2403670017registeredwithID=17

19:52:46,890DEBUG[org.intalio.tempo.workflow.tms.server.dao.JDBCTaskDAOConnection][SocketListener2-19]andUserOwner:intalioadmin

19:52:46,921DEBUG[org.intalio.tempo.workflow.tms.server.dao.JDBCTaskDAOConnection][SocketListener2-19]committed

19:52:46,921DEBUG[org.intalio.tempo.workflow.tms.server.TMSServer][SocketListener2-19]intalioadminhassetoutputandcompletedWorkflowTaskWorkflowTask1228262541d53628:-5bad7914:11661f87cf4:-7fab192.168.67.2403670017

19:52:46,921DEBUG[org.intalio.tempo.workflow.tms.server.dao.JDBCTaskDAOConnection][SocketListener2-19]Closedconnection

19:52:47,421DEBUG[org.intalio.tempo.workflow.fds.FormDispatcherServlet][SocketListener2-19]RequestURI:/ib4p

19:52:47,421DEBUG[org.intalio.tempo.workflow.fds.FormDispatcherServlet][SocketListener2-19]SOAPAction:"notifyTaskCompletion"

19:52:47,671INFO[org.intalio.tempo.workflow.fds.FormDispatcherServlet][SocketListener2-19]WorkflowProcesses->UserProcess

19:52:47,671DEBUG[org.intalio.tempo.workflow.fds.FormDispatcherServlet][SocketListener2-19]ParsingtherequestfromtheWorkflowProcesses.

19:52:47,687DEBUG[org.intalio.tempo.workflow.fds.FormDispatcherServlet][SocketListener2-19]Workflowprocessrequest:

<?xmlversion="1.0"?>

<soapenv:Envelopexmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header><addr:Toxmlns:addr="http://www.w3.org/2005/08/addressing">http://localhost:8080/fds/workflow/ib4p</addr:To><addr:Actionxmlns:addr="http://www.w3.org/2005/08/addressing">notifyTaskCompletion</addr:Action><intalio:sessionxmlns:intalio="http://www.intalio.com/type/session">573e4478-0f4e-4251-9d45-f870dadf4e80-2</intalio:session><intalio:callbackxmlns:intalio="http://www.intalio.com/type/session"><addr:Addressxmlns:addr="http://www.w3.org/2005/08/addressing">http://localhost:8080/ode/processes/workflow/ib4p</addr:Address><intalio:session>573e4478-0f4e-4251-9d45-f870dadf4e80-3</intalio:session></intalio:callback></soapenv:Header><soapenv:Body><axis2ns5:notifyTaskCompletionRequestxmlns="http://www.intalio.com/bpms/workflow/ib4p_20051115"xmlns:axis2ns5="http://www.intalio.com/bpms/workflow/ib4p_20051115"xmlns:b4p="http://www.intalio.com/bpms/workflow/ib4p_20051115">

<b4p:taskMetaData>

<taskId>1228262541d53628:-5bad7914:11661f87cf4:-7fab192.168.67.2403670017</taskId>

<processId>

</processId>

<userProcessEndpoint>http://localhost:8080/ode/processes/PeopleActivity/PA/PA/User/WFmagic_EDLpiJdCEdy9R-hEBkLEtg</userProcessEndpoint>

<userProcessNamespaceURI>http://example.com/PA/xform</userProcessNamespaceURI>

<userProcessCompleteSOAPAction>http://example.com/PA/xform/Process/notifyTaskCompletion</userProcessCompleteSOAPAction>

<session>573e4478-0f4e-4251-9d45-f870dadf4e80-2</session>

</b4p:taskMetaData>

<taskOutput><axis2ns6:outputxmlns="http://example.com/PA/xform"xmlns:axis2ns6="http://example.com/PA/xform"xmlns:fe="http://example.com/PA/xform"participantToken="VE9LRU4mJnVzZXI9PWludGFsaW9cYWRtaW4mJmlzc3VlZD09MTE5NTY0MzM1MTczNCYmcm9sZXM9PWludGFsaW9ccHJvY2Vzc2FkbWluaXN0cmF0b3IsZXhhbXBsZXNcZW1wbG95ZWUsaW50YWxpb1xwcm9jZXNzbWFuYWdlcixleGFtcGxlc1xtYW5hZ2VyJiZmdWxsTmFtZT09QWRtaW5pbmlzdHJhdG9yJiZlbWFpbD09YWRtaW5AZXhhbXBsZS5jb20mJm5vbmNlPT0tMzU0NDYwNjI1MzA3NTkxMzMwMyYmdGltZXN0YW1wPT0xMTk1NjQzMzUxNzM0JiZkaWdlc3Q9PW92OXlVbUNyTGgvcXZQajdNdXZDZkNWMU9DTT0mJiYmVE9LRU4="taskId="1228262541d53628:-5bad7914:11661f87cf4:-7fab192.168.67.2403670017"user="intalioadmin"><username>w1</username></axis2ns6:output></taskOutput>

<b4p:status>

OK

</b4p:status>

</axis2ns5:notifyTaskCompletionRequest></soapenv:Body></soapenv:Envelope>

19:52:47,687DEBUG[org.intalio.tempo.workflow.fds.FormDispatcherServlet][SocketListener2-19]Convertingtherequesttotheuserprocessformat.

19:52:47,718DEBUG[org.intalio.tempo.workflow.fds.FormDispatcherServlet][SocketListener2-19]Workflowprocessrequest(afterconversion):

<?xmlversion="1.0"?>

<soapenv:Envelopexmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header><addr:Toxmlns:addr="http://www.w3.org/2005/08/addressing">http://localhost:8080/ode/processes/PeopleActivity/PA/PA/User/WFmagic_EDLpiJdCEdy9R-hEBkLEtg</addr:To><addr:Actionxmlns:addr="http://www.w3.org/2005/08/addressing">http://example.com/PA/xform/Process/notifyTaskCompletion</addr:Action><intalio:sessionxmlns:intalio="http://www.intalio.com/type/session">573e4478-0f4e-4251-9d45-f870dadf4e80-2</intalio:session><sessionxmlns="http://www.intalio.com/type/session">573e4478-0f4e-4251-9d45-f870dadf4e80-2</session></soapenv:Header><soapenv:Body><userProcess:notifyTaskCompletionRequestxmlns="http://www.intalio.com/bpms/workflow/ib4p_20051115"xmlns:b4p="http://www.intalio.com/bpms/workflow/ib4p_20051115"xmlns:userProcess="http://example.com/PA/xform">

<userProcess:taskMetaData>

<userProcess:taskId>1228262541d53628:-5bad7914:11661f87cf4:-7fab192.168.67.2403670017</userProcess:taskId>

<userProcess:processId>

</userProcess:processId>

<userProcess:userProcessEndpoint>http://localhost:8080/ode/processes/PeopleActivity/PA/PA/User/WFmagic_EDLpiJdCEdy9R-hEBkLEtg</userProcess:userProcessEndpoint>

<userProcess:userProcessNamespaceURI>http://example.com/PA/xform</userProcess:userProcessNamespaceURI>

<userProcess:userProcessCompleteSOAPAction>http://example.com/PA/xform/Process/notifyTaskCompletion</userProcess:userProcessCompleteSOAPAction>

<userProcess:session>573e4478-0f4e-4251-9d45-f870dadf4e80-2</userProcess:session>

</userProcess:taskMetaData>

<userProcess:taskOutput><axis2ns6:outputxmlns="http://example.com/PA/xform"xmlns:axis2ns6="http://example.com/PA/xform"xmlns:fe="http://example.com/PA/xform"participantToken="VE9LRU4mJnVzZXI9PWludGFsaW9cYWRtaW4mJmlzc3VlZD09MTE5NTY0MzM1MTczNCYmcm9sZXM9PWludGFsaW9ccHJvY2Vzc2FkbWluaXN0cmF0b3IsZXhhbXBsZXNcZW1wbG95ZWUsaW50YWxpb1xwcm9jZXNzbWFuYWdlcixleGFtcGxlc1xtYW5hZ2VyJiZmdWxsTmFtZT09QWRtaW5pbmlzdHJhdG9yJiZlbWFpbD09YWRtaW5AZXhhbXBsZS5jb20mJm5vbmNlPT0tMzU0NDYwNjI1MzA3NTkxMzMwMyYmdGltZXN0YW1wPT0xMTk1NjQzMzUxNzM0JiZkaWdlc3Q9PW92OXlVbUNyTGgvcXZQajdNdXZDZkNWMU9DTT0mJiYmVE9LRU4="taskId="1228262541d53628:-5bad7914:11661f87cf4:-7fab192.168.67.2403670017"user="intalioadmin"><username>w1</username></axis2ns6:output></userProcess:taskOutput>

<userProcess:status>

OK

</userProcess:status>

</userProcess:notifyTaskCompletionRequest></soapenv:Body></soapenv:Envelope>

19:52:47,718DEBUG[org.intalio.tempo.workflow.fds.FormDispatcherServlet][SocketListener2-19]CompletionSOAPAction:'http://example.com/PA/xform/Process/notifyTaskCompletion'

19:52:47,718DEBUG[org.intalio.tempo.workflow.fds.FormDispatcherServlet][SocketListener2-19]Sendingtherequesttotheuserprocessandgettingtheresponse

19:52:48,921DEBUG[org.intalio.tempo.workflow.fds.FormDispatcherServlet][SocketListener2-19]Userprocessresponse:

<?xmlversion="1.0"?>

<soapenv:Envelopexmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><axis2ns7:responsexmlns="http://example.com/PA/xform"xmlns:axis2ns7="http://example.com/PA/xform"xmlns:xform="http://example.com/PA/xform">

<xform:isChainedAfter>

</xform:isChainedAfter>

<xform:taskMetaData>

<xform:taskId>

</xform:taskId>

<xform:taskState>

</xform:taskState>

<xform:taskType>

</xform:taskType>

<xform:description>

</xform:description>

<xform:processId>

</xform:processId>

<xform:creationDate>

</xform:creationDate>

<xform:userOwner>

</xform:userOwner>

<xform:roleOwner>

</xform:roleOwner>

<xform:claimAction>

<xform:user>

</xform:user>

<xform:role>

</xform:role>

</xform:claimAction>

<xform:revokeAction>

<xform:user>

</xform:user>

<xform:role>

</xform:role>

</xform:revokeAction>

<xform:saveAction>

<xform:user>

</xform:user>

<xform:role>

</xform:role>

</xform:saveAction>

<xform:completeAction>

<xform:user>

</xform:user>

<xform:role>

</xform:role>

</xform:completeAction>

<xform:formUrl>

</xform:formUrl>

<xform:failureCode>

</xform:failureCode>

<xform:failureReason>

</xform:failureReason>

<xform:userProcessCompleteSOAPAction>

</xform:userProcessCompleteSOAPAction>

<xform:isChainedBefore>

</xform:isChainedBefore>

<xform:previousTaskId>

</xform:previousTaskId>

<xform:userProcessEndpoint>

</xform:userProcessEndpoint>

<xform:userProcessNamespaceURI>

</xform:userProcessNamespaceURI>

</xform:taskMetaData>

<xform:status>OK</xform:status>

<xform:errorCode>

</xform:errorCode>

<xform:errorReason>

</xform:errorReason>

</axis2ns7:response></soapenv:Body></soapenv:Envelope>

19:52:48,921DEBUG[org.intalio.tempo.workflow.fds.FormDispatcherServlet][SocketListener2-19]ConvertingtheresponsetotheWorkflowProcessesformat.

19:52:48,921DEBUG[org.intalio.tempo.workflow.fds.core.UserProcessMessageConvertor][SocketListener2-19]ConvertedSOAPAction:null

19:52:48,921DEBUG[org.intalio.tempo.workflow.fds.core.UserProcessMessageConvertor][SocketListener2-19]Didnotfindaddr:ToinSOAPheader

19:52:48,921DEBUG[org.intalio.tempo.workflow.fds.core.UserProcessMessageConvertor][SocketListener2-19]Didnotfindintalio:callback/addr:AddressinSOAPheader

19:52:48,937DEBUG[org.intalio.tempo.workflow.fds.FormDispatcherServlet][SocketListener2-19]SendingtheconvertedresponsebacktotheWorkflowProcesses.

19:52:48,937DEBUG[org.intalio.tempo.workflow.fds.FormDispatcherServlet][SocketListener2-19]Userprocessresponse(afterconversion)

<?xmlversion="1.0"?>

<soapenv:Envelopexmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ib4p:responsexmlns="http://example.com/PA/xform"xmlns:ib4p="http://www.intalio.com/bpms/workflow/ib4p_20051115"xmlns:xform="http://example.com/PA/xform">

<ib4p:isChainedAfter>

</ib4p:isChainedAfter>

<ib4p:taskMetaData>

<ib4p:taskId>

</ib4p:taskId>

<ib4p:taskState>

</ib4p:taskState>

<ib4p:taskType>

</ib4p:taskType>

<ib4p:description>

</ib4p:description>

<ib4p:processId>

</ib4p:processId>

<ib4p:creationDate>

</ib4p:creationDate>

<ib4p:userOwner>

</ib4p:userOwner>

<ib4p:roleOwner>

</ib4p:roleOwner>

<ib4p:claimAction>

<ib4p:user>

</ib4p:user>

<ib4p:role>

</ib4p:role>

</ib4p:claimAction>

<ib4p:revokeAction>

<ib4p:user>

</ib4p:user>

<ib4p:role>

</ib4p:role>

</ib4p:revokeAction>

<ib4p:saveAction>

<ib4p:user>

</ib4p:user>

<ib4p:role>

</ib4p:role>

</ib4p:saveAction>

<ib4p:completeAction>

<ib4p:user>

</ib4p:user>

<ib4p:role>

</ib4p:role>

</ib4p:completeAction>

<ib4p:formUrl>

</ib4p:formUrl>

<ib4p:failureCode>

</ib4p:failureCode>

<ib4p:failureReason>

</ib4p:failureReason>

<ib4p:userProcessCompleteSOAPAction>

</ib4p:userProcessCompleteSOAPAction>

<ib4p:isChainedBefore>

</ib4p:isChainedBefore>

<ib4p:previousTaskId>

</ib4p:previousTaskId>

<ib4p:userProcessEndpoint>

</ib4p:userProcessEndpoint>

<ib4p:userProcessNamespaceURI>

</ib4p:userProcessNamespaceURI>

</ib4p:taskMetaData>

<ib4p:status>OK</ib4p:status>

<ib4p:errorCode>

</ib4p:errorCode>

<ib4p:errorReason>

</ib4p:errorReason>

</ib4p:response></soapenv:Body></soapenv:Envelope>

19:52:48,937INFO[org.intalio.tempo.workflow.fds.FormDispatcherServlet][SocketListener2-19]RequestprocessedOK.

查看本文来源

贵阳欧亚男科医院专家
昆明普瑞医院雷鸣
贵州癫痫病医院排名
临沂治牛皮鲜好的医院
聊城性病医院
  • 友情链接
  • 合作媒体