Merged V4.0-BUG-FIX to HEAD

35394: ALF-13394: Allow administrators to gain SiteManager role
   35407: ALF-12740: Updated XHR request processing for IE to ensure no caching (had previously thought IE9 was not affected but apparently it is)
   35408: Fix for ALF-13286 who_can_create_site mention and bad error message
   - explicitly declare public interface on SiteService
   35412: Merged DEV to V4.0-BUG-FIX
      35153: ALF-1834: Renaming folders breaks web form content
             Original solution by Ivan has been reimplemented as per Derek's requirements and against 4.0. 
             [DH: Did some minor legibility changes and fixed LF for AVMDiskDriver]
   35414: Incremented version.revision for 4.0.2
   35417: Merged BRANCHES/DEV/THOR0 to BRANCHES/DEV/V4.0-BUG-FIX: (THOR-6 / ALF-13755)
      29356: THOR-6: MT is configured (but not enabled) by default - will be auto-enabled when first tenant is created
      29455: THOR-6: build test/fix
      29471: THOR-6: build test/fix
   35423: Merged BRANCHES/DEV/THOR0 to BRANCHES/DEV/V4.0-BUG-FIX: (THOR-4 / ALF-13756)
      29500: THOR-4: Replace Tenant attributes with Tenant table (alf_tenant)
      29501: THOR-4: Replace Tenant attributes with Tenant table (alf_tenant)
      29503: THOR-4: Replace Tenant attributes with Tenant table (alf_tenant)
      TODO: ALF-13757 - patch to migrate Tenant attributes to Tenant table (for existing customers)
   35431: Merged V3.4-BUG-FIX to V4.0-BUG-FIX
      35367: ALF-13382: WorkflowService Returning Incorrect Values When Using Native jBPM API to set Local Task Variables
      - Fix by Alex Bykov
      35400: Fix for ALF-13557 - Share forms selectmany.ftl template does not work with Share search query parser; should do a logical OR or AND but does a concatenation
      35416: Incremented version.revision for 3.4.10
      35429: Merged V4.0-BUG-FIX to V3.4-BUG-FIX (partial)
         35328: ALF-13409: Avoid concurrency issues in unit test tear downs by deleting users before sites. User deletion deletes invitations synchronously. Site deletion deletes invitations concurrently to avoid UI timeouts. The potential to access invitations that are being concurrently deleted still exists, but always did!
      35430: ALF-13409: Avoid concurrency issues in unit test tear downs by deleting users before sites - another instance.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@35434 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2012-04-19 15:43:03 +00:00
parent 4fc2426815
commit 2e826e9e26
41 changed files with 5164 additions and 3764 deletions

View File

@@ -127,8 +127,8 @@ import org.springmodules.workflow.jbpm31.JbpmTemplate;
*/
public class JBPMEngine extends AlfrescoBpmEngine implements WorkflowEngine
{
private static Log logger = LogFactory.getLog(JBPMEngine.class);
private static Log logger = LogFactory.getLog(JBPMEngine.class);
// Implementation dependencies
protected NodeService nodeService;
protected ServiceRegistry serviceRegistry;
@@ -446,15 +446,15 @@ public class JBPMEngine extends AlfrescoBpmEngine implements WorkflowEngine
{
public WorkflowDefinition apply(ProcessDefinition value)
{
try
{
return createWorkflowDefinition(value);
}
catch (Exception ex)
{
logger.warn("Unable to load workflow definition: '" + value + "' due to exception.", ex);
return null;
}
try
{
return createWorkflowDefinition(value);
}
catch (Exception ex)
{
logger.warn("Unable to load workflow definition: '" + value + "' due to exception.", ex);
return null;
}
}
});
}
@@ -465,15 +465,15 @@ public class JBPMEngine extends AlfrescoBpmEngine implements WorkflowEngine
{
public WorkflowInstance apply(ProcessInstance value)
{
try
{
return createWorkflowInstance(value);
}
catch (Exception ex)
{
logger.warn("Unable to load workflow instance: '" + value + "' due to exception.", ex);
return null;
}
try
{
return createWorkflowInstance(value);
}
catch (Exception ex)
{
logger.warn("Unable to load workflow instance: '" + value + "' due to exception.", ex);
return null;
}
}
});
}
@@ -913,15 +913,15 @@ public class JBPMEngine extends AlfrescoBpmEngine implements WorkflowEngine
// retrieve workflow
GraphSession graphSession = context.getGraphSession();
ProcessInstance processInstance = getProcessInstanceIfExists(graphSession, workflowId);
try
{
return createWorkflowInstance(processInstance);
}
catch (Exception ex)
{
logger.warn("Unable to load workflow instance: '" + processInstance + "' due to exception.", ex);
return null;
}
try
{
return createWorkflowInstance(processInstance);
}
catch (Exception ex)
{
logger.warn("Unable to load workflow instance: '" + processInstance + "' due to exception.", ex);
return null;
}
}
});
}
@@ -1132,14 +1132,14 @@ public class JBPMEngine extends AlfrescoBpmEngine implements WorkflowEngine
ProcessInstance processInstance = processInstances.get(workflowId);
// TODO: Determine if this is the most appropriate way to cancel workflow...
// It might be useful to record point at which it was cancelled etc
try
{
workflowInstances.add(createWorkflowInstance(processInstance));
}
catch(Exception ex)
{
logger.warn("Unable to load workflow instance: '" + processInstance + "' due to exception.", ex);
}
try
{
workflowInstances.add(createWorkflowInstance(processInstance));
}
catch(Exception ex)
{
logger.warn("Unable to load workflow instance: '" + processInstance + "' due to exception.", ex);
}
// delete the process instance
graphSession.deleteProcessInstance(processInstance, true, true);
@@ -1549,20 +1549,20 @@ public class JBPMEngine extends AlfrescoBpmEngine implements WorkflowEngine
/// ------------------------
for(Object[] row : rows)
{
try
try
{
WorkflowTask workflowTask = makeWorkflowTask(row, taskInstanceCache, variablesCache);
if(workflowTask != null)
{
workflowTasks.add(workflowTask);
}
WorkflowTask workflowTask = makeWorkflowTask(row, taskInstanceCache, variablesCache);
if(workflowTask != null)
{
workflowTasks.add(workflowTask);
}
}
catch (Exception ex)
{
logger.warn("Unable to load workflow instance: '" + row[0] + "' due to exception.", ex);
continue;
}
}
catch (Exception ex)
{
logger.warn("Unable to load workflow instance: '" + row[0] + "' due to exception.", ex);
continue;
}
}
return workflowTasks;
}
@@ -1593,7 +1593,7 @@ public class JBPMEngine extends AlfrescoBpmEngine implements WorkflowEngine
TaskInstance helperTi = taskInstanceCache.get(ti.getId());
@SuppressWarnings("unchecked")
Map<String, Object> variables = variablesCache.get(contextInstance.getId()).getVariables();
Map<String, Object> variables = variablesCache.get(contextInstance.getTokenVariableMap(token).getToken().getId()).getVariables();
// WorkflowTaskProperies
Map<QName, Serializable> properties = getTaskProperties(helperTi != null ? helperTi : ti, false, variablesCache);
@@ -1640,7 +1640,7 @@ public class JBPMEngine extends AlfrescoBpmEngine implements WorkflowEngine
List<TokenVariableMap> results = (List<TokenVariableMap>) query.list();
for (TokenVariableMap tokenVariableMap : results)
{
variablesCache.put(tokenVariableMap.getContextInstance().getId(), tokenVariableMap);
variablesCache.put(tokenVariableMap.getToken().getId(), tokenVariableMap);
}
}
@@ -1817,16 +1817,16 @@ public class JBPMEngine extends AlfrescoBpmEngine implements WorkflowEngine
workflowTasks = new ArrayList<WorkflowTask>(filteredTasks.size());
for (TaskInstance task : filteredTasks)
{
try
{
WorkflowTask workflowTask = createWorkflowTask(task);
workflowTasks.add(workflowTask);
}
catch (Exception ex)
{
logger.warn("Unable to load workflow task: '" + task + "' due to exception.", ex);
continue;
}
try
{
WorkflowTask workflowTask = createWorkflowTask(task);
workflowTasks.add(workflowTask);
}
catch (Exception ex)
{
logger.warn("Unable to load workflow task: '" + task + "' due to exception.", ex);
continue;
}
}
}
@@ -2676,9 +2676,9 @@ public class JBPMEngine extends AlfrescoBpmEngine implements WorkflowEngine
while (token != null)
{
TokenVariableMap varMap = null;
if (variablesCache != null && variablesCache.containsKey(context.getId()))
if (variablesCache != null && variablesCache.containsKey(context.getTokenVariableMap(token).getToken().getId()))
{
varMap = variablesCache.get(context.getId());
varMap = variablesCache.get(context.getTokenVariableMap(token).getToken().getId());
}
else
{