Axon.ivy 7.0 - the Digital Business Platform - is out now...

Hi all

My project has some tasks which is assigned to System user, Now i build query to collect it?

What is the best way to do it?

Now i use ITask.getActivator().getId() then compare with Ivy.wf().getSecurityContext().getSystemUser().getId(). If they are same so that is task belong to system user.

Is it a correct way to go?

asked 09.11 at 03:41

trungdv's gravatar image

trungdv
335376169
accept rate: 52%


I think you can filter these tasks quickly like this:

List<ITask> systemTasks = Ivy.wf().getTaskQueryExecutor().createTaskQuery()
    .where().activatorName().isEqual(ISecurityConstants.SYSTEM_USER_NAME)
    .executor().results();
link

answered 10.11 at 07:33

Reguel%20Wermelinger's gravatar image

Reguel Werme... ♦♦
6.0k11035
accept rate: 69%

hi @Reguel Werme... ♦♦ i think this solution at first, but when i try to create user with name "SYSTEM", it's still ok. so in worst case this api can work wroong. so i find a better way.

(12.11 at 06:19) trungdv trungdv's gravatar image

The code tell me that it is not possible to create a user called SYSTEM unless you hack it into your database. Did you really test that?

(13.11 at 02:49) Reguel Werme... ♦♦ Reguel%20Wermelinger's gravatar image

hi @Reguel Werme... ♦♦ i can create user with username is "SYSTEM" on designer. I thought what i can do on designer will be as same as engine so i did not test on server. My ivy version is 6.3 btw, we can upload image to comment???

(19.11 at 21:10) trungdv trungdv's gravatar image

I can imagine that it is possible for the XpertIvySecuritySystem where you manage users manually/viaAPI. My code sample comes from external integrated systems such as Ms Active Directory or Novell eDirectory

(20.11 at 03:31) Reguel Werme... ♦♦ Reguel%20Wermelinger's gravatar image
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:

×1

Asked: 09.11 at 03:41

Seen: 56 times

Last updated: 20.11 at 03:31

Related questions