I have a strange Exception here:

Session 0 (SYSTEM) is not allowed to call method public ch.ivyteam.ivy.workflow.IProcessData ch.ivyteam.ivy.workflow.internal.Task.getInternalProcessData().
The session does not fulfill the permission rule SESSION IS SYSTEM

This says the Session has the permission SYSTEM but the call was denied because the Session has not the permission SYSTEM.

Code is:

final ITask task = Ivy.wfTask();
IProcessData ipd = Ivy.session().getSecurityContext()
    .executeAsSystemUser(new Callable<iprocessdata>() {

    @Override
    public IProcessData call() throws Exception {

        return task.getInternalProcessData();
    }

});

asked 23.10.2014 at 10:52

HaraldWeber's gravatar image

HaraldWeber
101101015
accept rate: 33%


Does it work if you use the SecurityManager approach to call the protected API?

http://answers.axonivy.com/questions/744/how-can-i-disable-xpert-ivy-security-permission-checks/746

link

answered 23.10.2014 at 15:14

Reguel%20Wermelinger's gravatar image

Reguel Werme... ♦♦
7.4k11347
accept rate: 71%

edited 23.10.2014 at 15:14

Yes this approach is working. But the next call doesn't: task.writeInternalStartProcessData(processData); (NullPointerException somewhere inside writeInternalStartProcessData) Seems that I cant manually save the Task data..

(23.10.2014 at 15:32) HaraldWeber HaraldWeber's gravatar image

SESSION IS SYSTEM means the System itself. Note that there is also a user that is called SYSTEM. These are not the same. Seems that in your example you use the user SYSTEM and you are not running as SYSTEM. In the answer above you can choose between the methods executeAsSystem and executeAsSystemUser.

link

answered 23.10.2014 at 20:19

Reto%20Weiss's gravatar image

Reto Weiss ♦♦
4.6k172551
accept rate: 75%

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:

×35

Asked: 23.10.2014 at 10:52

Seen: 1,064 times

Last updated: 23.10.2014 at 20:19