public class AuthenticatedTimerJobHandler extends Object implements org.activiti.engine.impl.jobexecutor.JobHandler
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.| Constructor and Description |
|---|
AuthenticatedTimerJobHandler(org.activiti.engine.impl.jobexecutor.JobHandler jobHandler,
org.alfresco.service.cmr.repository.NodeService nodeService) |
| Modifier and Type | Method and Description |
|---|---|
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) |
protected String |
getInitiator(ActivitiScriptNode initiatorNode) |
String |
getType() |
public AuthenticatedTimerJobHandler(org.activiti.engine.impl.jobexecutor.JobHandler jobHandler,
org.alfresco.service.cmr.repository.NodeService nodeService)
jobHandler - the JobHandler to wrap.nodeService - the UNPROTECTED NodeService to use for fetching initiator username
when only tenant is known. We can't use initiator ScriptNode for this, because this uses the
protected NodeService which requires an authenticated user in that tenant (see getInitiator(ActivitiScriptNode)).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)
execute in interface org.activiti.engine.impl.jobexecutor.JobHandlerprotected String getInitiator(ActivitiScriptNode initiatorNode)
public String getType()
getType in interface org.activiti.engine.impl.jobexecutor.JobHandlerCopyright © 2005–2018 Alfresco Software. All rights reserved.