-
Notifications
You must be signed in to change notification settings - Fork 0
Reference: the request schema
Nicolas edited this page Jan 21, 2025
·
1 revision
On every invocation of the zeebe-mock worker, the ActivatedJobResponse (single item) is forwarded to ${CONFIGURED_WIREMOCK_URL}/${WORKER_JOB_TYPE} POST
. Specifically, the output from toJson() from the incoming ActivatedJob object is forwarded.
With the zeebe-mock-wiremock-extension the stub mapping request matcher is done for you!
This means the ActivatedJob
data is available as any other request.body
template variable in a normal wiremock. For example:
"serveEventListeners": [
{
"name": "zeebemock/create-process-instance",
"requestPhases": [
"BEFORE_RESPONSE_SENT"
],
"parameters": {
"bpmnProcessId": "ChildEventsParent",
"variables": {
"id": "{{ jsonPath request.body '$.variablesAsMap.id' }}"
}
}
}
],
Notice how we can pull the .id
field out of the process instance context and use that in our serveEventListener
.