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

As a Zeebe Java user, I want to complete a Job with a single variable #13040

Closed
ingorichtsmeier opened this issue Jun 9, 2023 · 4 comments · Fixed by #13442
Closed

As a Zeebe Java user, I want to complete a Job with a single variable #13040

ingorichtsmeier opened this issue Jun 9, 2023 · 4 comments · Fixed by #13442
Assignees
Labels
good first issue Marks an issue as simple enough for first time contributors hacktoberfest Marks an issue as a candidate to be a Hacktoberfest contribution kind/feature Categorizes an issue or PR as a feature, i.e. new behavior onboarding version:8.3.0-alpha4 Marks an issue as being completely or in parts released in 8.3.0-alpha4 version:8.3.0 Marks an issue as being completely or in parts released in 8.3.0

Comments

@ingorichtsmeier
Copy link
Contributor

Is your feature request related to a problem? Please describe.
As a programmer writing Zeebe Job Handlers, I want to complete a job returning only a single variable value.

The newCompleteCommand offers only a parameter .variables() where I have to wrap the value in a Map beforehand.

This is overhead.

Describe the solution you'd like
client.newCompleteCommand(job).variable("name", value)...

Describe alternatives you've considered
Promote the Java feature with Map.of("name", value) giving examples in the docs and Zeebe examples.

Older programmers, that learned Java with versions older than 8 are not aware of this shortcut.

Additional context
It came up in a migration Workshop with a customer.

@ingorichtsmeier ingorichtsmeier added the kind/feature Categorizes an issue or PR as a feature, i.e. new behavior label Jun 9, 2023
@megglos megglos added good first issue Marks an issue as simple enough for first time contributors hacktoberfest Marks an issue as a candidate to be a Hacktoberfest contribution labels Jun 9, 2023
@Gireesh2002
Copy link

Acdording to [javadoc.io]https://javadoc.io/doc/io.camunda/zeebe-client-java/1.2.1/index-all.html
My Suggesstion
befor
jobClient.newCompleteCommand(job.getKey()).variables(variables);
after
System.out.println(job.getElementId()); // returns element Id (or) null
Map variables = job.getVariablesAsMap(); // Get variables
jobClient.newCompleteCommand(job.getKey()).variables((Map.of("newVariable","VariableFromClient"));

@korthout
Copy link
Member

ZPA triage:

  • seems like a reasonable request
  • should be a good first issue
  • @aleksander-dytko please consider if you want the team to work on this from PM perspective

@aleksander-dytko
Copy link
Contributor

@korthout thanks for the mention. I don't see it as a priority at the moment - changing priority level to Later.

@megglos
Copy link
Contributor

megglos commented Jun 15, 2023

ZDP-Triage:

  • not affecting ZDP

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Marks an issue as simple enough for first time contributors hacktoberfest Marks an issue as a candidate to be a Hacktoberfest contribution kind/feature Categorizes an issue or PR as a feature, i.e. new behavior onboarding version:8.3.0-alpha4 Marks an issue as being completely or in parts released in 8.3.0-alpha4 version:8.3.0 Marks an issue as being completely or in parts released in 8.3.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants