0
1

(This question belongs to ivy 5.x)

If a user opens a task (which presents a user dialog to him) and then, a little later he cancels the task (exits from user dialog), xpert.ivy finishes this task and set it's state to DONE. In such a case (after cancelling), the Task should go back to the state SUSPENDED it had before the user started it.

I don't want to delete this task and recreate it, so I tried to reset the task by calling the method ivy.task.reset() in a script element after closing the user dialog, but ivy returns the following error message:

"Session 1 (xyz) is not allowed to call method public void ch.ivyteam.ivy.workflow.internal.Task.reset(). The session does not fulfill the permission rule SESSION OWNS TaskReset PERMISSION OR OWNS TaskReset@SYSTEM PERMISSION"

It's no problem to set this rights by the Administration Console, but it's not useful to set this right to all users created in ivy. Is there a way to set the appropriate permission within an ivy script element or is there another doing to reset a task?

Thanks

asked 23.04.2014 at 23:07

Stefan%20Kressig's gravatar image

Stefan Kressig
(suspended)
accept rate: 0%

edited 24.04.2014 at 00:14


See question 654 to see how to assign (grant) permissions in the Designer.

link

answered 25.04.2014 at 08:51

Reto%20Weiss's gravatar image

Reto Weiss ♦♦
4.9k202857
accept rate: 74%

Thanks a lot for your help. Regards, Stefan

(25.04.2014 at 18:13) Stefan Kressig Stefan%20Kressig's gravatar image

See answer of question How can I disable Xpert.ivy security/permission checks. It explains how you can disable permission checking on designer and server with an small java helper class. As already mentioned it is possible per API to grant/deny permissions of a role or user (Also this API is used by the Administration UI, which is an Ivy Project). See answer of question How to grant permssions to a user or role in Designer.

link

answered 04.08.2014 at 16:12

Christian%20Strebel's gravatar image

Christian St... ♦
3.2k31338
accept rate: 88%

  1. At the moment a task in state DONE cannot be reset in Xpert.ivy. Calling the reset method on the task will throw an IllegalStateException.
  2. Permissions can also be set to Roles. So you can set the TaskReset Permission to a Role which is owned by users that are allowed to reset tasks.
  3. You can turn off the Xpert.ivy security in Java before calling the method. For more details see question 227.
link

answered 24.04.2014 at 11:41

Reto%20Weiss's gravatar image

Reto Weiss ♦♦
4.9k202857
accept rate: 74%

Hi Reto, Thanks a lot for your quick response, but I think that I expressed the problem not clearly: The Task should be resetted before it's going to state DONE, not after it reaches this state.

  • I take a task (SUSPENDED) which is assigned to me or a to group I belong to
  • user dialog is opening (the Task is now in state RESUMED), dialog offers two ways: Cancel and OK
  • I choose cancel, exits the User Dialog, the process is going the "cancel" path
  • the process is going through an Ivy Script Element on which the Task should be resetted (set back to SUSPENDED) by statement ivy.task.reset() (=> Permission Error occurs)
  • The process reaches the Endpoint (on which the Task becomes the DONE State (which is O.K. when I click OK in the User Dialog)

But you're right: I'll try to create a group with appropriate rights for Task Handling and assign all users to this group. This could work.

One more question: How can I assign this right/permission within the Designer?

Thanks a lot and regards, Stefan

link

answered 24.04.2014 at 20:15

Stefan%20Kressig's gravatar image

Stefan Kressig
(suspended)
accept rate: 0%

I want to ask if there was made any progress? Because I'm interested in this topic too.

(07.07.2014 at 11:11) danielf danielf's gravatar image

Hi Stefan,

are you using JSF Dialog? In my RIA Dialog i created an Event Task reset which is call when then Window is unloaded. It is just one Skript step needed. if (!in.propperClosed) { ivy.task.reset(); }

If you use JSF Dialogs there is a little bit more to do.

  1. you need a callable process wich will do the Task reset and has the taskID as Input parameter. You could use the CancelTask form HTMLWFUI as example
  2. you Need a Button in jsf which calls this process i did the following:

create an attribut URL which is filled with the correct URL of the callable process by dialog start event.

JavaScript which calls URL

function cancel(url) { document.location=url; }

a command Button which call the script

p:commandButton onclick="cancel(#{data.url})"

I never had problems with the rights in designer, only on Server, there you Need the rights.

hope this helps Roland

link

answered 03.08.2014 at 13:16

roland's gravatar image

roland
(suspended)
accept rate: 41%

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:

×68
×40

Asked: 23.04.2014 at 23:07

Seen: 15,996 times

Last updated: 04.08.2014 at 16:12