Package org.camunda.bpm.client.impl
Class EngineClient
- java.lang.Object
-
- org.camunda.bpm.client.impl.EngineClient
-
public class EngineClient extends Object
- Author:
- Tassilo Weidner
-
-
Field Summary
Fields Modifier and Type Field Description protected Long
asyncResponseTimeout
protected String
baseUrl
static String
BPMN_ERROR_RESOURCE_PATH
static String
COMPLETE_RESOURCE_PATH
protected RequestExecutor
engineInteraction
static String
EXECUTION_ID_RESOURCE_PATH
static String
EXECUTION_RESOURCE_PATH
static String
EXTEND_LOCK_RESOURCE_PATH
protected static String
EXTERNAL_TASK__PROCESS_RESOURCE_PATH
protected static String
EXTERNAL_TASK_RESOURCE_PATH
static String
FAILURE_RESOURCE_PATH
protected static String
FETCH_AND_LOCK_RESOURCE_PATH
static String
GET_LOCAL_BINARY_VARIABLE
static String
GET_LOCAL_VARIABLE
static String
ID_PATH_PARAM
protected static String
ID_RESOURCE_PATH
static String
LOCK_RESOURCE_PATH
protected int
maxTasks
static String
NAME_PATH_PARAM
static String
SET_VARIABLES_RESOURCE_PATH
protected TypedValues
typedValues
static String
UNLOCK_RESOURCE_PATH
protected boolean
usePriority
protected String
workerId
-
Constructor Summary
Constructors Constructor Description EngineClient(String workerId, int maxTasks, Long asyncResponseTimeout, String baseUrl, RequestExecutor engineInteraction)
EngineClient(String workerId, int maxTasks, Long asyncResponseTimeout, String baseUrl, RequestExecutor engineInteraction, boolean usePriority)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bpmnError(String taskId, String errorCode, String errorMessage, Map<String,Object> variables)
void
complete(String taskId, Map<String,Object> variables, Map<String,Object> localVariables)
void
extendLock(String taskId, long newDuration)
void
failure(String taskId, String errorMessage, String errorDetails, int retries, long retryTimeout, Map<String,Object> variables, Map<String,Object> localVariables)
List<ExternalTask>
fetchAndLock(List<TopicRequestDto> topics)
String
getBaseUrl()
byte[]
getLocalBinaryVariable(String variableName, String processInstanceId)
String
getWorkerId()
boolean
isUsePriority()
void
lock(String taskId, long lockDuration)
void
setTypedValues(TypedValues typedValues)
void
setVariables(String proccessId, Map<String,Object> variables)
void
unlock(String taskId)
-
-
-
Field Detail
-
EXTERNAL_TASK_RESOURCE_PATH
protected static final String EXTERNAL_TASK_RESOURCE_PATH
- See Also:
- Constant Field Values
-
EXTERNAL_TASK__PROCESS_RESOURCE_PATH
protected static final String EXTERNAL_TASK__PROCESS_RESOURCE_PATH
- See Also:
- Constant Field Values
-
FETCH_AND_LOCK_RESOURCE_PATH
protected static final String FETCH_AND_LOCK_RESOURCE_PATH
- See Also:
- Constant Field Values
-
ID_PATH_PARAM
public static final String ID_PATH_PARAM
- See Also:
- Constant Field Values
-
ID_RESOURCE_PATH
protected static final String ID_RESOURCE_PATH
- See Also:
- Constant Field Values
-
LOCK_RESOURCE_PATH
public static final String LOCK_RESOURCE_PATH
- See Also:
- Constant Field Values
-
EXTEND_LOCK_RESOURCE_PATH
public static final String EXTEND_LOCK_RESOURCE_PATH
- See Also:
- Constant Field Values
-
SET_VARIABLES_RESOURCE_PATH
public static final String SET_VARIABLES_RESOURCE_PATH
- See Also:
- Constant Field Values
-
UNLOCK_RESOURCE_PATH
public static final String UNLOCK_RESOURCE_PATH
- See Also:
- Constant Field Values
-
COMPLETE_RESOURCE_PATH
public static final String COMPLETE_RESOURCE_PATH
- See Also:
- Constant Field Values
-
FAILURE_RESOURCE_PATH
public static final String FAILURE_RESOURCE_PATH
- See Also:
- Constant Field Values
-
BPMN_ERROR_RESOURCE_PATH
public static final String BPMN_ERROR_RESOURCE_PATH
- See Also:
- Constant Field Values
-
NAME_PATH_PARAM
public static final String NAME_PATH_PARAM
- See Also:
- Constant Field Values
-
EXECUTION_RESOURCE_PATH
public static final String EXECUTION_RESOURCE_PATH
- See Also:
- Constant Field Values
-
EXECUTION_ID_RESOURCE_PATH
public static final String EXECUTION_ID_RESOURCE_PATH
- See Also:
- Constant Field Values
-
GET_LOCAL_VARIABLE
public static final String GET_LOCAL_VARIABLE
- See Also:
- Constant Field Values
-
GET_LOCAL_BINARY_VARIABLE
public static final String GET_LOCAL_BINARY_VARIABLE
- See Also:
- Constant Field Values
-
baseUrl
protected String baseUrl
-
workerId
protected String workerId
-
maxTasks
protected int maxTasks
-
usePriority
protected boolean usePriority
-
asyncResponseTimeout
protected Long asyncResponseTimeout
-
engineInteraction
protected RequestExecutor engineInteraction
-
typedValues
protected TypedValues typedValues
-
-
Constructor Detail
-
EngineClient
public EngineClient(String workerId, int maxTasks, Long asyncResponseTimeout, String baseUrl, RequestExecutor engineInteraction)
-
EngineClient
public EngineClient(String workerId, int maxTasks, Long asyncResponseTimeout, String baseUrl, RequestExecutor engineInteraction, boolean usePriority)
-
-
Method Detail
-
fetchAndLock
public List<ExternalTask> fetchAndLock(List<TopicRequestDto> topics) throws EngineClientException
- Throws:
EngineClientException
-
lock
public void lock(String taskId, long lockDuration) throws EngineClientException
- Throws:
EngineClientException
-
unlock
public void unlock(String taskId) throws EngineClientException
- Throws:
EngineClientException
-
complete
public void complete(String taskId, Map<String,Object> variables, Map<String,Object> localVariables) throws EngineClientException
- Throws:
EngineClientException
-
setVariables
public void setVariables(String proccessId, Map<String,Object> variables) throws EngineClientException
- Throws:
EngineClientException
-
failure
public void failure(String taskId, String errorMessage, String errorDetails, int retries, long retryTimeout, Map<String,Object> variables, Map<String,Object> localVariables) throws EngineClientException
- Throws:
EngineClientException
-
bpmnError
public void bpmnError(String taskId, String errorCode, String errorMessage, Map<String,Object> variables) throws EngineClientException
- Throws:
EngineClientException
-
extendLock
public void extendLock(String taskId, long newDuration) throws EngineClientException
- Throws:
EngineClientException
-
getLocalBinaryVariable
public byte[] getLocalBinaryVariable(String variableName, String processInstanceId) throws EngineClientException
- Throws:
EngineClientException
-
getBaseUrl
public String getBaseUrl()
-
getWorkerId
public String getWorkerId()
-
setTypedValues
public void setTypedValues(TypedValues typedValues)
-
isUsePriority
public boolean isUsePriority()
-
-