Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
DumboJetEngine opened this issue Jun 5, 2024 · 1 comment
Open

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

DumboJetEngine opened this issue Jun 5, 2024 · 1 comment

Comments

@DumboJetEngine
Copy link

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 });
@DumboJetEngine DumboJetEngine changed the title Shouldn't .CompleteTask() return variables? Shouldn't .SubmitForm() return variables? Jun 5, 2024
@FreeAndNil
Copy link

This repo ist dead. Please go to https://github.com/komsa-ag/Camunda.Api.Client

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants