public interface ExternalWorkerJobAcquireBuilder
| Modifier and Type | Method and Description |
|---|---|
default List<AcquiredExternalWorkerJob> |
acquireAndLock(int numberOfTasks,
String workerId)
Acquire and lock the given number of jobs for the given worker id.
|
List<AcquiredExternalWorkerJob> |
acquireAndLock(int numberOfTasks,
String workerId,
int numberOfRetries)
Acquire and lock the given number of jobs for the given worker id.
|
ExternalWorkerJobAcquireBuilder |
forUserOrGroups(String userId,
Collection<String> groups)
Acquire only jobs where the given user or groups are authorized to execute.
|
ExternalWorkerJobAcquireBuilder |
onlyBpmn()
Acquire only jobs which are linked to a process instance.
|
ExternalWorkerJobAcquireBuilder |
onlyCmmn()
Acquire only jobs which are linked to a case instance.
|
ExternalWorkerJobAcquireBuilder |
scopeType(String scopeType)
Acquire only jobs which are linked to the given scope type.
|
ExternalWorkerJobAcquireBuilder |
tenantId(String tenantId)
Acquire only jobs which are within the given tenant.
|
ExternalWorkerJobAcquireBuilder |
topic(String topic,
Duration lockDuration)
The topic and lock duration for the requested jobs
|
ExternalWorkerJobAcquireBuilder topic(String topic, Duration lockDuration)
topic - the topic of the jobslockDuration - the duration for locking the jobsExternalWorkerJobAcquireBuilder onlyBpmn()
onlyCmmn() and scopeType(String)ExternalWorkerJobAcquireBuilder onlyCmmn()
onlyBpmn() and scopeType(String)ExternalWorkerJobAcquireBuilder scopeType(String scopeType)
onlyBpmn() or onlyCmmn()ExternalWorkerJobAcquireBuilder tenantId(String tenantId)
ExternalWorkerJobAcquireBuilder forUserOrGroups(String userId, Collection<String> groups)
default List<AcquiredExternalWorkerJob> acquireAndLock(int numberOfTasks, String workerId)
acquireAndLock(int, String, int) if you need more retries.
If it fails to lock the jobs / scope after 5 retries it will return an empty listnumberOfTasks - the number of jobs to acquireworkerId - the id of the worker acquiring the jobsList<AcquiredExternalWorkerJob> acquireAndLock(int numberOfTasks, String workerId, int numberOfRetries)
numberOfRetries it will return an empty listnumberOfTasks - the number of jobs to acquireworkerId - the id of the worker acquiring the jobsnumberOfRetries - the number of retries if an optimistic lock exception occurs during acquiringCopyright © 2021 Flowable. All rights reserved.