Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
开发团队
Flowable Engine
提交
70abe677
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,发现更多精彩内容 >>
提交
70abe677
编写于
8月 19, 2010
作者:
T
tombaeyens
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ACT-60 fixing spring integration and added resource name to process definition
上级
d8512805
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
190 addition
and
66 deletion
+190
-66
modules/activiti-engine-test-cfg/src/test/java/org/activiti/test/cfg/spring/SpringTest.java
...rc/test/java/org/activiti/test/cfg/spring/SpringTest.java
+24
-39
modules/activiti-engine-test-cfg/src/test/java/org/activiti/test/db/ProcessEngineInitializationTest.java
...org/activiti/test/db/ProcessEngineInitializationTest.java
+1
-1
modules/activiti-engine/src/main/java/org/activiti/engine/RuntimeService.java
...ine/src/main/java/org/activiti/engine/RuntimeService.java
+5
-0
modules/activiti-engine/src/main/java/org/activiti/engine/impl/RuntimeServiceImpl.java
...ain/java/org/activiti/engine/impl/RuntimeServiceImpl.java
+6
-0
modules/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/UserTaskActivity.java
.../java/org/activiti/engine/impl/bpmn/UserTaskActivity.java
+1
-1
modules/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/deployer/BpmnDeployer.java
.../org/activiti/engine/impl/bpmn/deployer/BpmnDeployer.java
+4
-1
modules/activiti-engine/src/main/java/org/activiti/engine/impl/cmd/FindActiveActivityIdsCmd.java
...rg/activiti/engine/impl/cmd/FindActiveActivityIdsCmd.java
+46
-0
modules/activiti-engine/src/main/java/org/activiti/engine/impl/el/ExpressionManager.java
...n/java/org/activiti/engine/impl/el/ExpressionManager.java
+6
-6
modules/activiti-engine/src/main/java/org/activiti/engine/impl/persistence/db/DbRepositorySession.java
...iviti/engine/impl/persistence/db/DbRepositorySession.java
+6
-1
modules/activiti-engine/src/main/java/org/activiti/engine/impl/persistence/repository/ProcessDefinitionEntity.java
.../impl/persistence/repository/ProcessDefinitionEntity.java
+9
-0
modules/activiti-engine/src/main/java/org/activiti/engine/test/ProcessEngineTestCase.java
.../java/org/activiti/engine/test/ProcessEngineTestCase.java
+26
-11
modules/activiti-engine/src/main/java/org/activiti/engine/test/SpringProcessEngineTestCase.java
...org/activiti/engine/test/SpringProcessEngineTestCase.java
+47
-0
modules/activiti-engine/src/main/resources/org/activiti/db/create/activiti.h2.create.sql
...n/resources/org/activiti/db/create/activiti.h2.create.sql
+1
-0
modules/activiti-engine/src/main/resources/org/activiti/db/ibatis/repository.mapping.xml
...n/resources/org/activiti/db/ibatis/repository.mapping.xml
+4
-2
modules/activiti-engine/src/test/java/org/activiti/engine/test/bpmn/callactivity/CallActivityAdvancedTest.java
...gine/test/bpmn/callactivity/CallActivityAdvancedTest.java
+2
-2
modules/activiti-engine/src/test/java/org/activiti/impl/interceptor/CommandContextTest.java
...ava/org/activiti/impl/interceptor/CommandContextTest.java
+2
-2
未找到文件。
modules/activiti-engine-test-cfg/src/test/java/org/activiti/test/cfg/spring/SpringTest.java
浏览文件 @
70abe677
...
...
@@ -12,51 +12,36 @@
*/
package
org.activiti.test.cfg.spring
;
import
org.junit.runner.RunWith
;
import
org.springframework.test.context.ContextConfiguration
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
java.util.List
;
import
org.activiti.engine.ProcessInstance
;
import
org.activiti.engine.Task
;
import
org.activiti.engine.test.ProcessEngineTestCase
;
/**
* @author Tom Baeyens
* @author Dave Syer
*/
@ContextConfiguration
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
public
class
SpringTest
{
public
class
SpringTest
extends
ProcessEngineTestCase
{
public
SpringTest
()
{
setSpringApplicationContextConfigurationResource
(
"org/activiti/test/cfg/spring/SpringTest-context.xml"
);
}
public
void
testProcessExecutionWithTaskAssignedFromExpression
()
{
// UserBean userBean = (UserBean) getSpringBean("userBean");
int
before
=
processEngine
.
getTaskService
().
findAssignedTasks
(
"kermit"
).
size
();
ProcessInstance
processInstance
=
runtimeService
.
startProcessInstanceByKey
(
"taskAssigneeExpressionProcess"
);
List
<
String
>
activeActivityIds
=
runtimeService
.
findActiveActivityIds
(
processInstance
.
getId
());
assertEquals
(
"[theTask]"
,
activeActivityIds
.
toString
());
List
<
Task
>
tasks
=
processEngine
.
getTaskService
().
findAssignedTasks
(
"kermit"
);
assertEquals
(
1
,
tasks
.
size
());
}
// @Autowired
// private ProcessEngine processEngine;
//
// @Autowired
// private UserBean userBean;
//
// @Autowired
// private PlatformTransactionManager transactionManager;
//
// @Rule
// public ExpectedException exception = ExpectedException.none();
//
// static {
// LogUtil.readJavaUtilLoggingConfigFromClasspath();
// }
//
// @Test
// public void testProcessExecutionWithTaskAssignedFromExpression() {
//
// int before = processEngine.getTaskService().findAssignedTasks("kermit").size();
// ProcessInstance processInstance = processEngine.getRuntimeService().startProcessInstanceByKey("taskAssigneeExpressionProcess");
// assertEquals("[theTask]", processInstance.findActivityIds().toString());
// ProcessInstanceEntity processInstanceEntity = (ProcessInstanceEntity) processInstance;
// ActivityInstanceImpl activityInstance = processInstanceEntity.getActivityInstances().iterator().next();
// assertEquals("${user}", ((TaskDefinition) ReflectionTestUtils.getField(((ActivityImpl) activityInstance.getActivity()).getActivityBehavior(),
// "taskDefinition")).getAssignee());
// List<Task> tasks = processEngine.getTaskService().findAssignedTasks("kermit");
// assertEquals(before + 1, tasks.size());
//
// processEngine.getRuntimeService().endProcessInstance(processInstance.getId());
//
// }
//
// @Test
// public void testJavaServiceDelegation() {
// RuntimeService runtimeService = processEngine.getRuntimeService();
...
...
modules/activiti-engine-test-cfg/src/test/java/org/activiti/test/db/ProcessEngineInitializationTest.java
浏览文件 @
70abe677
...
...
@@ -86,7 +86,7 @@ public class ProcessEngineInitializationTest extends PvmTestCase {
fail
(
"expected exception"
);
}
catch
(
ActivitiWrongDbException
e
)
{
assertTextPresent
(
"version mismatch"
,
e
.
getMessage
());
assertEquals
(
25.7
,
e
.
getDbVersion
());
assertEquals
(
"25.7"
,
e
.
getDbVersion
());
assertEquals
(
ProcessEngine
.
VERSION
,
e
.
getLibraryVersion
());
}
...
...
modules/activiti-engine/src/main/java/org/activiti/engine/RuntimeService.java
浏览文件 @
70abe677
...
...
@@ -12,6 +12,7 @@
*/
package
org.activiti.engine
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -43,6 +44,10 @@ public interface RuntimeService {
ExecutionQuery
createExecutionQuery
();
Execution
findExecutionById
(
String
executionId
);
/** the activity ids for all executions that are waiting in activities.
* This is a list because a single activity can be active multiple times.*/
List
<
String
>
findActiveActivityIds
(
String
executionId
);
ProcessInstanceQuery
createProcessInstanceQuery
();
...
...
modules/activiti-engine/src/main/java/org/activiti/engine/impl/RuntimeServiceImpl.java
浏览文件 @
70abe677
...
...
@@ -13,6 +13,7 @@
package
org.activiti.engine.impl
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
org.activiti.engine.Execution
;
...
...
@@ -21,6 +22,7 @@ import org.activiti.engine.ProcessInstance;
import
org.activiti.engine.ProcessInstanceQuery
;
import
org.activiti.engine.RuntimeService
;
import
org.activiti.engine.impl.cmd.DeleteProcessInstanceCmd
;
import
org.activiti.engine.impl.cmd.FindActiveActivityIdsCmd
;
import
org.activiti.engine.impl.cmd.GetVariableCmd
;
import
org.activiti.engine.impl.cmd.GetVariablesCmd
;
import
org.activiti.engine.impl.cmd.SetVariablesCmd
;
...
...
@@ -91,4 +93,8 @@ public class RuntimeServiceImpl extends ServiceImpl implements RuntimeService {
.
executionId
(
executionId
)
.
singleResult
();
}
public
List
<
String
>
findActiveActivityIds
(
String
executionId
)
{
return
commandExecutor
.
execute
(
new
FindActiveActivityIdsCmd
(
executionId
));
}
}
modules/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/UserTaskActivity.java
浏览文件 @
70abe677
...
...
@@ -72,7 +72,7 @@ public class UserTaskActivity extends TaskActivity {
}
protected
String
evaluateExpression
(
String
expr
,
ActivityExecution
execution
)
{
// TODO move parsing of value expression to bpmn parser and only keep evaluation here
// TODO
http://jira.codehaus.org/browse/ACT-84
move parsing of value expression to bpmn parser and only keep evaluation here
return
(
String
)
expressionManager
.
createValueExpression
(
expr
).
getValue
(
execution
);
}
...
...
modules/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/deployer/BpmnDeployer.java
浏览文件 @
70abe677
...
...
@@ -62,7 +62,10 @@ public class BpmnDeployer implements Deployer, ProcessEngineConfigurationAware {
.
name
(
resourceName
)
.
execute
();
processDefinitions
.
addAll
(
bpmnParse
.
getProcessDefinitions
());
for
(
ProcessDefinitionEntity
processDefinition:
bpmnParse
.
getProcessDefinitions
())
{
processDefinition
.
setResourceName
(
resourceName
);
processDefinitions
.
add
(
processDefinition
);
}
}
}
...
...
modules/activiti-engine/src/main/java/org/activiti/engine/
test/ProcessEngineImplTestCase
.java
→
modules/activiti-engine/src/main/java/org/activiti/engine/
impl/cmd/FindActiveActivityIdsCmd
.java
浏览文件 @
70abe677
...
...
@@ -11,41 +11,36 @@
* limitations under the License.
*/
package
org.activiti.engine.
test
;
package
org.activiti.engine.
impl.cmd
;
import
org.activiti.engine.impl.ProcessEngineImpl
;
import
org.activiti.engine.impl.cfg.ProcessEngineConfiguration
;
import
org.activiti.pvm.impl.util.LogUtil.ThreadLogMode
;
import
java.util.List
;
import
org.activiti.engine.ActivitiException
;
import
org.activiti.engine.impl.interceptor.Command
;
import
org.activiti.engine.impl.interceptor.CommandContext
;
import
org.activiti.engine.impl.persistence.runtime.ExecutionEntity
;
/** JUnit 3 style base class that also exposes selected implementation
* aspects of the engine like the CommandExecutor.
*
/**
* @author Tom Baeyens
*/
public
class
ProcessEngineImplTestCase
extends
ProcessEngineTestCase
{
public
class
FindActiveActivityIdsCmd
implements
Command
<
List
<
String
>>
{
protected
ProcessEngineConfiguration
processEngineConfiguration
;
protected
String
executionId
;
public
ProcessEngineImplTestCase
()
{
super
();
}
public
ProcessEngineImplTestCase
(
String
configurationResource
,
ThreadLogMode
threadRenderingMode
)
{
super
(
configurationResource
,
threadRenderingMode
);
}
public
ProcessEngineImplTestCase
(
String
configurationResource
)
{
super
(
configurationResource
);
}
public
ProcessEngineImplTestCase
(
ThreadLogMode
threadRenderingMode
)
{
super
(
threadRenderingMode
);
public
FindActiveActivityIdsCmd
(
String
executionId
)
{
this
.
executionId
=
executionId
;
}
@Override
void
initializeServices
()
{
super
.
initializeServices
();
processEngineConfiguration
=
((
ProcessEngineImpl
)
processEngine
).
getProcessEngineConfiguration
();
public
List
<
String
>
execute
(
CommandContext
commandContext
)
{
ExecutionEntity
execution
=
commandContext
.
getRuntimeSession
()
.
findExecutionById
(
executionId
);
if
(
execution
==
null
)
{
throw
new
ActivitiException
(
"execution with id "
+
executionId
+
" was not found"
);
}
return
execution
.
findActiveActivityIds
();
}
}
modules/activiti-engine/src/main/java/org/activiti/engine/impl/el/ExpressionManager.java
浏览文件 @
70abe677
...
...
@@ -18,6 +18,8 @@ import javax.el.ExpressionFactory;
import
javax.el.MethodExpression
;
import
javax.el.ValueExpression
;
import
org.activiti.engine.impl.cfg.ProcessEngineConfiguration
;
import
org.activiti.engine.impl.cfg.ProcessEngineConfigurationAware
;
import
org.activiti.engine.impl.persistence.runtime.ExecutionEntity
;
import
org.activiti.pvm.impl.runtime.ExecutionImpl
;
...
...
@@ -34,9 +36,6 @@ import org.activiti.pvm.impl.runtime.ExecutionImpl;
* expressions.
* </p>
* <p>
* The main extension point is the {@link #setElResolver(ELResolver)}.
* </p>
* <p>
* Using this class, also the runtime engine doesn't create a hard dependency on
* the javax.el library as long as you don't use expressions.
* </p>
...
...
@@ -44,7 +43,7 @@ import org.activiti.pvm.impl.runtime.ExecutionImpl;
* @author Tom Baeyens
* @author Dave Syer
*/
public
class
ExpressionManager
{
public
class
ExpressionManager
implements
ProcessEngineConfigurationAware
{
public
static
final
String
UEL_VALUE
=
"uel-value"
;
public
static
final
String
UEL_METHOD
=
"uel-method"
;
...
...
@@ -62,8 +61,9 @@ public class ExpressionManager {
* of global variables in a static engine wide scope. Defaults to null (so no
* custom variables).
*/
public
void
setElResolver
(
ELResolver
elResolver
)
{
this
.
elResolver
=
elResolver
;
public
void
configurationCompleted
(
ProcessEngineConfiguration
processEngineConfiguration
)
{
this
.
elResolver
=
processEngineConfiguration
.
getElResolver
();
}
public
ActivitiValueExpression
createValueExpression
(
String
expression
)
{
...
...
modules/activiti-engine/src/main/java/org/activiti/engine/impl/persistence/db/DbRepositorySession.java
浏览文件 @
70abe677
...
...
@@ -144,8 +144,13 @@ public class DbRepositorySession implements Session, RepositorySession {
return
(
List
<
DeploymentEntity
>)
dbSqlSession
.
selectList
(
"selectDeployments"
);
};
@SuppressWarnings
(
"unchecked"
)
public
DeploymentEntity
findLatestDeploymentByName
(
String
deploymentName
)
{
return
(
DeploymentEntity
)
dbSqlSession
.
selectOne
(
"selectLatestDeploymentByName"
,
deploymentName
);
List
list
=
dbSqlSession
.
selectList
(
"selectDeploymentsByName"
,
deploymentName
,
new
Page
(
0
,
1
));
if
(
list
!=
null
&&
!
list
.
isEmpty
())
{
return
(
DeploymentEntity
)
list
.
get
(
0
);
}
return
null
;
}
@SuppressWarnings
(
"unchecked"
)
...
...
modules/activiti-engine/src/main/java/org/activiti/engine/impl/persistence/repository/ProcessDefinitionEntity.java
浏览文件 @
70abe677
...
...
@@ -34,6 +34,7 @@ public class ProcessDefinitionEntity extends ProcessDefinitionImpl implements Pr
protected
String
name
;
protected
int
version
;
protected
String
deploymentId
;
protected
String
resourceName
;
public
ProcessDefinitionEntity
()
{
super
(
null
);
...
...
@@ -112,4 +113,12 @@ public class ProcessDefinitionEntity extends ProcessDefinitionImpl implements Pr
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
String
getResourceName
()
{
return
resourceName
;
}
public
void
setResourceName
(
String
resourceName
)
{
this
.
resourceName
=
resourceName
;
}
}
modules/activiti-engine/src/main/java/org/activiti/engine/test/ProcessEngineTestCase.java
浏览文件 @
70abe677
...
...
@@ -39,6 +39,7 @@ import org.activiti.engine.RuntimeService;
import
org.activiti.engine.TaskService
;
import
org.activiti.engine.impl.ProcessEngineImpl
;
import
org.activiti.engine.impl.bpmn.deployer.BpmnDeployer
;
import
org.activiti.engine.impl.cfg.ProcessEngineConfiguration
;
import
org.activiti.engine.impl.jobexecutor.JobExecutor
;
import
org.activiti.engine.impl.util.ClockUtil
;
import
org.activiti.pvm.impl.util.ClassNameUtil
;
...
...
@@ -64,9 +65,14 @@ public class ProcessEngineTestCase extends PvmTestCase {
protected
ThreadLogMode
threadRenderingMode
;
protected
String
configurationResource
;
protected
String
springApplicationContextConfigurationResource
;
// detyped storage of the application context is done to prevent a hard dependency of spring classes
// on the classpath in case spring is not actually used.
protected
Object
springApplicationContext
;
protected
List
<
String
>
deploymentsToDeleteAfterTestMethod
=
new
ArrayList
<
String
>();
protected
Throwable
exception
;
protected
ProcessEngineConfiguration
processEngineConfiguration
;
protected
ProcessEngine
processEngine
;
protected
RepositoryService
repositoryService
;
protected
RuntimeService
runtimeService
;
...
...
@@ -111,11 +117,7 @@ public class ProcessEngineTestCase extends PvmTestCase {
if
(
processEngine
==
null
)
{
processEngine
=
processEngines
.
get
(
configurationResource
);
if
(
processEngine
==
null
)
{
log
.
fine
(
"==== BUILDING PROCESS ENGINE ========================================================================"
);
processEngine
=
new
ProcessEngineBuilder
()
.
configureFromPropertiesResource
(
configurationResource
)
.
buildProcessEngine
();
log
.
fine
(
"==== PROCESS ENGINE CREATED ========================================================================="
);
initializeProcessEngine
();
processEngines
.
put
(
configurationResource
,
processEngine
);
}
initializeServices
();
...
...
@@ -148,11 +150,19 @@ public class ProcessEngineTestCase extends PvmTestCase {
}
}
private
void
initializeProcessEngine
()
{
log
.
fine
(
"==== BUILDING PROCESS ENGINE ========================================================================"
);
processEngine
=
new
ProcessEngineBuilder
()
.
configureFromPropertiesResource
(
configurationResource
)
.
buildProcessEngine
();
log
.
fine
(
"==== PROCESS ENGINE CREATED ========================================================================="
);
}
/** Each test is assumed to clean up all DB content it entered.
* After a test method executed, this method scans all tables to see if the DB is completely clean.
* It throws AssertionFailed in case the DB is not clean.
* If the DB is not clean, it is cleaned by performing a create a drop. */
pr
otected
void
assertAndEnsureCleanDb
()
throws
Throwable
{
pr
ivate
void
assertAndEnsureCleanDb
()
throws
Throwable
{
log
.
fine
(
"verifying that db is clean after test"
);
Map
<
String
,
Long
>
tableCounts
=
processEngine
.
getManagementService
().
getTableCount
();
StringBuilder
outputMessage
=
new
StringBuilder
();
...
...
@@ -183,7 +193,7 @@ public class ProcessEngineTestCase extends PvmTestCase {
}
}
void
annotationDeploymentBefore
()
{
private
void
annotationDeploymentBefore
()
{
Method
method
=
null
;
try
{
method
=
getClass
().
getDeclaredMethod
(
getName
(),
(
Class
<?>[])
null
);
...
...
@@ -223,7 +233,7 @@ public class ProcessEngineTestCase extends PvmTestCase {
return
type
.
getName
().
replace
(
'.'
,
'/'
)
+
"."
+
name
+
"."
+
BpmnDeployer
.
BPMN_RESOURCE_SUFFIX
;
}
pr
otected
void
annotationDeploymentAfter
()
{
pr
ivate
void
annotationDeploymentAfter
()
{
for
(
String
deploymentId:
deploymentsToDeleteAfterTestMethod
)
{
log
.
fine
(
"annotation @Deployment deletes deployment for "
+
ClassNameUtil
.
getClassNameWithoutPackage
(
this
)+
"."
+
getName
());
repositoryService
.
deleteDeploymentCascade
(
deploymentId
);
...
...
@@ -231,7 +241,8 @@ public class ProcessEngineTestCase extends PvmTestCase {
}
void
initializeServices
()
{
private
void
initializeServices
()
{
processEngineConfiguration
=
((
ProcessEngineImpl
)
processEngine
).
getProcessEngineConfiguration
();
repositoryService
=
processEngine
.
getRepositoryService
();
runtimeService
=
processEngine
.
getRuntimeService
();
taskService
=
processEngine
.
getTaskService
();
...
...
@@ -267,11 +278,11 @@ public class ProcessEngineTestCase extends PvmTestCase {
}
}
p
rotected
boolean
areJobsAvailable
()
{
p
ublic
boolean
areJobsAvailable
()
{
return
!
managementService
.
createJobQuery
().
list
().
isEmpty
();
}
pr
otected
static
class
InteruptTask
extends
TimerTask
{
pr
ivate
static
class
InteruptTask
extends
TimerTask
{
protected
boolean
timeLimitExceeded
=
false
;
protected
Thread
thread
;
public
InteruptTask
(
Thread
thread
)
{
...
...
@@ -292,4 +303,8 @@ public class ProcessEngineTestCase extends PvmTestCase {
}
processEngines
.
clear
();
}
public
void
setSpringApplicationContextConfigurationResource
(
String
springApplicationContextConfigurationResource
)
{
this
.
springApplicationContextConfigurationResource
=
springApplicationContextConfigurationResource
;
}
}
modules/activiti-engine/src/main/java/org/activiti/engine/test/SpringProcessEngineTestCase.java
0 → 100644
浏览文件 @
70abe677
/* 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.test
;
/**
* @author Tom Baeyens
*/
public
class
SpringProcessEngineTestCase
extends
ProcessEngineTestCase
{
// private void initializeProcessEngineFromSpringConfigurationResource() {
// log.fine("==== BUILDING SPRING APPLICATION CONTEXT AND PROCESS ENGINE =========================================");
//
// ApplicationContext applicationContext = new ClassPathXmlApplicationContext(springApplicationContextConfigurationResource);
// Map<String, ProcessEngine> beansOfType = applicationContext.getBeansOfType(ProcessEngine.class);
// if ( (beansOfType==null)
// || (beansOfType.isEmpty())
// ) {
// throw new ActivitiException("no "+ProcessEngine.class.getName()+" defined in the application context "+springApplicationContextConfigurationResource);
// }
//
// this.springApplicationContext = applicationContext;
//
// processEngine = beansOfType.values().iterator().next();
// log.fine("==== SPRING PROCESS ENGINE CREATED ==================================================================");
// }
// protected Object getSpringBean(String springBeanName) {
// // detyped storage of the application context and casting here is done to prevent a hard dependency of spring classes
// // on the classpath in case spring is not actually used.
// return ((ApplicationContext)springApplicationContext).getBean(springBeanName);
// }
}
modules/activiti-engine/src/main/resources/org/activiti/db/create/activiti.h2.create.sql
浏览文件 @
70abe677
...
...
@@ -89,6 +89,7 @@ create table ACT_PROCESSDEFINITION (
KEY_
varchar
(
255
),
VERSION_
integer
,
DEPLOYMENT_ID_
varchar
(
255
),
RESOURCE_NAME_
varchar
(
255
),
primary
key
(
ID_
)
);
...
...
modules/activiti-engine/src/main/resources/org/activiti/db/ibatis/repository.mapping.xml
浏览文件 @
70abe677
...
...
@@ -90,12 +90,13 @@
<!-- PROCESSDEFINITION INSERT -->
<insert
id=
"insertProcessDefinition"
parameterType=
"org.activiti.engine.impl.persistence.repository.ProcessDefinitionEntity"
>
insert into ACT_PROCESSDEFINITION(ID_, NAME_, KEY_, VERSION_, DEPLOYMENT_ID_)
insert into ACT_PROCESSDEFINITION(ID_, NAME_, KEY_, VERSION_, DEPLOYMENT_ID_
, RESOURCE_NAME_
)
values (#{id, jdbcType=VARCHAR},
#{name, jdbcType=VARCHAR},
#{key, jdbcType=VARCHAR},
#{version, jdbcType=INTEGER},
#{deploymentId, jdbcType=VARCHAR})
#{deploymentId, jdbcType=VARCHAR},
#{resourceName, jdbcType=VARCHAR})
</insert>
<!-- PROCESSDEFINITION UPDATE -->
...
...
@@ -114,6 +115,7 @@
<result
property=
"key"
column=
"KEY_"
jdbcType=
"VARCHAR"
/>
<result
property=
"version"
column=
"VERSION_"
jdbcType=
"INTEGER"
/>
<result
property=
"deploymentId"
column=
"DEPLOYMENT_ID_"
jdbcType=
"VARCHAR"
/>
<result
property=
"resourceName"
column=
"RESOURCE_NAME_"
jdbcType=
"VARCHAR"
/>
</resultMap>
<!-- PROCESSDEFINITION SELECT -->
...
...
modules/activiti-engine/src/test/java/org/activiti/engine/test/bpmn/callactivity/CallActivityAdvancedTest.java
浏览文件 @
70abe677
...
...
@@ -21,12 +21,12 @@ import org.activiti.engine.Task;
import
org.activiti.engine.TaskQuery
;
import
org.activiti.engine.impl.util.ClockUtil
;
import
org.activiti.engine.test.Deployment
;
import
org.activiti.engine.test.ProcessEngine
Impl
TestCase
;
import
org.activiti.engine.test.ProcessEngineTestCase
;
/**
* @author Joram Barrez
*/
public
class
CallActivityAdvancedTest
extends
ProcessEngine
Impl
TestCase
{
public
class
CallActivityAdvancedTest
extends
ProcessEngineTestCase
{
@Deployment
(
resources
=
{
"org/activiti/engine/test/bpmn/callactivity/CallActivity.testCallSimpleSubProcess.bpmn20.xml"
,
...
...
modules/activiti-engine/src/test/java/org/activiti/impl/interceptor/CommandContextTest.java
浏览文件 @
70abe677
...
...
@@ -15,13 +15,13 @@ package org.activiti.impl.interceptor;
import
org.activiti.engine.impl.interceptor.Command
;
import
org.activiti.engine.impl.interceptor.CommandContext
;
import
org.activiti.engine.test.ProcessEngine
Impl
TestCase
;
import
org.activiti.engine.test.ProcessEngineTestCase
;
/**
* @author Tom Baeyens
*/
public
class
CommandContextTest
extends
ProcessEngine
Impl
TestCase
{
public
class
CommandContextTest
extends
ProcessEngineTestCase
{
public
void
testCommandContextGetCurrentAfterException
()
{
try
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录