Package org.camunda.bpm.client.task.impl
Class ExternalTaskImpl
java.lang.Object
org.camunda.bpm.client.task.impl.ExternalTaskImpl
- All Implemented Interfaces:
ExternalTask
- Author:
- Tassilo Weidner
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
protected String
protected String
protected Date
protected String
protected String
protected String
protected String
protected Date
protected long
protected String
protected String
protected String
protected String
protected Map<String,
VariableValue> protected Integer
protected String
protected String
protected Map<String,
TypedValueField> protected String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
formatTimeField
(String timeField, Date time) Returns untyped variables that exist in the task's ancestor execution hierarchyReturns typed variables that exist in the task's ancestor execution hierarchygetAllVariablesTyped
(boolean deserializeObjectValues) Returns typed variables that exist in the task's ancestor execution hierarchyReturns the business key of the process instance the external task is associated withReturns all available extension properties.getExtensionProperty
(String propertyKey) Returns the value of the extension property for a given key ornull
if the property was not available.getId()
long
<T> T
getVariable
(String variableName) Returns an untyped variable of the task's ancestor execution hierarchy<T extends TypedValue>
TgetVariableTyped
(String variableName) Returns a typed variable of the task's ancestor execution hierarchy<T extends TypedValue>
TgetVariableTyped
(String variableName, boolean deserializeObjectValues) Returns a typed variable of the task's ancestor execution hierarchyvoid
setActivityId
(String activityId) void
setActivityInstanceId
(String activityInstanceId) void
setBusinessKey
(String businessKey) void
setCreateTime
(Date createTime) void
setErrorDetails
(String errorDetails) void
setErrorMessage
(String errorMessage) void
setExecutionId
(String executionId) void
setExtensionProperties
(Map<String, String> extensionProperties) void
void
setLockExpirationTime
(Date lockExpirationTime) void
setPriority
(long priority) void
setProcessDefinitionId
(String processDefinitionId) void
setProcessDefinitionKey
(String processDefinitionKey) void
setProcessDefinitionVersionTag
(String processDefinitionVersionTag) void
setProcessInstanceId
(String processInstanceId) void
setReceivedVariableMap
(Map<String, VariableValue> receivedVariableMap) void
setRetries
(Integer retries) void
setTenantId
(String tenantId) void
setTopicName
(String topicName) void
setVariables
(Map<String, TypedValueField> variables) void
setWorkerId
(String workerId) toString()
-
Field Details
-
activityId
-
activityInstanceId
-
errorMessage
-
errorDetails
-
executionId
-
id
-
lockExpirationTime
-
createTime
-
processDefinitionId
-
processDefinitionKey
-
processDefinitionVersionTag
-
processInstanceId
-
retries
-
workerId
-
topicName
-
tenantId
-
priority
protected long priority -
variables
-
businessKey
-
extensionProperties
-
receivedVariableMap
-
-
Constructor Details
-
ExternalTaskImpl
public ExternalTaskImpl()
-
-
Method Details
-
setActivityId
-
setActivityInstanceId
-
setErrorMessage
-
setErrorDetails
-
setExecutionId
-
setId
-
setLockExpirationTime
-
setCreateTime
-
setProcessDefinitionId
-
setProcessDefinitionKey
-
setProcessDefinitionVersionTag
-
setProcessInstanceId
-
setRetries
-
setWorkerId
-
setTopicName
-
setTenantId
-
setPriority
public void setPriority(long priority) -
setVariables
-
setBusinessKey
-
getVariables
-
setReceivedVariableMap
-
getActivityId
- Specified by:
getActivityId
in interfaceExternalTask
- Returns:
- the id of the activity that this external task belongs to
-
getActivityInstanceId
- Specified by:
getActivityInstanceId
in interfaceExternalTask
- Returns:
- the id of the activity instance that the external task belongs to
-
getErrorMessage
- Specified by:
getErrorMessage
in interfaceExternalTask
- Returns:
- the error message that was supplied when the last failure of this task was reported
-
getErrorDetails
- Specified by:
getErrorDetails
in interfaceExternalTask
- Returns:
- the error details submitted with the latest reported failure executing this task
-
getExecutionId
- Specified by:
getExecutionId
in interfaceExternalTask
- Returns:
- the id of the execution that the external task belongs to
-
getId
- Specified by:
getId
in interfaceExternalTask
- Returns:
- the id of the external task
-
getLockExpirationTime
- Specified by:
getLockExpirationTime
in interfaceExternalTask
- Returns:
- the time that the task's most recent lock expires or has expired
-
getCreateTime
- Specified by:
getCreateTime
in interfaceExternalTask
- Returns:
- the time that the task was created.
-
getProcessDefinitionId
- Specified by:
getProcessDefinitionId
in interfaceExternalTask
- Returns:
- the id of the process definition the external task is defined in
-
getProcessDefinitionKey
- Specified by:
getProcessDefinitionKey
in interfaceExternalTask
- Returns:
- the key of the process definition the external task is defined in
-
getProcessDefinitionVersionTag
- Specified by:
getProcessDefinitionVersionTag
in interfaceExternalTask
- Returns:
- the version tag of the process definition the tasks activity belongs to
-
getProcessInstanceId
- Specified by:
getProcessInstanceId
in interfaceExternalTask
- Returns:
- the id of the process instance the external task belongs to
-
getRetries
- Specified by:
getRetries
in interfaceExternalTask
- Returns:
- the number of retries the task currently has left
-
getWorkerId
- Specified by:
getWorkerId
in interfaceExternalTask
- Returns:
- the id of the worker that possesses or possessed the most recent lock
-
getTopicName
- Specified by:
getTopicName
in interfaceExternalTask
- Returns:
- the topic name of the external task
-
getTenantId
- Specified by:
getTenantId
in interfaceExternalTask
- Returns:
- the id of the tenant the external task belongs to
-
getPriority
public long getPriority()- Specified by:
getPriority
in interfaceExternalTask
- Returns:
- the priority of the external task
-
getBusinessKey
Description copied from interface:ExternalTask
Returns the business key of the process instance the external task is associated with- Specified by:
getBusinessKey
in interfaceExternalTask
- Returns:
- the business key
-
getAllVariables
Description copied from interface:ExternalTask
Returns untyped variables that exist in the task's ancestor execution hierarchy- Specified by:
getAllVariables
in interfaceExternalTask
- Returns:
- a map of untyped variables that contains an entry for each variable
-
getVariable
Description copied from interface:ExternalTask
Returns an untyped variable of the task's ancestor execution hierarchy- Specified by:
getVariable
in interfaceExternalTask
- Type Parameters:
T
- the type of the variable- Parameters:
variableName
- of the variable to be returned- Returns:
- an untyped variable if such a named variable exists
- null if such a named variable not exists
-
getAllVariablesTyped
Description copied from interface:ExternalTask
Returns typed variables that exist in the task's ancestor execution hierarchy- Specified by:
getAllVariablesTyped
in interfaceExternalTask
- Returns:
- a map of typed variables that contains an entry for each variable
-
getAllVariablesTyped
Description copied from interface:ExternalTask
Returns typed variables that exist in the task's ancestor execution hierarchy- Specified by:
getAllVariablesTyped
in interfaceExternalTask
- Parameters:
deserializeObjectValues
--
false
to retrieve the object without deserialization -
true
to retrieve the deserialized object
-
- Returns:
- a map of typed variables that contains an entry for each variable
-
getVariableTyped
Description copied from interface:ExternalTask
Returns a typed variable of the task's ancestor execution hierarchy- Specified by:
getVariableTyped
in interfaceExternalTask
- Type Parameters:
T
- the type of the variable- Parameters:
variableName
- of the variable to be returned- Returns:
- a typed variable if such a named variable exists
- null if such a named variable not exists
-
getVariableTyped
public <T extends TypedValue> T getVariableTyped(String variableName, boolean deserializeObjectValues) Description copied from interface:ExternalTask
Returns a typed variable of the task's ancestor execution hierarchy- Specified by:
getVariableTyped
in interfaceExternalTask
- Type Parameters:
T
- the type of the variable- Parameters:
variableName
- of the variable to be returneddeserializeObjectValues
--
false
to retrieve the object without deserialization -
true
to retrieve the deserialized object
-
- Returns:
- a typed variable if such a named variable exists
- null if such a named variable not exists
-
getExtensionProperties
Description copied from interface:ExternalTask
Returns all available extension properties. Extension properties must be defined at the external task activity inside the BPMN model and explicitly fetched (e.g. by callingTopicSubscriptionBuilder.includeExtensionProperties(boolean)
) to be available. If no extension properties are available the returned map will be empty.- Specified by:
getExtensionProperties
in interfaceExternalTask
- Returns:
- a map of available extension properties, never
null
-
setExtensionProperties
-
getExtensionProperty
Description copied from interface:ExternalTask
Returns the value of the extension property for a given key ornull
if the property was not available.- Specified by:
getExtensionProperty
in interfaceExternalTask
- Returns:
- the extension property, or
null
if not available - See Also:
-
toString
-
formatTimeField
-