日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 >

JBPM executionService.deleteProcessInstanceCascade(id)报错

發(fā)布時間:2025/7/25 50 豆豆
生活随笔 收集整理的這篇文章主要介紹了 JBPM executionService.deleteProcessInstanceCascade(id)报错 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

JBPM版本4.3?

?


代碼:?

?

。。。
ExecutionService executionService
= processEngine.getExecutionService();
ProcessInstance pi
= executionService.startProcessInstanceByKey("workflowXX");
String exId
= pi.findActiveExecutionIn("XXState").getId();
executionService.signalExecutionById(exId);
//拋出ORA-01722: 無效數(shù)字"異常
。。。

?

?

?

?

跟蹤后發(fā)現(xiàn)時在執(zhí)行jbpm.execution.hbm.xml文件中的命名查詢findExecutionById時引發(fā)的異常,?

最終生成的sql中將execution.id映射成了execution.dbId(生成sql的片段:where executioni0_.DBID_=?)?

由于dbId是long型,而id是String型,所以導(dǎo)致了該異常。?

?

<query name="findExecutionById">
<![CDATA[
select execution
from org.jbpm.pvm.internal.model.ExecutionImpl as execution
where execution.id = :id
]]>
</query>
<class name="ExecutionImpl"
table
="JBPM4_EXECUTION"
discriminator-value
="pvm">
<id name="dbid" column="DBID_">
<generator class="assigned" />
</id>
<discriminator><column name="CLASS_" /></discriminator>
<version name="dbversion" column="DBVERSION_" />

<property name="activityName" column="ACTIVITYNAME_" />
<property name="processDefinitionId" column="PROCDEFID_" />
<property name="hasVariables" column="HASVARS_" />
<map name="variables"
cascade
="all-delete-orphan">
<key foreign-key="FK_VAR_EXECUTION">
<column name="EXECUTION_" index="IDX_VAR_EXECUTION"/>
</key>
<map-key type="string" column="KEY_" />
<one-to-many class="org.jbpm.pvm.internal.type.Variable" />
</map>
<map name="systemVariables"
cascade
="all-delete-orphan">
<key foreign-key="FK_VAR_EXESYS">
<column name="EXESYS_" index="IDX_VAR_EXESYS"/>
</key>
<map-key type="string" column="KEY_" />
<one-to-many class="org.jbpm.pvm.internal.type.Variable" />
</map>


<property name="name" column="NAME_" />
<property name="key" column="KEY_" />
<property name="id" column="ID_" unique="true" />
試過刪除對id屬性的映射,發(fā)現(xiàn)都不會報錯~~
<property name="state" column="STATE_" />
<property name="suspendHistoryState" column="SUSPHISTSTATE_" />
<property name="priority" column="PRIORITY_" />
<property name="historyActivityInstanceDbid" column="HISACTINST_" />
<list name="executions"
cascade
="all-delete-orphan"
inverse
="false"
lazy
="false">
<key column="PARENT_" foreign-key="FK_EXEC_PARENT" />
<list-index column="PARENT_IDX_" />
<one-to-many class="ExecutionImpl" />
</list>

<map name="swimlanes"
cascade
="all-delete-orphan">
<key foreign-key="FK_SWIMLANE_EXEC">
<column name="EXECUTION_" index="IDX_SWIMLANE_EXEC"/>
</key>
<map-key type="string" column="NAME_" />
<one-to-many class="org.jbpm.pvm.internal.task.SwimlaneImpl" />
</map>
<many-to-one name="parent"
column
="PARENT_"
class
="ExecutionImpl"
foreign-key
="FK_EXEC_PARENT"
index
="IDX_EXEC_PARENT"
lazy
="false" />
<many-to-one name="processInstance"
class
="ExecutionImpl"
column
="INSTANCE_"
foreign-key
="FK_EXEC_INSTANCE"
index
="IDX_EXEC_INSTANCE"
lazy
="false" />
<many-to-one name="superProcessExecution"
column
="SUPEREXEC_"
class
="ExecutionImpl"
foreign-key
="FK_EXEC_SUPEREXEC"
index
="IDX_EXEC_SUPEREXEC" />

<many-to-one name="subProcessInstance"
column
="SUBPROCINST_"
class
="ExecutionImpl"
foreign-key
="FK_EXEC_SUBPI"
index
="IDX_EXEC_SUBPI" />

</class>

?

這個問題是由于hibernate版本的問題導(dǎo)致的,使用jbpm包里面自帶的hibernate后就沒有問題了

轉(zhuǎn)載于:https://www.cnblogs.com/gaoyoubo/articles/1837757.html

總結(jié)

以上是生活随笔為你收集整理的JBPM executionService.deleteProcessInstanceCascade(id)报错的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。