Basically, the Park Task feature is as far as I know intended to let the user continue his work later. However, I'm currently facing the issue that none of the data is persisted, when I park the task in the Designer (7.2.1).

I'm having one logic step, called save which contains the following script steps:

ivy.session.parkTask(ivy.task);

for(int i = 0; i<in.data.filesOnDisk.size(); i++)
{
    FileHelper.deleteFolder(in.data.filesOnDisk.get(i).getAbsolutePath());
}

And a simple faces redirect to the portal start. Is there any better way to save/persist data while being in a task without using another database as stated in this topic?

Did I misunderstand the function of parkTask?

asked 05.12.2019 at 10:48

maio290's gravatar image

maio290
(suspended)
accept rate: 0%

edited 05.12.2019 at 10:48

parkTask is to reserve a task for a specific user. means only this user can resume the task. For my understanding this has nothing to do which data of the task will be saved. If data of a task should be saved will be controlled over the dataclass of the process.

(06.12.2019 at 02:14) Lukas Lieb ♦♦ Lukas%20Lieb's gravatar image

Hi Lukas! How would I store task data manually? The dataclass obviously hasn't any save method and I never had to call a store method method before. Frankly speaking, I'd have expected it to reside in either ivy.task or ivy.persistence, but nope.

(06.12.2019 at 02:41) mhoffmann mhoffmann's gravatar image

These fields are already all marked as persistent. I'll just describe what I want to achieve: User clicks on "Save" - triggers HTML-Logic "save" -> this logic should store the data in a script step, parks the task and then redirects to the portal start. I'm hanging on the store the data in a script step - was expecting an easy ivy.task.data.persist() or something.

I would actually prefer the park function to actually store the data. What is the purpose of it not doing that when the main aspect of it is to allow users to be able to resume the task?

(06.12.2019 at 03:07) mhoffmann mhoffmann's gravatar image

The task data will no longer be saved if you park the task. I suggest you to use the business data to save any data from you task: https://developer.axonivy.com/doc/latest/designer-guide/data-modeling/business-data.html

(06.12.2019 at 05:08) Lukas Lieb ♦♦ Lukas%20Lieb's gravatar image

Lukas, I got that. Frankly speaking I can hardly believe that I have to use the Business Data since it's not needed anywhere else. Why would I have to use it when the only thing I want to do is just to store the dataclass(es) as the engine already does? There must be an (internal) function for this (I mean the engine already does this), I don't mind if I have to wrap it into some Java, but saving the stuff into a database or other data storage sounds like an unnecessary thing to do.

(06.12.2019 at 05:24) mhoffmann mhoffmann's gravatar image
showing 5 of 6 show 1 more comments

In the past it was possible to park a task and with this step the task data was be saved. But that never worked with the Html Dialog forms. But there is another much cooler way to do similar:

In the WorkflowDemos (since 8.0.1) will be a new demo called BusinessCaseData. This demo shows you how you can park a task and save the inputs to the ivy business data repository. This task will be reserved for you and you can pick it up later again, to continue with your work. In addition it shows you how you can browse over all data you have ever created. This will be done with a fast search api. you can modify past data too (for this have a look at the BusinessData demos in the WorkflowDemos).

This demo is build for 8.0.1 but can imported with a Designer 8.0.0 too (Import -> Ivy Projects -> Source minimum version 8.0.1-SNAPSHOT). And it should be possible to reimplement it with version 7.0.

https://developer.axonivy.com/market/demos

Kind regards

Lukas

link

answered 16.12.2019 at 09:22

Lukas%20Lieb's gravatar image

Lukas Lieb ♦♦
4412412
accept rate: 61%

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
×32

Asked: 05.12.2019 at 10:48

Seen: 1,367 times

Last updated: 16.12.2019 at 09:22