Class AuthenticatedTimerJobHandler
java.lang.Object
org.alfresco.repo.workflow.activiti.AuthenticatedTimerJobHandler
- All Implemented Interfaces:
org.activiti.engine.impl.jobexecutor.JobHandler
public class AuthenticatedTimerJobHandler
extends Object
implements org.activiti.engine.impl.jobexecutor.JobHandler
An
JobHandler which executes activiti timer-jobs authenticated against Alfresco. It runs the timer execution as the task's assignee (if any) when the timer is applied to a task. If not, system user is used to execute timer.
It wraps another JobHandler to which the actual execution is delegated to.- Since:
- 3.4.e
- Author:
- Frederik Heremans
-
Constructor Summary
ConstructorsConstructorDescriptionAuthenticatedTimerJobHandler(org.activiti.engine.impl.jobexecutor.JobHandler jobHandler, NodeService nodeService) -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(org.activiti.engine.impl.persistence.entity.JobEntity job, String configuration, org.activiti.engine.impl.persistence.entity.ExecutionEntity execution, org.activiti.engine.impl.interceptor.CommandContext commandContext) protected StringgetInitiator(ActivitiScriptNode initiatorNode) getType()
-
Constructor Details
-
AuthenticatedTimerJobHandler
public AuthenticatedTimerJobHandler(org.activiti.engine.impl.jobexecutor.JobHandler jobHandler, NodeService nodeService) - Parameters:
jobHandler- theJobHandlerto wrap.nodeService- the UNPROTECTEDNodeServiceto use for fetching initiator username when only tenant is known. We can't use initiator ScriptNode for this, because this uses the protectedNodeServicewhich requires an authenticated user in that tenant (seegetInitiator(ActivitiScriptNode)).
-
-
Method Details
-
execute
public void execute(org.activiti.engine.impl.persistence.entity.JobEntity job, String configuration, org.activiti.engine.impl.persistence.entity.ExecutionEntity execution, org.activiti.engine.impl.interceptor.CommandContext commandContext) - Specified by:
executein interfaceorg.activiti.engine.impl.jobexecutor.JobHandler
-
getInitiator
-
getType
- Specified by:
getTypein interfaceorg.activiti.engine.impl.jobexecutor.JobHandler
-