06-15-2011 09:52 AM
List<Task> tasks = tasksvc.createTaskQuery().taskCandidateGroup("management").list();
select distinct T.* from ACT_RU_TASK T inner join ACT_RU_IDENTITYLINK I on I.TASK_ID_ = T.ID_ WHERE T.ASSIGNEE_ is null and I.TYPE_ = 'candidate' and ( I.GROUP_ID_ IN ( ? ) )
Parameters: management(String)
select * from ACT_HI_TASKINST where ID_ = ?
Parameters: 2390(String)
public void setTaskDefinitionKey(String taskDefinitionKey) {
this.taskDefinitionKey = taskDefinitionKey;
CommandContext commandContext = Context.getCommandContext();
if(commandContext != null) {
int historyLevel = Context.getProcessEngineConfiguration().getHistoryLevel();
if (historyLevel >= ProcessEngineConfigurationImpl.HISTORYLEVEL_AUDIT) {
HistoricTaskInstanceEntity historicTaskInstance = commandContext.getDbSqlSession().selectById(HistoricTaskInstanceEntity.class, id);
if (historicTaskInstance!=null) {
historicTaskInstance.setTaskDefinitionKey(this.taskDefinitionKey);
}
}
}
}
06-15-2011 09:56 AM
06-15-2011 10:17 AM
06-15-2011 10:29 AM
Index: java/org/activiti/engine/impl/persistence/entity/TaskEntity.java
===================================================================
— java/org/activiti/engine/impl/persistence/entity/TaskEntity.java (revision xxx)
+++ java/org/activiti/engine/impl/persistence/entity/TaskEntity.java (working copy)
@@ -493,7 +493,11 @@
this.parentTaskId = parentTaskId;
}
+ public void setTaskDefinitionKeyWithoutCascade(String taskDefinitionKey) {
+ this.taskDefinitionKey = taskDefinitionKey;
+ }
public void fireEvent(String taskEventName) {
TaskDefinition taskDefinition = getTaskDefinition();
if (taskDefinition != null) {
Index: resources/org/activiti/db/mapping/entity/Task.xml
===================================================================
— resources/org/activiti/db/mapping/entity/Task.xml (revision xxx)
+++ resources/org/activiti/db/mapping/entity/Task.xml (working copy)
@@ -69,7 +69,7 @@
<result property="executionId" column="EXECUTION_ID_" jdbcType="VARCHAR" />
<result property="processInstanceId" column="PROC_INST_ID_" jdbcType="VARCHAR" />
<result property="processDefinitionId" column="PROC_DEF_ID_" jdbcType="VARCHAR"/>
- <result property="taskDefinitionKey" column="TASK_DEF_KEY_" jdbcType="VARCHAR"/>
+ <result property="taskDefinitionKeyWithoutCascade" column="TASK_DEF_KEY_" jdbcType="VARCHAR"/>
<result property="dueDateWithoutCascade" column="DUE_DATE_" jdbcType="TIMESTAMP"/>
</resultMap>
08-19-2011 03:44 AM
08-24-2011 04:46 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.