Package org.camunda.bpm.client.task
Interface ExternalTask
-
- All Known Implementing Classes:
ExternalTaskImpl
public interface ExternalTask
Represents an external task
- Author:
- Tassilo Weidner
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getActivityId()
String
getActivityInstanceId()
Map<String,Object>
getAllVariables()
Returns untyped variables that exist in the task's ancestor execution hierarchyVariableMap
getAllVariablesTyped()
Returns typed variables that exist in the task's ancestor execution hierarchyVariableMap
getAllVariablesTyped(boolean deserializeObjectValues)
Returns typed variables that exist in the task's ancestor execution hierarchyString
getBusinessKey()
Returns the business key of the process instance the external task is associated withString
getErrorDetails()
String
getErrorMessage()
String
getExecutionId()
Map<String,String>
getExtensionProperties()
Returns all available extension properties.String
getExtensionProperty(String propertyKey)
Returns the value of the extension property for a given key ornull
if the property was not available.String
getId()
Date
getLockExpirationTime()
long
getPriority()
String
getProcessDefinitionId()
String
getProcessDefinitionKey()
String
getProcessDefinitionVersionTag()
String
getProcessInstanceId()
Integer
getRetries()
String
getTenantId()
String
getTopicName()
<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 deserializeObjectValue)
Returns a typed variable of the task's ancestor execution hierarchyString
getWorkerId()
-
-
-
Method Detail
-
getActivityId
String getActivityId()
- Returns:
- the id of the activity that this external task belongs to
-
getActivityInstanceId
String getActivityInstanceId()
- Returns:
- the id of the activity instance that the external task belongs to
-
getErrorMessage
String getErrorMessage()
- Returns:
- the error message that was supplied when the last failure of this task was reported
-
getErrorDetails
String getErrorDetails()
- Returns:
- the error details submitted with the latest reported failure executing this task
-
getExecutionId
String getExecutionId()
- Returns:
- the id of the execution that the external task belongs to
-
getId
String getId()
- Returns:
- the id of the external task
-
getLockExpirationTime
Date getLockExpirationTime()
- Returns:
- the date that the task's most recent lock expires or has expired
-
getProcessDefinitionId
String getProcessDefinitionId()
- Returns:
- the id of the process definition the external task is defined in
-
getProcessDefinitionKey
String getProcessDefinitionKey()
- Returns:
- the key of the process definition the external task is defined in
-
getProcessDefinitionVersionTag
String getProcessDefinitionVersionTag()
- Returns:
- the version tag of the process definition the tasks activity belongs to
-
getProcessInstanceId
String getProcessInstanceId()
- Returns:
- the id of the process instance the external task belongs to
-
getRetries
Integer getRetries()
- Returns:
- the number of retries the task currently has left
-
getWorkerId
String getWorkerId()
- Returns:
- the id of the worker that possesses or possessed the most recent lock
-
getTopicName
String getTopicName()
- Returns:
- the topic name of the external task
-
getTenantId
String getTenantId()
- Returns:
- the id of the tenant the external task belongs to
-
getPriority
long getPriority()
- Returns:
- the priority of the external task
-
getVariable
<T> T getVariable(String variableName)
Returns an untyped variable of the task's ancestor execution hierarchy- 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
- Throws:
ValueMapperException
- if an object cannot be deserialized
-
getVariableTyped
<T extends TypedValue> T getVariableTyped(String variableName)
Returns a typed variable of the task's ancestor execution hierarchy- 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
- Throws:
ValueMapperException
- if an object cannot be deserialized
-
getVariableTyped
<T extends TypedValue> T getVariableTyped(String variableName, boolean deserializeObjectValue)
Returns a typed variable of the task's ancestor execution hierarchy- Type Parameters:
T
- the type of the variable- Parameters:
variableName
- of the variable to be returneddeserializeObjectValue
--
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
- Throws:
ValueMapperException
- if an object cannot be deserialized
-
getAllVariables
Map<String,Object> getAllVariables()
Returns untyped variables that exist in the task's ancestor execution hierarchy- Returns:
- a map of untyped variables that contains an entry for each variable
- Throws:
ValueMapperException
- if an object cannot be deserialized
-
getAllVariablesTyped
VariableMap getAllVariablesTyped()
Returns typed variables that exist in the task's ancestor execution hierarchy- Returns:
- a map of typed variables that contains an entry for each variable
- Throws:
ValueMapperException
- if an object cannot be deserialized
-
getAllVariablesTyped
VariableMap getAllVariablesTyped(boolean deserializeObjectValues)
Returns typed variables that exist in the task's ancestor execution hierarchy- 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
- Throws:
ValueMapperException
- if an object cannot be deserialized
-
getBusinessKey
String getBusinessKey()
Returns the business key of the process instance the external task is associated with- Returns:
- the business key
-
getExtensionProperty
String getExtensionProperty(String propertyKey)
Returns the value of the extension property for a given key ornull
if the property was not available.- Returns:
- the extension property, or
null
if not available - See Also:
getExtensionProperties()
-
getExtensionProperties
Map<String,String> getExtensionProperties()
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.- Returns:
- a map of available extension properties, never
null
-
-