Get Historic Decision Instance
curl --request GET \
--url http://{host}:{port}/{contextPath}/history/decision-instance/{id} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "http://{host}:{port}/{contextPath}/history/decision-instance/{id}"
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}/history/decision-instance/{id}', 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}/history/decision-instance/{id}",
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}/history/decision-instance/{id}"
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}/history/decision-instance/{id}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("http://{host}:{port}/{contextPath}/history/decision-instance/{id}")
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": "assignApprover",
"activityInstanceId": "assignApprover:67e9de1e-579d-11e5-9848-f0def1e59da8",
"collectResultValue": null,
"decisionDefinitionId": "invoice-assign-approver:1:4c864d79-579d-11e5-9848-f0def1e59da8",
"decisionDefinitionKey": "invoice-assign-approver",
"decisionDefinitionName": "Assign Approver",
"evaluationTime": "2015-09-10T11:22:06.000+0200",
"removalTime": null,
"id": "67ea2c3f-579d-11e5-9848-f0def1e59da8",
"inputs": [
{
"clauseId": "clause1",
"clauseName": "Invoice Amount",
"decisionInstanceId": "67ea2c3f-579d-11e5-9848-f0def1e59da8",
"errorMessage": null,
"id": "67ea2c41-579d-11e5-9848-f0def1e59da8",
"type": "Double",
"createTime": "2015-09-10T11:22:06.000+0200",
"removalTime": null,
"rootProcessInstanceId": "aRootProcessInstanceId",
"value": 123,
"valueInfo": {}
},
{
"clauseId": "clause2",
"clauseName": "Invoice Category",
"decisionInstanceId": "67ea2c3f-579d-11e5-9848-f0def1e59da8",
"errorMessage": null,
"id": "67ea2c40-579d-11e5-9848-f0def1e59da8",
"type": "String",
"createTime": "2015-09-10T11:22:06.000+0200",
"removalTime": null,
"rootProcessInstanceId": "aRootProcessInstanceId",
"value": "Misc",
"valueInfo": {}
}
],
"outputs": [
{
"clauseId": "clause3",
"clauseName": "Approver Group",
"decisionInstanceId": "67ea2c3f-579d-11e5-9848-f0def1e59da8",
"errorMessage": null,
"id": "67ea2c42-579d-11e5-9848-f0def1e59da8",
"ruleId": "DecisionRule_1of5a87",
"ruleOrder": 1,
"type": "String",
"createTime": "2015-09-10T11:22:06.000+0200",
"removalTime": null,
"rootProcessInstanceId": "aRootProcessInstanceId",
"value": "accounting",
"valueInfo": {},
"variableName": "result"
}
],
"processDefinitionId": "invoice:1:4c6e3197-579d-11e5-9848-f0def1e59da8",
"processDefinitionKey": "invoice",
"processInstanceId": "67e98fec-579d-11e5-9848-f0def1e59da8",
"rootProcessInstanceId": "f8259e5d-ab9d-11e8-8449-e4a7a094a9d6",
"caseDefinitionId": null,
"caseDefinitionKey": null,
"caseInstanceId": null,
"tenantId": null,
"userId": null,
"rootDecisionInstanceId": null,
"decisionRequirementsDefinitionId": null,
"decisionRequirementsDefinitionKey": null
}历史决策实例
根据Id获取
Retrieves a historic decision instance by id, according to the
HistoricDecisionInstance interface in the engine.
GET
/
history
/
decision-instance
/
{id}
Get Historic Decision Instance
curl --request GET \
--url http://{host}:{port}/{contextPath}/history/decision-instance/{id} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "http://{host}:{port}/{contextPath}/history/decision-instance/{id}"
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}/history/decision-instance/{id}', 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}/history/decision-instance/{id}",
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}/history/decision-instance/{id}"
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}/history/decision-instance/{id}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("http://{host}:{port}/{contextPath}/history/decision-instance/{id}")
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": "assignApprover",
"activityInstanceId": "assignApprover:67e9de1e-579d-11e5-9848-f0def1e59da8",
"collectResultValue": null,
"decisionDefinitionId": "invoice-assign-approver:1:4c864d79-579d-11e5-9848-f0def1e59da8",
"decisionDefinitionKey": "invoice-assign-approver",
"decisionDefinitionName": "Assign Approver",
"evaluationTime": "2015-09-10T11:22:06.000+0200",
"removalTime": null,
"id": "67ea2c3f-579d-11e5-9848-f0def1e59da8",
"inputs": [
{
"clauseId": "clause1",
"clauseName": "Invoice Amount",
"decisionInstanceId": "67ea2c3f-579d-11e5-9848-f0def1e59da8",
"errorMessage": null,
"id": "67ea2c41-579d-11e5-9848-f0def1e59da8",
"type": "Double",
"createTime": "2015-09-10T11:22:06.000+0200",
"removalTime": null,
"rootProcessInstanceId": "aRootProcessInstanceId",
"value": 123,
"valueInfo": {}
},
{
"clauseId": "clause2",
"clauseName": "Invoice Category",
"decisionInstanceId": "67ea2c3f-579d-11e5-9848-f0def1e59da8",
"errorMessage": null,
"id": "67ea2c40-579d-11e5-9848-f0def1e59da8",
"type": "String",
"createTime": "2015-09-10T11:22:06.000+0200",
"removalTime": null,
"rootProcessInstanceId": "aRootProcessInstanceId",
"value": "Misc",
"valueInfo": {}
}
],
"outputs": [
{
"clauseId": "clause3",
"clauseName": "Approver Group",
"decisionInstanceId": "67ea2c3f-579d-11e5-9848-f0def1e59da8",
"errorMessage": null,
"id": "67ea2c42-579d-11e5-9848-f0def1e59da8",
"ruleId": "DecisionRule_1of5a87",
"ruleOrder": 1,
"type": "String",
"createTime": "2015-09-10T11:22:06.000+0200",
"removalTime": null,
"rootProcessInstanceId": "aRootProcessInstanceId",
"value": "accounting",
"valueInfo": {},
"variableName": "result"
}
],
"processDefinitionId": "invoice:1:4c6e3197-579d-11e5-9848-f0def1e59da8",
"processDefinitionKey": "invoice",
"processInstanceId": "67e98fec-579d-11e5-9848-f0def1e59da8",
"rootProcessInstanceId": "f8259e5d-ab9d-11e8-8449-e4a7a094a9d6",
"caseDefinitionId": null,
"caseDefinitionKey": null,
"caseInstanceId": null,
"tenantId": null,
"userId": null,
"rootDecisionInstanceId": null,
"decisionRequirementsDefinitionId": null,
"decisionRequirementsDefinitionKey": null
}Authorizations
Query Parameters
Response
Request successful.
The time the instance was evaluated.
Default format yyyy-MM-dd'T'HH:mm:ss.SSSZ.
The time after which the instance should be removed by the History Cleanup job.
Default format yyyy-MM-dd'T'HH:mm:ss.SSSZ.