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

UserTask with blank userId and userGroup #1332

Open
eduwercamacaro opened this issue Feb 24, 2025 · 1 comment
Open

UserTask with blank userId and userGroup #1332

eduwercamacaro opened this issue Feb 24, 2025 · 1 comment
Assignees

Comments

@eduwercamacaro
Copy link
Member

By definition user tasks can be either assigned to a userId or owned by a userGroup, but there are some cases where both userId and userGroup are null. Consider this example in:

return new WorkflowImpl(
            "example-ut",
            wf -> {
                WfRunVariable userId = wf.addVariable("userId", VariableType.STR);
                WfRunVariable userGroup = wf.addVariable("userGroup", VariableType.STR);
                wf.assignUserTask("my-task", userId, userGroup);
                wf.execute("my-task");
            }
        );

If you run this example without variables, the UserTaskRun will have null in both userId and userGroup.
I believe this can be solved by failing the UserTaskRun on arrival if the assignment is not valid.

@eduwercamacaro
Copy link
Member Author

#1333 proposes a solution for this which fails with a VAR_ERROR if both userId and userGroup are null

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

1 participant