Package org.camunda.bpm.client.topic
Interface TopicSubscriptionBuilder
- All Known Implementing Classes:
TopicSubscriptionBuilderImpl
public interface TopicSubscriptionBuilder
A fluent builder to configure the topic subscription
- Author:
- Tassilo Weidner
-
Method Summary
Modifier and TypeMethodDescriptionbusinessKey
(String businessKey) handler
(ExternalTaskHandler handler) includeExtensionProperties
(boolean includeExtensionProperties) localVariables
(boolean localVariables) lockDuration
(long lockDuration) open()
Release the topic subscription for being executed asynchronouslyprocessDefinitionId
(String processDefinitionId) processDefinitionIdIn
(String... processDefinitionIds) processDefinitionKey
(String processDefinitionKey) processDefinitionKeyIn
(String... processDefinitionKeys) processDefinitionVersionTag
(String processDefinitionVersionTag) processVariableEquals
(String name, Object value) processVariablesEqualsIn
(Map<String, Object> processVariables) tenantIdIn
(String... tenantIds) Filter for external tasks without tenant
-
Method Details
-
lockDuration
- Parameters:
lockDuration
-- in milliseconds to lock the external tasks
- must be greater than zero
- the default lock duration is 20 seconds (20,000 milliseconds)
- overrides the lock duration configured on bootstrapping the client
- Returns:
- the builder
-
handler
- Parameters:
handler
- which will be executed for the external task- Returns:
- the builder
-
variables
- Parameters:
variableNames
- of variables which are supposed to be retrieved- Returns:
- the builder
-
localVariables
- Parameters:
localVariables
- whether or not variables from greater scope than the external task should be fetched.false
means all variables visible in the scope of the external task will be fetched,true
means only local variables (to the scope of the external task) will be fetched- Returns:
- the builder
-
businessKey
- Parameters:
businessKey
- to filter for external tasks that are supposed to be fetched and locked- Returns:
- the builder
-
processDefinitionId
- Parameters:
processDefinitionId
- to filter for external tasks that are supposed to be fetched and locked- Returns:
- the builder
-
processDefinitionIdIn
- Parameters:
processDefinitionIds
- to filter for external tasks that are supposed to be fetched and locked- Returns:
- the builder
-
processDefinitionKey
- Parameters:
processDefinitionKey
- to filter for external tasks that are supposed to be fetched and locked- Returns:
- the builder
-
processDefinitionKeyIn
- Parameters:
processDefinitionKeys
- to filter for external tasks that are supposed to be fetched and locked- Returns:
- the builder
-
processDefinitionVersionTag
- Parameters:
processDefinitionKeys
- to filter for external tasks that are supposed to be fetched and locked- Returns:
- the builder
-
processVariablesEqualsIn
- Parameters:
processVariables
- of which the external tasks to be retrieved are related to- Returns:
- the builder
-
processVariableEquals
- Parameters:
processVariables
- of which the external tasks to be retrieved are related to When called more than once, retrieves tasks related to ANY of the given processVariables In such cases, consider usingprocessVariablesEqualsIn(Map<String, Object>)
instead- Returns:
- the builder
-
withoutTenantId
TopicSubscriptionBuilder withoutTenantId()Filter for external tasks without tenant- Returns:
- the builder
-
tenantIdIn
- Parameters:
tenantIds
- to filter for external tasks that are supposed to be fetched and locked- Returns:
- the builder
-
includeExtensionProperties
- Parameters:
includeExtensionProperties
- whether or not to include custom extension properties for fetched external tasks.true
means all extensionProperties defined in the external task activity will be provided.false
means custom extension properties are not available within the external-task-client. The default isfalse
.- Returns:
- the builder
-
open
TopicSubscription open()Release the topic subscription for being executed asynchronously- Returns:
- the builder
- Throws:
ExternalTaskClientException
-- if topic name is null or an empty string
- if lock duration is not greater than zero
- if external task handler is null
- if topic name has already been subscribed
-