Skip to content

Commit

Permalink
fix: avoid deserialisation problems in camunda complete calls
Browse files Browse the repository at this point in the history
  • Loading branch information
joostfaassen committed Jul 24, 2022
1 parent 76959ee commit ab808f8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Worker/CamundaWorker.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ public function pushResponse(array $request, array $response): void
}
$body['variables'][$k] = $variable;
}
if (count($body['variables'])==0) {
// avoid deserialisation problems.
// camunda expects an object, not an array. php serialises empty objects as empty array
unset($body['variables']);
}
}
$res = $this->request('POST', '/external-task/' . $request['id'] . '/complete', $body);
} else {
Expand Down

0 comments on commit ab808f8

Please sign in to comment.