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

Handling User Task, just to save task information not to mark complete, it sets taskState as null #483

Open
waseemahmad31 opened this issue Jan 10, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@waseemahmad31
Copy link

waseemahmad31 commented Jan 10, 2023

Describe the bug
I am trying to just capture UserTask information. However when handler completes, it marks taskState null, not sure why. Please see the below code snippet.

image

        private void HandleUserTasks()
        {
            CreateWorker("io.camunda.zeebe:userTask", async (jobClient, job) =>
            {
               //// just saving job info in database
                if (!await userTaskService.IsUserTaskExists(job.Key))
                {
                    await userTaskService.SaveUserTask(job);
                }

            });
        }

        private void CreateWorker(string jobType, JobHandler handleJob)
        {
            zeebeClient.NewWorker()
                    .JobType(jobType)
                    .Handler(handleJob)
                    .MaxJobsActive(5)
                    .Name(jobType)
                    .PollInterval(TimeSpan.FromSeconds(50))
                    .PollingTimeout(TimeSpan.FromSeconds(50))
                    .Timeout(TimeSpan.FromSeconds(10))
                    .Open();
        }

If, I do not use the handler, its working fine. To reproduce this issue, just add a handler on user task, do not do anything. You will see in the Operate UI task is still active, but in TaskList UI it will disappear. Even if you try to complete or assign this task it will through taskState null error. This only happens we we add handler on user Task.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Enviroment (please complete the following information):

  • OS: Windows
  • Version 11
  • Package version- 1.2.1

Additional context
Add any other context about the problem here.

@waseemahmad31 waseemahmad31 added the bug Something isn't working label Jan 10, 2023
@waseemahmad31 waseemahmad31 changed the title Handling User Task, just to save task information not mark complete, set taskState null Handling User Task, just to save task information not to mark complete, it sets taskState as null Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants