我們使用SQL SELECT像這樣(登錄表JBPM_LOG必須在文件jbpm.cfg.xml中啓用):
select distinct *
from (select level,
l.date_,
pd1.name_ p1,
n1.name_ n1,
pd2.name_ p2,
n2.name_ n2
from juser.jbpm_log l,
juser.jbpm_node n1,
juser.jbpm_node n2,
juser.jbpm_processdefinition pd1,
juser.jbpm_processdefinition pd2,
juser.jbpm_token t,
juser.jbpm_processinstance pi,
juser.jbpm_token t2
where l.class_ = 'T'
and n1.id_ = l.sourcenode_
and n2.id_ = l.destinationnode_
and n1.processdefinition_ = pd1.id_
and n2.processdefinition_ = pd2.id_
and t.id_ = l.token_
and t.processinstance_ = pi.id_
and pi.superprocesstoken_ = t2.id_
connect by prior pi.id_ = t2.processinstance_
start with pi.id_ =
(select id_
from (select pi.id_
from juser.jbpm_processinstance pi,
juser.jbpm_token t
where pi.superprocesstoken_ = t.id_
connect by prior t.processinstance_ = pi.id_
start with pi.id_ = <<<ID_OF_PROCESSINSTANCE>>>
order by pi.id_)
where rownum = 1)
order by l.date_)
order by date_;
這將使用事先連接 - 我不知道任何東西這個工作除了oracle之外。
您可以發佈(作爲回答或評論)您的解決方案嗎? – Vanger 2009-08-14 20:32:24
@Vangar,我會寫一次,我可能會在下個星期寫下它。 – HeDinges 2009-08-15 16:27:00