mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.2 to HEAD
15608: Merged V3.1 to V3.2 14111: MT - fix ETHREEOH-914 (tenant domain mismatch in getting workflow pooled tasks) 14855: MT - minor fix to result set (for tenant-based parent nodeRef) 14865: MT - continuation fix for ETHREEOH-210 (Lucene search with QNAME) 15108: Fix ETHREEOH-2014 - custom folder's children disappear after full re-index (MT w/ dynamic model) 15146: Fix ETHREEOH-2452 - Cluster & MT: "Unable to find a writer. 'selectWriteStore' may not return null" ... 15610: Merged V3.1 to V3.2 15175: Cont ... fixup merge (delete file) 16308: ETHREEOH-2833: The Content rule with 'Items with specific text value in property' condition can't be created. 16334: (record only) Undo change of version.properties ___________________________________________________________________ Modified: svn:mergeinfo Merged /alfresco/BRANCHES/V3.1:r14111,14855,14865,15108,15146 Merged /alfresco/BRANCHES/V3.2:r15608,15610,16308,16334 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16871 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2009 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -1096,13 +1096,7 @@ public class JBPMEngine extends BPMEngine
|
||||
Token token = getWorkflowToken(graphSession, pathId);
|
||||
TaskMgmtSession taskSession = context.getTaskMgmtSession();
|
||||
List<TaskInstance> tasks = taskSession.findTaskInstancesByToken(token.getId());
|
||||
List<WorkflowTask> workflowTasks = new ArrayList<WorkflowTask>(tasks.size());
|
||||
for (TaskInstance task : tasks)
|
||||
{
|
||||
WorkflowTask workflowTask = createWorkflowTask(task);
|
||||
workflowTasks.add(workflowTask);
|
||||
}
|
||||
return workflowTasks;
|
||||
return getWorkflowTasks(tasks);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1181,14 +1175,7 @@ public class JBPMEngine extends BPMEngine
|
||||
tasks = findCompletedTaskInstances(context, authority);
|
||||
}
|
||||
|
||||
// convert tasks to appropriate service response format
|
||||
List<WorkflowTask> workflowTasks = new ArrayList<WorkflowTask>(tasks.size());
|
||||
for (TaskInstance task : tasks)
|
||||
{
|
||||
WorkflowTask workflowTask = createWorkflowTask(task);
|
||||
workflowTasks.add(workflowTask);
|
||||
}
|
||||
return workflowTasks;
|
||||
return getWorkflowTasks(tasks);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1239,13 +1226,7 @@ public class JBPMEngine extends BPMEngine
|
||||
// retrieve pooled tasks for all flattened authorities
|
||||
TaskMgmtSession taskSession = context.getTaskMgmtSession();
|
||||
List<TaskInstance> tasks = taskSession.findPooledTaskInstances(authorities);
|
||||
List<WorkflowTask> workflowTasks = new ArrayList<WorkflowTask>(tasks.size());
|
||||
for (TaskInstance task : tasks)
|
||||
{
|
||||
WorkflowTask workflowTask = createWorkflowTask(task);
|
||||
workflowTasks.add(workflowTask);
|
||||
}
|
||||
return workflowTasks;
|
||||
return getWorkflowTasks(tasks);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1276,28 +1257,7 @@ public class JBPMEngine extends BPMEngine
|
||||
|
||||
Criteria criteria = createTaskQueryCriteria(session, query);
|
||||
List<TaskInstance> tasks = criteria.list();
|
||||
|
||||
// convert tasks to appropriate service response format
|
||||
List<WorkflowTask> workflowTasks = new ArrayList<WorkflowTask>(tasks.size());
|
||||
for (TaskInstance task : tasks)
|
||||
{
|
||||
if (tenantService.isEnabled())
|
||||
{
|
||||
try
|
||||
{
|
||||
tenantService.checkDomain(task.getTask().getProcessDefinition().getName());
|
||||
}
|
||||
catch (RuntimeException re)
|
||||
{
|
||||
// deliberately skip this one - due to domain mismatch
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
WorkflowTask workflowTask = createWorkflowTask(task);
|
||||
workflowTasks.add(workflowTask);
|
||||
}
|
||||
return workflowTasks;
|
||||
return getWorkflowTasks(tasks);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1306,6 +1266,31 @@ public class JBPMEngine extends BPMEngine
|
||||
throw new WorkflowException("Failed to query tasks", e);
|
||||
}
|
||||
}
|
||||
|
||||
protected List<WorkflowTask> getWorkflowTasks(List<TaskInstance> tasks)
|
||||
{
|
||||
// convert tasks to appropriate service response format
|
||||
List<WorkflowTask> workflowTasks = new ArrayList<WorkflowTask>(tasks.size());
|
||||
for (TaskInstance task : tasks)
|
||||
{
|
||||
if (tenantService.isEnabled())
|
||||
{
|
||||
try
|
||||
{
|
||||
tenantService.checkDomain(task.getTask().getProcessDefinition().getName());
|
||||
}
|
||||
catch (RuntimeException re)
|
||||
{
|
||||
// deliberately skip this one - due to domain mismatch - eg. when querying by group authority
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
WorkflowTask workflowTask = createWorkflowTask(task);
|
||||
workflowTasks.add(workflowTask);
|
||||
}
|
||||
return workflowTasks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a JBPM Hibernate query based on the Task Query provided
|
||||
|
Reference in New Issue
Block a user