fix(workflow): read task query variables from 'variables', not 'processVariables' (refs #13)
All checks were successful
CI / lint (pull_request) Successful in 1m28s
CI / build (pull_request) Successful in 1m8s
CI / unit (pull_request) Successful in 1m34s
CI / frontend (pull_request) Successful in 2m24s
CI / mutation (pull_request) Successful in 6m3s
CI / verify-stack (pull_request) Successful in 7m43s
All checks were successful
CI / lint (pull_request) Successful in 1m28s
CI / build (pull_request) Successful in 1m8s
CI / unit (pull_request) Successful in 1m34s
CI / frontend (pull_request) Successful in 2m24s
CI / mutation (pull_request) Successful in 6m3s
CI / verify-stack (pull_request) Successful in 7m43s
Flowable's POST query/tasks returns the included process variables under the key 'variables' (the request opts in via includeProcessVariables). The client DTO, its unit test, and the live-check parser all looked for 'processVariables', so the werkbak never matched a task's registrationId and verify-domain timed out. Verified by driving a real Flowable instance end-to-end locally: start -> complete external job -> the Beoordelen task carries registrationId under 'variables'. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -137,11 +137,13 @@ public sealed class FlowableWorkflowClient(HttpClient http, FlowableOptions opti
|
||||
|
||||
private sealed record UserTaskDto(
|
||||
[property: JsonPropertyName("id")] string Id,
|
||||
[property: JsonPropertyName("processVariables")] IReadOnlyList<Variable>? ProcessVariables)
|
||||
// Flowable's task-query returns the (included) process variables under "variables", not
|
||||
// "processVariables"; the request opts in via includeProcessVariables.
|
||||
[property: JsonPropertyName("variables")] IReadOnlyList<Variable>? Variables)
|
||||
{
|
||||
/// <summary>The registration id this task carries as a process variable.</summary>
|
||||
public string RegistrationId() =>
|
||||
ProcessVariables?.SingleOrDefault(v => v.Name == "registrationId")?.Value
|
||||
Variables?.SingleOrDefault(v => v.Name == "registrationId")?.Value
|
||||
?? throw new InvalidOperationException($"Beoordelen task {Id} carries no registrationId variable.");
|
||||
}
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@ public class FlowableWorkflowClientTests
|
||||
var capture = new RequestCapture();
|
||||
var client = Client(capture.Responds(HttpStatusCode.OK,
|
||||
$$"""
|
||||
{"data":[{"id":"task-1","processVariables":[{"name":"registrationId","type":"string","value":"{{rid}}"}]}],"total":1}
|
||||
{"data":[{"id":"task-1","variables":[{"name":"registrationId","type":"string","value":"{{rid}}"}]}],"total":1}
|
||||
"""));
|
||||
|
||||
var tasks = await client.GetOpenBeoordelingenAsync();
|
||||
@@ -192,7 +192,7 @@ public class FlowableWorkflowClientTests
|
||||
{
|
||||
var capture = new RequestCapture();
|
||||
var client = Client(capture.Responds(HttpStatusCode.OK,
|
||||
"""{"data":[{"id":"task-1","processVariables":[]}],"total":1}"""));
|
||||
"""{"data":[{"id":"task-1","variables":[]}],"total":1}"""));
|
||||
|
||||
var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => client.GetOpenBeoordelingenAsync());
|
||||
Assert.Contains("task-1", ex.Message);
|
||||
|
||||
Reference in New Issue
Block a user