How would i logout of mendix via a microflow?

2
How would i logout of mendix via a microflow?
asked
2 answers
10

You have to create a java action in your micro (return type boolean) with the following text:

// This file was generated by Mendix Business Modeler 2.5. // // WARNING: Only the following code will be retained when actions are regenerated: // - the import list // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. // Special characters, e.g., é, ö, à, etc. are supported in comments.

package groeiscan.actions;

import com.mendix.systemwideinterfaces.core.UserAction;

/** * com.mendix.core.Core.logout(getContext().getSession()) */ public class Logout2 extends UserAction<boolean> { public Logout2() { super(); }

@Override
public Boolean executeAction() throws Exception
{
    // BEGIN USER CODE
    com.mendix.core.Core.logout(getContext().getSession());
    return true;
    // END USER CODE
}

/**
 * Returns a string representation of this action
 */
@Override
public String toString()
{
    return "Logout2";
}

// BEGIN EXTRA CODE
// END EXTRA CODE

}

answered
0

Don't think this is possible yet. A java action is needed to do this I think.

Edit:

I don't think 2.5 stores the session in the database. I just checked the database table and I only see records with a timestamp in September 2010. So you can't use this logic to log out the user. Mendix changed the way of storing sessions. Only Java could help you.

answered