User Agreements

Content Type: Module
Categories: Scheduling

Overview

The 'UserAgreements' module aims to govern the amount of active users in the system. Out of the box the 'UserAgreements' module will deactivate any users outside of the limit on an daily basis (via a scheduled event). The users deactivated will be those who have the oldest last login dates. However, if this module is being used where a different action must performed on the users, developers can create another UA_ microflow with custom logic.

Documentation

Description

The 'UserAgreements' module aims to goven the amount of active users in the system.

Out of the box the 'UserAgreements' module will deactivate any users outside of the limit on an daily basis (via a scheduled event). The users deactivated will be those who have the oldest last login dates.

However, if this module is being used where a different action must performed on the users, developers can create another UA_ microflow with custom logic.

Typical usage scenario

Scenario 1

An IT Company charges client companies that use their system a per user fee. This fee is charged on a monthly basis. A client wants to increase the number of users they can have, or decrease the number of users. The IT Company wants these number of limits to be enforced.

The User Agreements module will ensure that number of active users is not exceeded.

Features and limitations

  • Features
    • Create, Edit, Delete and Cancel User Agreements
    • Configure the updater process by providing:
      • Custom logic for the updater with a custom ‘UA_’ microflow
      • The administrator role that will remain active for the users.
  • Limitations
    • When a user is set inactive, the administrator’s will need to reactivate the users manually if those users need to be reactivated.

Dependencies

  • 7.23.19 (Module can be updated to later versions of Mendix, but caution should be exercised)
  • Administration, including an entity named 'Account' which has associations with 'UserRoles'. (Standard Adminstration Module)
  • System Module (default)
  • MxReflection
  • CommunityCommons

Installation

  1. Import the module 'UserAgreements' into your project and any dependancies the project lacks.
  2. Link page 'ActiveUserAgreements_Overview' found in the _USE_ME folder to an applicable navigation button.
  3. Add the 'AS_CreateSchedulerUser' to your on start up microflow.
  4. Set the two constants found in the USE_ME > Constants folder. Take note of their description.
  5. Create a system user role called 'SchedulerUser' and attach the UserAgreements role 'SchedulerUser' in the project security.

Configuration

  1. Start the application.
  2. Run MxReflection (ensure that UserAgreements and/or the module where your custom logic is, are selected).
  3. Navigate to configurations page (found on the overview page) and setup the following:
    1. Active: select whether or not the UserAgreements process is active or not.
    2. Updater Microflow: select your custom 'UA_' microflow or if no custom logic must be used,set this field to 'UA_Updater_Default'. This microflow will apply the default user agreement logic. The default logic activates the user agreement and deactivates all the users exceeding the agreed number of active users allowed. NOTE: The accounts effected should be sorted by LastLogin ASC before changing these objects (For the standard system).Admin User Role: set the user role which is used as the administrator in the system. These roles will not be deactivated in the updating process.
    3. Execute Agreement Updater Now: executes the process of updating the User Agreements. This will also reduce the number of active users to the number of users that is agreed upon. If no agreement is in place only the 'Administrator User Role' will remain active.

  1. Navigate to the Overview page and add a new agreement using the 'New'. Or edit an existing one using the 'Edit' button. After the agreement has been created the agreement will stay in the pending state until the system applies it on the effective date.
    1. Effective Date: the date from which the user agreement will be applied.
    2. Number of active users: the number of active users that will be applied and restricted to on the system.

  1. Manage Active User Agreements
    1. Edit: Allows the user to edit the user agreement if it is still pending.
    2. Cancel: Deactivates a 'Pending' or 'Active' user agreement.

    1. View Effect Log: View the number all the effects that the agreement has had on the user base.
    2. Delete User Agreement: Only administrators can perform this action.

Known bugs

N/A.

Frequently Asked Questions

Question: What will happen if no agreement is set, X users active are active, and the updater runs?

Answer: X users will be set inactive, excluding the accounts that are ‘Administrator Roles’. If you haven’t set the administrator role then all active users will be deactivated.

 

Question: What if there is no custom ‘UA_’ microflow set?

Answer: The updater will not run and an error will be thrown in the logs.

 

Question: Can I set a user agreement in the past?

Answer: Yes, but you can only set it as far back as the previous User Agreement.

Releases

Version: 1.0.0
Framework Version: 7.23.24
Release Notes: Initial Release: - Create, Edit, Delete, Cancel Active user agreements. - Configure Custom Updater MF - Configure essential user roles - Activate / Deactivate scheduler - Set start date - Set minimum number of active users allowed.