mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)
57142: Merged V4.2-BUG-FIX (4.2.1) to HEAD-BUG-FIX (Cloud/4.3) 56925: Merged V4.1-BUG-FIX (4.1.7) to V4.2-BUG-FIX (4.2.1) 56865: MNT-9713: Two tasks listed in the 'current tasks' list of the callActiviti workflow's details page not one - ProcessStartExecutionListener was updated. Now we set startTaskCompleted variable, when we will process start execution for sub instances. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@61767 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -19,8 +19,11 @@
|
||||
|
||||
package org.alfresco.repo.workflow.activiti.listener;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.activiti.engine.delegate.DelegateExecution;
|
||||
import org.activiti.engine.delegate.ExecutionListener;
|
||||
import org.activiti.engine.impl.persistence.entity.ExecutionEntity;
|
||||
import org.alfresco.repo.tenant.TenantService;
|
||||
import org.alfresco.repo.tenant.TenantUtil;
|
||||
import org.alfresco.repo.workflow.BPMEngineRegistry;
|
||||
@@ -46,13 +49,22 @@ public class ProcessStartExecutionListener implements ExecutionListener
|
||||
// Add the workflow ID
|
||||
String instanceId = BPMEngineRegistry.createGlobalId(ActivitiConstants.ENGINE_ID, execution.getId());
|
||||
execution.setVariable(WorkflowConstants.PROP_WORKFLOW_INSTANCE_ID, instanceId);
|
||||
|
||||
|
||||
if(tenantService.isEnabled() || !deployWorkflowsInTenant)
|
||||
{
|
||||
// Add tenant as variable to the process. This will allow task-queries to filter out tasks that
|
||||
// are not part of the calling user's domain
|
||||
execution.setVariable(ActivitiConstants.VAR_TENANT_DOMAIN, TenantUtil.getCurrentDomain());
|
||||
}
|
||||
// MNT-9713
|
||||
if (execution instanceof ExecutionEntity)
|
||||
{
|
||||
ExecutionEntity exc = (ExecutionEntity) execution;
|
||||
if (exc.getSuperExecutionId() != null && exc.getVariable(ActivitiConstants.PROP_START_TASK_END_DATE) == null)
|
||||
{
|
||||
exc.setVariable(ActivitiConstants.PROP_START_TASK_END_DATE, new Date());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setTenantService(TenantService tenantService)
|
||||
|
Reference in New Issue
Block a user