org.camunda.bpm.engine.impl.externaltask
Class LockedExternalTaskImpl
java.lang.Object
org.camunda.bpm.engine.impl.externaltask.LockedExternalTaskImpl
- All Implemented Interfaces:
- LockedExternalTask
public class LockedExternalTaskImpl
- extends Object
- implements LockedExternalTask
- Author:
- Thorben Lindhauer
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
id
protected String id
topicName
protected String topicName
workerId
protected String workerId
lockExpirationTime
protected Date lockExpirationTime
retries
protected Integer retries
errorMessage
protected String errorMessage
errorDetails
protected String errorDetails
processInstanceId
protected String processInstanceId
executionId
protected String executionId
activityId
protected String activityId
activityInstanceId
protected String activityInstanceId
processDefinitionId
protected String processDefinitionId
processDefinitionKey
protected String processDefinitionKey
tenantId
protected String tenantId
priority
protected long priority
variables
protected org.camunda.bpm.engine.variable.impl.VariableMapImpl variables
LockedExternalTaskImpl
public LockedExternalTaskImpl()
getId
public String getId()
- Specified by:
getId
in interface LockedExternalTask
- Returns:
- the id of the task
getTopicName
public String getTopicName()
- Specified by:
getTopicName
in interface LockedExternalTask
- Returns:
- the name of the topic the task belongs to
getWorkerId
public String getWorkerId()
- Specified by:
getWorkerId
in interface LockedExternalTask
- Returns:
- the id of the worker that has locked the task
getLockExpirationTime
public Date getLockExpirationTime()
- Specified by:
getLockExpirationTime
in interface LockedExternalTask
- Returns:
- the absolute time at which the lock expires
getRetries
public Integer getRetries()
- Specified by:
getRetries
in interface LockedExternalTask
- Returns:
- the number of retries left. The number of retries is provided by
a task client, therefore the initial value is
null
.
getErrorMessage
public String getErrorMessage()
- Specified by:
getErrorMessage
in interface LockedExternalTask
- Returns:
- the full error message submitted with the latest reported failure executing this task;
null
if no failure was reported previously or if no error message
was submitted - See Also:
ExternalTaskService.handleFailure(String, String, String, int, long)
getProcessInstanceId
public String getProcessInstanceId()
- Specified by:
getProcessInstanceId
in interface LockedExternalTask
- Returns:
- the id of the process instance the task exists in
getExecutionId
public String getExecutionId()
- Specified by:
getExecutionId
in interface LockedExternalTask
- Returns:
- the id of the execution that the task is assigned to
getActivityId
public String getActivityId()
- Specified by:
getActivityId
in interface LockedExternalTask
- Returns:
- the id of the activity for which the task is created
getActivityInstanceId
public String getActivityInstanceId()
- Specified by:
getActivityInstanceId
in interface LockedExternalTask
- Returns:
- the id of the activity instance in which context the task exists
getProcessDefinitionId
public String getProcessDefinitionId()
- Specified by:
getProcessDefinitionId
in interface LockedExternalTask
- Returns:
- the id of the process definition the task's activity belongs to
getProcessDefinitionKey
public String getProcessDefinitionKey()
- Specified by:
getProcessDefinitionKey
in interface LockedExternalTask
- Returns:
- the key of the process definition the task's activity belongs to
getTenantId
public String getTenantId()
- Specified by:
getTenantId
in interface LockedExternalTask
- Returns:
- the id of the tenant the task belongs to. Can be
null
if the task belongs to no single tenant.
getVariables
public org.camunda.bpm.engine.variable.VariableMap getVariables()
- Specified by:
getVariables
in interface LockedExternalTask
- Returns:
- a map of variables that contains an entry for every variable
that was specified at fetching time, if such a variable exists in the task's
ancestor execution hierarchy.
getErrorDetails
public String getErrorDetails()
- Specified by:
getErrorDetails
in interface LockedExternalTask
- Returns:
- error details submitted with the latest reported failure executing this task;
null
if no failure was reported previously or if no error details
was submitted - See Also:
ExternalTaskService.handleFailure(String, String, String, String, int, long)
getPriority
public long getPriority()
- Description copied from interface:
LockedExternalTask
- Returns the priority of the locked external task.
The default priority is 0.
- Specified by:
getPriority
in interface LockedExternalTask
- Returns:
- the priority of the external task
fromEntity
public static LockedExternalTaskImpl fromEntity(ExternalTaskEntity externalTaskEntity,
List<String> variablesToFetch,
boolean deserializeVariables)
- Construct representation of locked ExternalTask from corresponding entity.
During mapping variables will be collected,during collection variables will not be deserialized
and scope will not be set to local.
- Parameters:
externalTaskEntity
- - source persistent entity to use for fieldsvariablesToFetch
- - list of variable names to fetch, if null then all variables will be fetched
- Returns:
- object with all fields copied from the ExternalTaskEntity, error details fetched from the
database and variables attached
- See Also:
org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope#collectVariables(VariableMapImpl, Collection, boolean, boolean)}
Copyright © 2017 camunda services GmbH. All rights reserved.