How can I sign out with microflow?

0
How can I sign out with microflow?
asked
2 answers
7

For a Mendix 4 example you can look at https://community.mendix.com/questions/1933/How-would-i-logout-of-mendix-via-a-microflow

To get that to work, you can just create a Java action (returning a Boolean) of your own and copy/paste the part in between the BEGIN USER CODE and END USER CODE in the appropriate place, so it would look like this:

    // BEGIN USER CODE
    com.mendix.core.Core.logout(getContext().getSession());
    return true;
    // END USER CODE

In Mendix 5 you can even send the client a notification that the session is logged out, so it immediately resets the client instead of having to click around in order to get the client to notice the logout. For this you could add the following line of code

com.mendix.webui.FeedbackHelper.addLogoutFeedback(getContext());

(this should be on the line before the

return true;

statement)

answered
2

com.mendix.core.Core.logout(getContext().getSession());

return true; 

answered