Hello,
You have to come back to the principle of what is a business process. As I say, don't implement a UI issue by a Process nightmare.
The basis of a process is:
when you have 2 tasks, take as a principle the two tasks will be executed by 2 different users
Second principle: you have a delay of 1 day between each task.
Third principle: a task is a Business task.
So, in your situation, you have to think: my "Human Task 1" and my "Human Task 2" are real business tasks? That's mean task 1 will be executed by Walter Bates, and Walter Bates does not care about task 2? Task 2 can be executed by Jan Fisher completely independently?
If the answer is NO, then you have 1 business task.
If the answer is YES, then ... you don't ask this question:-)
So, now let's focus: how can I manage in one task this behavior (2 screens)? With the UI Designer, it's possible, but not easy.
1/ Create two containers. One for each page. So, now you have to decide which container you want to show/hide, correct?
2/ add a button "next page" in the first container. In this button, do a "Add to collection", and give a JSON list "myList"
The point is that you cannot add a JavaScript on a button, which should solve the behavior.
3/ in a "formControler" JavaScript variable, do something like :
var result= { 'showScreen='screen1'
}
if ($data.myList.size()>0) {
// user clicks on the button !
showSecondScreen='screen2'
}
If you want to have a Previous button, do the same (you can remove an item in the list, or manage with a second list).
Note: you may want to execute some connectors between the two tasks? So in that situation, yes, you may have two business tasks. But keep in mind the logic behind the portal:
Portal manages TASKS.
So, as a User, I have a list of tasks in front of me. When I execute a task, I come back to my list. Is my case will come back again as a new task? Maybe, in the meantime, I focus on tasks and I take a new one.
And the last point: if you really need to implement this behavior as you describe, then you have to develop you own page.
Hope this help