Hi,

I want to suspend a Task when an user clicks on the cancel button on a jsf dialog.

I found an hint with the ivy.task.reset(). But when use this function, i cannot finishing the process step due to an error (IllegalStateException: State of Task must be one of the following values...)

What would be the best way to suspend a task and resume it later on?

Thanks for help in advance.

Regards, Daniel

asked 26.07.2016 at 11:07

dharlach's gravatar image

dharlach
(suspended)
accept rate: 0%


The easiest way to do it is to have a data object 'Status' which is set to "cancel" when entering the Dialog, if there is no change one then routes the process back to a 'dummy' action/step before the Task Switch, which can be taken up again by the User. For all other Button actions one sets a different status which then determines the path taken.

link

answered 26.07.2016 at 15:52

RMS71's gravatar image

RMS71
(suspended)
accept rate: 33%

Thank you for your answer. But would that lead to a new task? Or did I understand you wrong?

(27.07.2016 at 10:43) dharlach dharlach's gravatar image
1

You get a new Task (new Task ID) but the Data will remain the same. It is difficult to describe in words a picture would be easier. You are essentially making a loop if the status is 'cancel'

Skript Step (Dummy)-> Task Step -> Dialog -> Alternative (Path 1 == cancel || Path 2...n == 'something else')

Path 1 -> back to Skript Step (Dummy)

(27.07.2016 at 11:46) RMS71 RMS71's gravatar image

The 'old Task' is "DONE" or "COMPLETED" (I'm not sure what the actual status nomenclature is.

(27.07.2016 at 11:48) RMS71 RMS71's gravatar image

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

Asked: 26.07.2016 at 11:07

Seen: 1,553 times

Last updated: 27.07.2016 at 11:48