Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
开发团队
Flowable Engine
提交
372cbf1e
F
Flowable Engine
项目概览
开发团队
/
Flowable Engine
通知
9
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
Flowable Engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
372cbf1e
编写于
8月 19, 2010
作者:
T
tombaeyens
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ACT-60 fixed some unit tests and added optimistic locking exception
上级
d73ebe5d
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
51 addition
and
13 deletion
+51
-13
modules/activiti-engine-examples/pom.xml
modules/activiti-engine-examples/pom.xml
+0
-3
modules/activiti-engine-examples/src/test/java/org/activiti/examples/taskforms/TaskFormsTest.java
...t/java/org/activiti/examples/taskforms/TaskFormsTest.java
+5
-1
modules/activiti-engine/pom.xml
modules/activiti-engine/pom.xml
+0
-1
modules/activiti-engine/src/main/java/org/activiti/engine/impl/persistence/db/DbRuntimeSession.java
...activiti/engine/impl/persistence/db/DbRuntimeSession.java
+4
-3
modules/activiti-engine/src/main/java/org/activiti/engine/impl/persistence/db/DbSqlSession.java
...org/activiti/engine/impl/persistence/db/DbSqlSession.java
+4
-1
modules/activiti-engine/src/main/java/org/activiti/engine/impl/persistence/db/OptimisticLockingException.java
...ngine/impl/persistence/db/OptimisticLockingException.java
+33
-0
modules/activiti-engine/src/main/resources/org/activiti/db/ibatis/job.mapping.xml
...src/main/resources/org/activiti/db/ibatis/job.mapping.xml
+4
-3
modules/activiti-engine/src/main/resources/org/activiti/db/ibatis/runtime.mapping.xml
...main/resources/org/activiti/db/ibatis/runtime.mapping.xml
+1
-1
未找到文件。
modules/activiti-engine-examples/pom.xml
浏览文件 @
372cbf1e
...
...
@@ -42,9 +42,6 @@
<artifactId>
maven-surefire-plugin
</artifactId>
<configuration>
<excludes>
<exclude>
**/BoundaryTimerEventTest.java
</exclude>
<exclude>
**/TaskFormsTest.java
</exclude>
<exclude>
**/TaskCandidateTest.java
</exclude>
<exclude>
**/FinancialReportProcessTest.java
</exclude>
</excludes>
</configuration>
...
...
modules/activiti-engine-examples/src/test/java/org/activiti/examples/taskforms/TaskFormsTest.java
浏览文件 @
372cbf1e
...
...
@@ -36,7 +36,11 @@ public class TaskFormsTest extends ProcessEngineTestCase {
identityService
.
deleteUser
(
"fozzie"
);
}
@Deployment
(
resources
=
{
"VacationRequest.bpmn20.xml"
,
"approve.form"
,
"request.form"
,
"adjustRequest.form"
})
@Deployment
(
resources
=
{
"org/activiti/examples/taskforms/VacationRequest.bpmn20.xml"
,
"org/activiti/examples/taskforms/approve.form"
,
"org/activiti/examples/taskforms/request.form"
,
"org/activiti/examples/taskforms/adjustRequest.form"
})
public
void
testTaskFormsWithVacationRequestProcess
()
{
// Get start form
...
...
modules/activiti-engine/pom.xml
浏览文件 @
372cbf1e
...
...
@@ -92,7 +92,6 @@
<configuration>
<excludes>
<exclude>
**/HistoricDataServiceImplTest.java
</exclude>
<exclude>
**/CallActivityAdvancedTest.java
</exclude>
</excludes>
</configuration>
</plugin>
...
...
modules/activiti-engine/src/main/java/org/activiti/engine/impl/persistence/db/DbRuntimeSession.java
浏览文件 @
372cbf1e
...
...
@@ -44,14 +44,15 @@ public class DbRuntimeSession implements Session, RuntimeSession {
this
.
dbSqlSession
=
CommandContext
.
getCurrent
().
getDbSqlSession
();
}
@SuppressWarnings
(
"unchecked"
)
public
void
deleteProcessInstance
(
String
processInstanceId
,
String
deleteReason
)
{
ExecutionEntity
execution
=
findExecutionById
(
processInstanceId
);
List
<
Task
>
tasks
=
new
TaskQueryImpl
()
List
<
Task
Entity
>
tasks
=
(
List
)
new
TaskQueryImpl
()
.
processInstanceId
(
processInstanceId
)
.
executeList
(
CommandContext
.
getCurrent
(),
null
);
for
(
Task
task:
tasks
)
{
dbSqlSession
.
delete
(
TaskEntity
.
class
,
task
.
getId
()
);
for
(
Task
Entity
task:
tasks
)
{
task
.
delete
(
);
}
execution
.
deleteCascade
(
deleteReason
);
...
...
modules/activiti-engine/src/main/java/org/activiti/engine/impl/persistence/db/DbSqlSession.java
浏览文件 @
372cbf1e
...
...
@@ -345,7 +345,10 @@ public class DbSqlSession implements Session {
throw
new
ActivitiException
(
"no update statement for "
+
updatedObject
.
getClass
()+
" in the ibatis mapping files"
);
}
log
.
fine
(
"updating: "
+
toString
(
updatedObject
)+
"]"
);
sqlSession
.
update
(
updateStatement
,
updatedObject
);
int
updatedRecords
=
sqlSession
.
update
(
updateStatement
,
updatedObject
);
if
(
updatedRecords
!=
1
)
{
throw
new
OptimisticLockingException
(
toString
(
updatedObject
)+
" was updated by another transaction concurrently"
);
}
}
updatedObjects
.
clear
();
}
...
...
modules/activiti-engine/src/main/java/org/activiti/engine/impl/persistence/db/OptimisticLockingException.java
0 → 100644
浏览文件 @
372cbf1e
/* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.activiti.engine.impl.persistence.db
;
import
org.activiti.engine.ActivitiException
;
/**
* @author Tom Baeyens
*/
public
class
OptimisticLockingException
extends
ActivitiException
{
private
static
final
long
serialVersionUID
=
1L
;
public
OptimisticLockingException
(
String
message
,
Throwable
cause
)
{
super
(
message
,
cause
);
}
public
OptimisticLockingException
(
String
message
)
{
super
(
message
);
}
}
modules/activiti-engine/src/main/resources/org/activiti/db/ibatis/job.mapping.xml
浏览文件 @
372cbf1e
...
...
@@ -14,6 +14,7 @@
<resultMap
id=
"jobResultMap"
type=
"org.activiti.engine.impl.persistence.runtime.JobEntity"
>
<id
property=
"id"
column=
"ID_"
jdbcType=
"VARCHAR"
/>
<result
property=
"revision"
column=
"REV_"
jdbcType=
"INTEGER"
/>
<result
property=
"lockOwner"
column=
"LOCK_OWNER_"
jdbcType=
"VARCHAR"
/>
<result
property=
"lockExpirationTime"
column=
"LOCK_EXP_TIME_"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"exclusive"
column=
"EXCLUSIVE_"
jdbcType=
"BOOLEAN"
/>
...
...
@@ -135,7 +136,7 @@
<update
id=
"updateTimer"
parameterType=
"org.activiti.engine.impl.persistence.runtime.TimerEntity"
>
update ACT_JOB
<set>
REV= #{revisionNext, jdbcType=INTEGER},
REV
_
= #{revisionNext, jdbcType=INTEGER},
LOCK_EXP_TIME_ = #{lockExpirationTime, jdbcType=TIMESTAMP},
LOCK_OWNER_ = #{lockOwner, jdbcType=VARCHAR},
RETRIES_ = #{retries, jdbcType=INTEGER},
...
...
@@ -143,7 +144,7 @@
DUEDATE_ = #{duedate, jdbcType=TIMESTAMP}
</set>
where ID_= #{id, jdbcType=VARCHAR}
and REV = #{revision, jdbcType=INTEGER}
and REV
_
= #{revision, jdbcType=INTEGER}
</update>
<!-- TIMER SELECT -->
...
...
@@ -211,7 +212,7 @@
EXCEPTION_ = #{exception, jdbcType=VARCHAR}
</set>
where ID_= #{id, jdbcType=VARCHAR}
and REV = #{revision, jdbcType=INTEGER}
and REV
_
= #{revision, jdbcType=INTEGER}
</update>
</mapper>
modules/activiti-engine/src/main/resources/org/activiti/db/ibatis/runtime.mapping.xml
浏览文件 @
372cbf1e
...
...
@@ -69,7 +69,7 @@
</select>
<select
id=
"selectExecutionsByQueryCriteria"
parameterType=
"org.activiti.engine.impl.ExecutionQueryImpl"
resultMap=
"executionResultMap"
>
select *
select
E.
*
<include
refid=
"selectExecutionsByQueryCriteriaSql"
/>
<if
test=
"orderBy != null"
>
order by #{orderBy}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录