There are two possibilities that can trigger a logout of a user. An active WebPortal session in the browser sends a heartbeat every 3 minutes to the server. If there is no more hearbeat from the user (e.g. due to closing the browser without manually logging out before), the user will be logged out automatically after 3 minutes. In some browsers hearbeats may be suppressed if the tab is not active.
Another setting is that a user will be logged out if no requests were sent within the last 30 minutes. So if filling the form on your WebPortal page tages longer than 30 minutes, the user will be logged out if no other action (e.g. navigate to next/previous page of WebPortal workflow, start another workflow, etc) was performed by that user in the meantime.
Changing the 30 minute timeout is possible, but not really straight forward. In your webapps\knime\WEB-INF\lib folder of the tomee server you find a jar file named webportal.jar. You’ve got to unzip it, change the timeout setting in src/main/webapp/META-INF/web-fragment.xml and create a jar file from it again. After restarting the server, the new default logout timeout will be used. Bear in mind that these steps have to be repeated in case the server will be updated.
I hope this helps.