Package org.camunda.bpm.engine.impl.cmd
Class HandleExternalTaskCmd
- java.lang.Object
-
- org.camunda.bpm.engine.impl.cmd.ExternalTaskCmd
-
- org.camunda.bpm.engine.impl.cmd.HandleExternalTaskCmd
-
- All Implemented Interfaces:
Command<java.lang.Void>
- Direct Known Subclasses:
CompleteExternalTaskCmd
,ExtendLockOnExternalTaskCmd
,HandleExternalTaskBpmnErrorCmd
,HandleExternalTaskFailureCmd
,LockExternalTaskCmd
public abstract class HandleExternalTaskCmd extends ExternalTaskCmd
Represents an abstract class for the handle of external task commands.- Author:
- Christopher Zell
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
workerId
The reported worker id.-
Fields inherited from class org.camunda.bpm.engine.impl.cmd.ExternalTaskCmd
externalTaskId
-
-
Constructor Summary
Constructors Constructor Description HandleExternalTaskCmd(java.lang.String externalTaskId, java.lang.String workerId)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.Void
execute(CommandContext commandContext)
abstract java.lang.String
getErrorMessageOnWrongWorkerAccess()
Returns the error message.protected void
validateInput()
Validates the current input of the command.protected boolean
validateWorkerViolation(ExternalTaskEntity externalTask)
Validates the caller's workerId against the workerId of the external task.-
Methods inherited from class org.camunda.bpm.engine.impl.cmd.ExternalTaskCmd
execute, getUserOperationLogOperationType, getUserOperationLogPropertyChanges, writeUserOperationLog
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.camunda.bpm.engine.impl.interceptor.Command
isRetryable
-
-
-
-
Method Detail
-
execute
public java.lang.Void execute(CommandContext commandContext)
- Specified by:
execute
in interfaceCommand<java.lang.Void>
- Overrides:
execute
in classExternalTaskCmd
-
getErrorMessageOnWrongWorkerAccess
public abstract java.lang.String getErrorMessageOnWrongWorkerAccess()
Returns the error message. Which is used to create an specific message for the BadUserRequestException if an worker has no rights to execute commands of the external task.- Returns:
- the specific error message
-
validateInput
protected void validateInput()
Validates the current input of the command.- Specified by:
validateInput
in classExternalTaskCmd
-
validateWorkerViolation
protected boolean validateWorkerViolation(ExternalTaskEntity externalTask)
Validates the caller's workerId against the workerId of the external task.
-
-