Evaluate
curl --request POST \
--url http://{host}:{port}/{contextPath}/condition \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"variables": {
"temperature": {
"value": 24,
"type": "Integer",
"valueInfo": {
"transient": true
}
},
"city": {
"value": "Parma",
"type": "String"
}
},
"businessKey": "aBusinessKey",
"tenantId": "aTenantId"
}
'import requests
url = "http://{host}:{port}/{contextPath}/condition"
payload = {
"variables": {
"temperature": {
"value": 24,
"type": "Integer",
"valueInfo": { "transient": True }
},
"city": {
"value": "Parma",
"type": "String"
}
},
"businessKey": "aBusinessKey",
"tenantId": "aTenantId"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
variables: {
temperature: {value: 24, type: 'Integer', valueInfo: {transient: true}},
city: {value: 'Parma', type: 'String'}
},
businessKey: 'aBusinessKey',
tenantId: 'aTenantId'
})
};
fetch('http://{host}:{port}/{contextPath}/condition', 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}/condition",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'variables' => [
'temperature' => [
'value' => 24,
'type' => 'Integer',
'valueInfo' => [
'transient' => true
]
],
'city' => [
'value' => 'Parma',
'type' => 'String'
]
],
'businessKey' => 'aBusinessKey',
'tenantId' => 'aTenantId'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://{host}:{port}/{contextPath}/condition"
payload := strings.NewReader("{\n \"variables\": {\n \"temperature\": {\n \"value\": 24,\n \"type\": \"Integer\",\n \"valueInfo\": {\n \"transient\": true\n }\n },\n \"city\": {\n \"value\": \"Parma\",\n \"type\": \"String\"\n }\n },\n \"businessKey\": \"aBusinessKey\",\n \"tenantId\": \"aTenantId\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://{host}:{port}/{contextPath}/condition")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"variables\": {\n \"temperature\": {\n \"value\": 24,\n \"type\": \"Integer\",\n \"valueInfo\": {\n \"transient\": true\n }\n },\n \"city\": {\n \"value\": \"Parma\",\n \"type\": \"String\"\n }\n },\n \"businessKey\": \"aBusinessKey\",\n \"tenantId\": \"aTenantId\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://{host}:{port}/{contextPath}/condition")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"variables\": {\n \"temperature\": {\n \"value\": 24,\n \"type\": \"Integer\",\n \"valueInfo\": {\n \"transient\": true\n }\n },\n \"city\": {\n \"value\": \"Parma\",\n \"type\": \"String\"\n }\n },\n \"businessKey\": \"aBusinessKey\",\n \"tenantId\": \"aTenantId\"\n}"
response = http.request(request)
puts response.read_body[
{
"links": [],
"id": "aProcInstId",
"definitionId": "aProcDefId",
"businessKey": "aBusinessKey",
"caseInstanceId": null,
"ended": false,
"suspended": false,
"tenantId": "aTenantId"
},
{
"links": [],
"id": "anotherId",
"definitionId": "aProcDefId",
"businessKey": "aBusinessKey",
"caseInstanceId": null,
"ended": false,
"suspended": false,
"tenantId": "aTenantId"
}
]条件
触发条件评估
Triggers evaluation of conditions for conditional start event(s). Internally this maps to the engines condition evaluation builder method ConditionEvaluationBuilder#evaluateStartConditions(). For more information see the Conditional Start Events section of the BPMN 2.0 Implementation Reference.
POST
/
condition
Evaluate
curl --request POST \
--url http://{host}:{port}/{contextPath}/condition \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"variables": {
"temperature": {
"value": 24,
"type": "Integer",
"valueInfo": {
"transient": true
}
},
"city": {
"value": "Parma",
"type": "String"
}
},
"businessKey": "aBusinessKey",
"tenantId": "aTenantId"
}
'import requests
url = "http://{host}:{port}/{contextPath}/condition"
payload = {
"variables": {
"temperature": {
"value": 24,
"type": "Integer",
"valueInfo": { "transient": True }
},
"city": {
"value": "Parma",
"type": "String"
}
},
"businessKey": "aBusinessKey",
"tenantId": "aTenantId"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
variables: {
temperature: {value: 24, type: 'Integer', valueInfo: {transient: true}},
city: {value: 'Parma', type: 'String'}
},
businessKey: 'aBusinessKey',
tenantId: 'aTenantId'
})
};
fetch('http://{host}:{port}/{contextPath}/condition', 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}/condition",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'variables' => [
'temperature' => [
'value' => 24,
'type' => 'Integer',
'valueInfo' => [
'transient' => true
]
],
'city' => [
'value' => 'Parma',
'type' => 'String'
]
],
'businessKey' => 'aBusinessKey',
'tenantId' => 'aTenantId'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://{host}:{port}/{contextPath}/condition"
payload := strings.NewReader("{\n \"variables\": {\n \"temperature\": {\n \"value\": 24,\n \"type\": \"Integer\",\n \"valueInfo\": {\n \"transient\": true\n }\n },\n \"city\": {\n \"value\": \"Parma\",\n \"type\": \"String\"\n }\n },\n \"businessKey\": \"aBusinessKey\",\n \"tenantId\": \"aTenantId\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://{host}:{port}/{contextPath}/condition")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"variables\": {\n \"temperature\": {\n \"value\": 24,\n \"type\": \"Integer\",\n \"valueInfo\": {\n \"transient\": true\n }\n },\n \"city\": {\n \"value\": \"Parma\",\n \"type\": \"String\"\n }\n },\n \"businessKey\": \"aBusinessKey\",\n \"tenantId\": \"aTenantId\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://{host}:{port}/{contextPath}/condition")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"variables\": {\n \"temperature\": {\n \"value\": 24,\n \"type\": \"Integer\",\n \"valueInfo\": {\n \"transient\": true\n }\n },\n \"city\": {\n \"value\": \"Parma\",\n \"type\": \"String\"\n }\n },\n \"businessKey\": \"aBusinessKey\",\n \"tenantId\": \"aTenantId\"\n}"
response = http.request(request)
puts response.read_body[
{
"links": [],
"id": "aProcInstId",
"definitionId": "aProcDefId",
"businessKey": "aBusinessKey",
"caseInstanceId": null,
"ended": false,
"suspended": false,
"tenantId": "aTenantId"
},
{
"links": [],
"id": "anotherId",
"definitionId": "aProcDefId",
"businessKey": "aBusinessKey",
"caseInstanceId": null,
"ended": false,
"suspended": false,
"tenantId": "aTenantId"
}
]Authorizations
Body
application/json
Response
Request successful.