Class LockedExternalTaskImpl
java.lang.Object
org.camunda.bpm.engine.impl.externaltask.LockedExternalTaskImpl
- All Implemented Interfaces:
LockedExternalTask
- Author:
- Thorben Lindhauer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected Stringprotected Stringprotected Dateprotected Stringprotected Stringprotected Stringprotected Stringprotected Dateprotected longprotected Stringprotected Stringprotected Stringprotected Stringprotected Integerprotected Stringprotected Stringprotected VariableMapImplprotected String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LockedExternalTaskImplfromEntity(ExternalTaskEntity externalTaskEntity, List<String> variablesToFetch, boolean isLocal, boolean deserializeVariables, boolean includeExtensionProperties) Construct representation of locked ExternalTask from corresponding entity.Returns the business key of the process instance the external task belongs toReturns a map of custom extension properties if the fetch instructions indicate to include extension properties.getId()longReturns the priority of the locked external task.
-
Field Details
-
id
-
topicName
-
workerId
-
lockExpirationTime
-
createTime
-
retries
-
errorMessage
-
errorDetails
-
processInstanceId
-
executionId
-
activityId
-
activityInstanceId
-
processDefinitionId
-
processDefinitionKey
-
processDefinitionVersionTag
-
tenantId
-
priority
protected long priority -
variables
-
businessKey
-
extensionProperties
-
-
Constructor Details
-
LockedExternalTaskImpl
public LockedExternalTaskImpl()
-
-
Method Details
-
getId
- Specified by:
getIdin interfaceLockedExternalTask- Returns:
- the id of the task
-
getTopicName
- Specified by:
getTopicNamein interfaceLockedExternalTask- Returns:
- the name of the topic the task belongs to
-
getWorkerId
- Specified by:
getWorkerIdin interfaceLockedExternalTask- Returns:
- the id of the worker that has locked the task
-
getLockExpirationTime
- Specified by:
getLockExpirationTimein interfaceLockedExternalTask- Returns:
- the absolute time at which the lock expires
-
getCreateTime
- Specified by:
getCreateTimein interfaceLockedExternalTask- Returns:
- the absolute time at which the task was created
-
getRetries
- Specified by:
getRetriesin interfaceLockedExternalTask- Returns:
- the number of retries left. The number of retries is provided by
a task client, therefore the initial value is
null.
-
getErrorMessage
- Specified by:
getErrorMessagein interfaceLockedExternalTask- Returns:
- the full error message submitted with the latest reported failure executing this task;
nullif no failure was reported previously or if no error message was submitted - See Also:
-
getProcessInstanceId
- Specified by:
getProcessInstanceIdin interfaceLockedExternalTask- Returns:
- the id of the process instance the task exists in
-
getExecutionId
- Specified by:
getExecutionIdin interfaceLockedExternalTask- Returns:
- the id of the execution that the task is assigned to
-
getActivityId
- Specified by:
getActivityIdin interfaceLockedExternalTask- Returns:
- the id of the activity for which the task is created
-
getActivityInstanceId
- Specified by:
getActivityInstanceIdin interfaceLockedExternalTask- Returns:
- the id of the activity instance in which context the task exists
-
getProcessDefinitionId
- Specified by:
getProcessDefinitionIdin interfaceLockedExternalTask- Returns:
- the id of the process definition the tasks activity belongs to
-
getProcessDefinitionKey
- Specified by:
getProcessDefinitionKeyin interfaceLockedExternalTask- Returns:
- the key of the process definition the tasks activity belongs to
-
getProcessDefinitionVersionTag
- Specified by:
getProcessDefinitionVersionTagin interfaceLockedExternalTask- Returns:
- the version tag of the process definition the tasks activity belongs to
-
getTenantId
- Specified by:
getTenantIdin interfaceLockedExternalTask- Returns:
- the id of the tenant the task belongs to. Can be
nullif the task belongs to no single tenant.
-
getVariables
- Specified by:
getVariablesin interfaceLockedExternalTask- 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 tasks ancestor execution hierarchy.
-
getErrorDetails
- Specified by:
getErrorDetailsin interfaceLockedExternalTask- Returns:
- error details submitted with the latest reported failure executing this task;
nullif no failure was reported previously or if no error details was submitted - See Also:
-
getPriority
public long getPriority()Description copied from interface:LockedExternalTaskReturns the priority of the locked external task. The default priority is 0.- Specified by:
getPriorityin interfaceLockedExternalTask- Returns:
- the priority of the external task
-
getBusinessKey
Description copied from interface:LockedExternalTaskReturns the business key of the process instance the external task belongs to- Specified by:
getBusinessKeyin interfaceLockedExternalTask- Returns:
- the business key
-
getExtensionProperties
Description copied from interface:LockedExternalTaskReturns a map of custom extension properties if the fetch instructions indicate to include extension properties. If extension properties are included, the returned map contains any extension property that is defined in the model definition of the external task. If extension properties not included or no properties are defined for the external task, the map will be empty.- Specified by:
getExtensionPropertiesin interfaceLockedExternalTask- Returns:
- a map with all defined custom extension properties, never
null
-
fromEntity
public static LockedExternalTaskImpl fromEntity(ExternalTaskEntity externalTaskEntity, List<String> variablesToFetch, boolean isLocal, boolean deserializeVariables, boolean includeExtensionProperties) 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 fetchedisLocal- - if true only local variables will be collected- Returns:
- object with all fields copied from the ExternalTaskEntity, error details fetched from the database and variables attached
-