curl --request GET \
--url http://{host}:{port}/{contextPath}/external-task \
--header 'Authorization: Basic <encoded-value>'import requests
url = "http://{host}:{port}/{contextPath}/external-task"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('http://{host}:{port}/{contextPath}/external-task', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "62437",
CURLOPT_URL => "http://{host}:{port}/{contextPath}/external-task",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://{host}:{port}/{contextPath}/external-task"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://{host}:{port}/{contextPath}/external-task")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("http://{host}:{port}/{contextPath}/external-task")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body[
{
"activityId": "anActivityId",
"activityInstanceId": "anActivityInstanceId",
"errorMessage": "anErrorMessage",
"executionId": "anExecutionId",
"id": "anExternalTaskId",
"lockExpirationTime": "2015-10-06T16:34:42.000+0200",
"createTime": "2015-10-06T16:34:42.000+0200",
"processDefinitionId": "aProcessDefinitionId",
"processDefinitionKey": "aProcessDefinitionKey",
"processInstanceId": "aProcessInstanceId",
"tenantId": null,
"retries": 3,
"suspended": false,
"workerId": "aWorkerId",
"topicName": "aTopic",
"priority": 9,
"businessKey": "aBusinessKey"
},
{
"activityId": "anotherActivityId",
"activityInstanceId": "anotherActivityInstanceId",
"errorMessage": "anotherErrorMessage",
"executionId": "anotherExecutionId",
"id": "anotherExternalTaskId",
"lockExpirationTime": "2015-10-06T16:34:42.000+0200",
"createTime": "2015-10-06T16:34:42.000+0200",
"processDefinitionId": "anotherProcessDefinitionId",
"processDefinitionKey": "anotherProcessDefinitionKey",
"processInstanceId": "anotherProcessInstanceId",
"tenantId": null,
"retries": 1,
"suspended": false,
"workerId": "aWorkerId",
"topicName": "aTopic",
"priority": 3,
"businessKey": "aBusinessKey"
}
]Get List
Queries for the external tasks that fulfill given parameters. Parameters may be static as well as dynamic runtime properties of executions. The size of the result set can be retrieved by using the Get External Task Count method.
curl --request GET \
--url http://{host}:{port}/{contextPath}/external-task \
--header 'Authorization: Basic <encoded-value>'import requests
url = "http://{host}:{port}/{contextPath}/external-task"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('http://{host}:{port}/{contextPath}/external-task', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "62437",
CURLOPT_URL => "http://{host}:{port}/{contextPath}/external-task",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://{host}:{port}/{contextPath}/external-task"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://{host}:{port}/{contextPath}/external-task")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("http://{host}:{port}/{contextPath}/external-task")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body[
{
"activityId": "anActivityId",
"activityInstanceId": "anActivityInstanceId",
"errorMessage": "anErrorMessage",
"executionId": "anExecutionId",
"id": "anExternalTaskId",
"lockExpirationTime": "2015-10-06T16:34:42.000+0200",
"createTime": "2015-10-06T16:34:42.000+0200",
"processDefinitionId": "aProcessDefinitionId",
"processDefinitionKey": "aProcessDefinitionKey",
"processInstanceId": "aProcessInstanceId",
"tenantId": null,
"retries": 3,
"suspended": false,
"workerId": "aWorkerId",
"topicName": "aTopic",
"priority": 9,
"businessKey": "aBusinessKey"
},
{
"activityId": "anotherActivityId",
"activityInstanceId": "anotherActivityInstanceId",
"errorMessage": "anotherErrorMessage",
"executionId": "anotherExecutionId",
"id": "anotherExternalTaskId",
"lockExpirationTime": "2015-10-06T16:34:42.000+0200",
"createTime": "2015-10-06T16:34:42.000+0200",
"processDefinitionId": "anotherProcessDefinitionId",
"processDefinitionKey": "anotherProcessDefinitionKey",
"processInstanceId": "anotherProcessInstanceId",
"tenantId": null,
"retries": 1,
"suspended": false,
"workerId": "aWorkerId",
"topicName": "aTopic",
"priority": 3,
"businessKey": "aBusinessKey"
}
]Authorizations
Query Parameters
Restrict to external tasks that have a lock that expires after a given date. By
default, the date must have the format
yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.000+0200.
Restrict to external tasks that have a lock that expires before a given date. By
default, the date must have the format
yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.000+0200.
Only include tasks that belong to process instances that have variables with certain values. Variable filtering expressions are comma-separated and are structured as follows:
A valid parameter value has the form key_operator_value. key is the variable name,
operator is the comparison operator to be used and value the variable value.
Note: Values are always treated as String objects on server side.
Valid operator values are:
eq - equal to;
neq - not equal to;
gt - greater than;
gteq - greater than or equal to;
lt - lower than;
lteq - lower than or equal to;
like;
notLike.
key and value may not contain underscore or comma characters.
Response
Request successful.