Skip to content

Shouldn't .SubmitForm() return variables? #98

Description

@DumboJetEngine

I am completely new to Camunda and to this library, but I try to submit a form to complete a user task like that:

await camunda.UserTasks[taskInfo.Id]
	.SubmitForm(new Camunda.Api.Client.UserTask.CompleteTask { Variables = variables, WithVariablesInReturn = true });

Given the WithVariablesInReturn propertty on CompleteTask, I would expect that .SubmitForm() should return the updated variables.
The same way as ProcessDefinitionResource.StartProcessInstance() does.
But .SubmitForm() returns a Task instead.

Am I missing something?

While trying to workaround this, I have managed to get the variables myself like so:

var resultVariable = await camunda.ProcessInstances[instanceInfo.Id].Variables.Get("result", false);
var result = JsonSerializer.Deserialize<Result>(resultVariable.Value as string, new JsonSerializerOptions { PropertyNameCaseInsensitive = true });

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions