jemiris wrote: ↑Thu Aug 29, 2019 5:07 am
1. How does the endpoint know that when the session get's expiry in the processmaker?
If the login session has expired (after 24 minutes of inactivity), then when you try to open the process map in an iframe, it will be redirected to the ProcessMaker login screen. The user can login, and then the iframe will redirect back to the process map.
If you want to avoid making the user login manually, then you should call a REST endpoint just to verify that the login session is still valid, before trying to display the process map in an iframe. If the call to the REST endpoint fails, then you need login using oAuth2 and then get a new session ID. Then, use that new session ID to display the process map in an iframe.
jemiris wrote: ↑Thu Aug 29, 2019 5:07 am
2. As of now, we are mentioning the session-id for any user. So how the rest API gets the session-id?
3. Is it getting the session id of the admin user or how is it getting?
You can only get the session ID for the user who logged in using oAuth2. If you logged in as "admin", then you are getting the session ID for "admin". You can't get session IDs for other users.
If you want to do actions for other users, then the
extraRest plugin has endpoints for Process Supervisors to do actions like route cases, assign cases, set variables, etc. for other users.
jemiris wrote: ↑Thu Aug 29, 2019 5:07 am
4. Why I have these questions it's because in the web service name called "Automatic Login" https://wiki.processmaker.com/index.php ... atic_Login. In web services, we have to specify the username and password to get the particular user's session id. So my question is how the REST API will the particular user id?
That example from the web services documentation is attaching the session ID to the URL, just like I'm telling you to do with REST.
Web services is the same as REST. You need to login as each user to get his/her session ID.