If you want to create a cancel button or a park button in your Html Dialog, you can create `commandButton` in your view.
< p:commandButton <p:commandButton actionListener="#{logic.park}" value="Park" update="form" />
This button calls an event in which you can implement an Ivy script step where you can park now the current task.
ivy.session.parkTask(ivy.task);
Now comes the tricky part. Instead of continuing the process normally, you send a redirection to the browser:
String redirectScript = "window.location.href='"+ivy.html.taskListRef()+"';";
RequestContext.getCurrentInstance().execute(redirectScript);
The event `logic.parkTask` should not lead to an `User Dialog Exit End` which would close the dialog and go on with the process. It should lead to a `User Dialog Process End`.
You can do the same for the cancel button, but you would call `ivy.task.reset()` instead of parking the task.