Documents within Todo's

Discussions about goal-oriented and BPMN modeling.
Forum rules
Make sure every topic contains information about your LSPS version and if relevant also your server OS, client OS, database name and version, and application server name and version.
Byron Glueck
 
Posts: 85
Joined: Thu Apr 26, 2012 8:17 pm

Documents within Todo's

Tue Jun 26, 2012 2:35 pm

Within a HumanActivity form of a Process/Todo, a New Document Button exists.

If the user clicks this button, he is taken to a new Document belonging to different Model. When submitted, that document instantiates a new process/todo.

Does there exist a mechanism/strategy to navigate the user back to the parent form/todo after submitting child document? If not, is it best practice to have child process integrated/called from within the parent process in the model (rather than invoking the child via a new document)?

Additionally, when navigating to the new document form, the parent form's todo becomes inherently locked. Please offer thoughts on how/if this should be handled.

Thanks as always!

Maros Bajtos
 
Posts: 145
Joined: Mon Feb 27, 2012 2:52 pm

Re: Documents within Todo's

Thu Jun 28, 2012 12:59 pm

First of all, if you don't want a todo from new process instance to be shown to user, you just need to instantiate the model instance asynchronously.

About the navigation - if you want to have stack like navigation (after submiting or cancelling document or todo, you want to get back to the previous one), you need to do the following steps:

1. Open todo_form.xhtml and document.xhtml and replace string

<script>var sessionId = "#{sessionBean.sessionId}";</script>

with

<script>lsps.sessionId = "#{sessionBean.sessionId}";</script>

in both files.

2. Place attached file lsps.js into webapp/js directory and adjust the template.xhtml so that it loads this file instead of js file "resources/js/lsps.js?v=4"


If you need to unlock todo in certain circumstances, I suggest using TodoService.unlock todo method. Then you can bind unlocking to different event, such as user leaving page, etc.
Attachments
lsps.js
(15.93 KiB) Downloaded 411 times

Maros Bajtos
 
Posts: 145
Joined: Mon Feb 27, 2012 2:52 pm

Re: Documents within Todo's

Thu Jun 28, 2012 1:00 pm

Btw in 2.6.1+, the stack like navigation will be the default behavior.

Byron Glueck
 
Posts: 85
Joined: Thu Apr 26, 2012 8:17 pm

Re: Documents within Todo's

Mon Jul 02, 2012 2:48 pm

Thank you very much for the patch files.

This work great. However, I have observed the following behavior:

After creating a child record via the submit button and navigating back to the parent form, the collection control that displays the children is not updating to show the newly added record. After closing and reopening the parent todo form, the record is displayed.

Do you have any suggestions on how to force the collection control to reload upon returning from the child creation document? The 'refresh upon todo display' is set.

Thanks again.

Return to GO-BPMN

Who is online

Users browsing this forum: No registered users and 0 guests