Hello.

Using engine 6.0.5, I am trying to query tasks that the session user is working or can work on.

According to the docs, findWorkTasks() can return tasks in states TaskState.SUSPENDED, TaskState.CREATED, TaskState.RESUMED, TaskState.PARKED.

When I use it like this:

result = ivy.session.findWorkTasks(filter, order, first, pageSize, true, EnumSet.of(TaskState.SUSPENDED, TaskState.RESUMED));

It never returns TaskState.RESUMED tasks, only TaskState.SUSPENDED.

Just to double check if I have resumed tasks, I tried the following call and it returns the TaskState.RESUMED tasks. result = ivy.session.findLockedWorkTasks(filter, order, first, pageSize, true, EnumSet.of(TaskState.RESUMED));

What am I doing wrong on my use of findWorkTasks()?

Thanks in advance,

asked 01.02.2017 at 15:45

Jailson%20Brito's gravatar image

Jailson Brito
(suspended)
accept rate: 50%


The only way that I was able to achieve what I was looking for was using ivy.wf.findWorkTasks() instead of ivy.session.findWorkTasks().

Example:

IUser sessionUser = ivy.session.getWorkflowContext().getSecurityContext().getCurrentSession().getSessionUser();

then

result = ivy.wf.findWorkTasks(sessionUser, filter, order, first, pageSize, true, EnumSet.of(TaskState.SUSPENDED, TaskState.RESUMED));

link

answered 01.02.2017 at 20:50

Jailson%20Brito's gravatar image

Jailson Brito
(suspended)
accept rate: 50%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×14
×10

Asked: 01.02.2017 at 15:45

Seen: 1,984 times

Last updated: 01.02.2017 at 20:50