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

Creating new task for the process instance is not listed in process instance tasks #4650

Open
dbenesj opened this issue Sep 23, 2024 · 3 comments
Assignees
Labels
type:bug Issues that describe a user-facing bug in the project.

Comments

@dbenesj
Copy link

dbenesj commented Sep 23, 2024

Environment

Tomcat ZIP 7.21

Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket)

Trying to create new task that should be part of the running process instance.
In the REST API documentation of the Create Task it is stated it can be done by providing parameter processInstanceId.
When this endpoint is called, HTTP 204 is returned, but when later performing Get Task List specifying processInstanceId, the new task is not returned.

Steps to reproduce

  1. create new process instance
  2. create new tasks specifying previously created process instance ID
  3. list tasks for the process instance

Observed Behavior

Newly created tasks is not added to the tasks of the process instance.

Expected behavior

Newly created task should be visible when retriving tasks for the process instance ID.

@dbenesj dbenesj added the type:bug Issues that describe a user-facing bug in the project. label Sep 23, 2024
@danielkelemen
Copy link
Member

Hi @dbenesj,

Thank you for opening a bug ticket.
I'll test it myself soon and identify what the root cause is. After that we can think about a fix. This might take some time as we are currently in our release cycle. Thank you for your patience.

-Daniel

@danielkelemen danielkelemen self-assigned this Sep 26, 2024
@joaquinfelici
Copy link
Contributor

Hello @dbenesj,

I confirm the bug is present, not only for processInstanceId, but also for a few other fields. I created a failing test #4873 that shows which are the missing fields.

I found out that the root cause if that, when creating the Task object from the TaskDto, we're not setting every field present in the dto. This is done in the updateTask method. This way, the processInstanceId never reaches the java api so it makes sense that when you retrieve the list of tasks this one is not listed.

Would you be interested in working on this? The fix should be pretty simple, we also might want to add a couple of tests to check this behavior.

@dbenesj
Copy link
Author

dbenesj commented Jan 6, 2025

Hello @joaquinfelici,

Thank you for confirmation and nice description.

I took a look on necessary changes and found out that Task interface does not even include methods to set the those missing properties.
Adding them is simple, but made me think whether it is intentional. Found out that all those properties were added in the REST API in version 7.19 when documentation format has been changed. In version 7.18 none of those properties were mentioned.

So the question: isn't it actually intentional and just documentation was mistakenly adding those properties?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Issues that describe a user-facing bug in the project.
Projects
None yet
Development

No branches or pull requests

4 participants