Hi I would like to have a Tasklist with all Tasks that are allocated to Users, without System Tasks. I tried something, but it wont work:

IQueryResult queryResult  = ivy.wf.findTasks(null, PropertyOrder.create(TaskProperty.START_TIMESTAMP, OrderDirection.ASCENDING), 0, -1, true);

I am getting a PermissionDeniedException.

Best regards Florian

asked 16.03.2016 at 15:55

Florian%20Hitz's gravatar image

Florian Hitz
316610
accept rate: 0%

edited 16.03.2016 at 16:11

Reguel%20Wermelinger's gravatar image

Reguel Werme... ♦♦
8.0k11650


To avoid the PermissionDeniedException you can use the follwing procedure: http://answers.axonivy.com/questions/744/how-can-i-disable-xpert-ivy-security-permission-checks

I'd use the new task query API to get these results. It's a fluent API which allows SQL like task filtering:

    TaskQuery query = TaskQuery.create();
    query.where()
        .activatorName().isNotNull().and()
        .activatorName().isNotEqual("#"+ISecurityConstants.SYSTEM_USER_NAME)
        .orderBy().startTimestamp().ascending();
    java.util.List<ITask> tasks = Ivy.wf().getTaskQueryExecutor().getResults(query);
link

answered 16.03.2016 at 16:11

Reguel%20Wermelinger's gravatar image

Reguel Werme... ♦♦
8.0k11650
accept rate: 69%

edited 18.03.2016 at 10:11

Your answer
toggle preview

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:

×62
×10

Asked: 16.03.2016 at 15:55

Seen: 1,167 times

Last updated: 18.03.2016 at 10:12