Version 7

    Steps to configure the Dynamic User Group plugin

    Settings can be configured by users with Manage Community permissions.

    1. From the Admin Console, go to People > Settings > Dynamic Groups

     

    Tasks in the Dynamic User Group plugin
    Scheduled Task

    Applies all defined rules to all users and adds/removes users to/from groups as necessary

    Can be enabled/disabled in the Admin Console settings

    Can be scheduled using a cron expression in the Admin Console settings

    Can be run manually

    Sync Groups on User Profile Update

    Applies all defined rules to an individual user whenever their profile field values are updated

    Can be enabled/disabled in the Admin Console settings

    User Group Cleanup Task

    Removes deactivated users from all groups if the users have not logged in for at least 30 days

    Can be enabled/disabled by setting the system property dynamicgroups.cleanupTask.enabled to true or false

    Can be scheduled using a cron expression in the system property dynamicgroups.cleanupTask.cronExpression

     

     

     

    Scheduling

    2. To schedule a task: Go to Admin Console > People > Settings> Dynamic Groups and configure a cron expression:

    3. To schedule the cleanup task: Go to Admin Console > System > Management > System Properties and configure a cron expression system property:

     

    Sample Cron expressions
    0 0 0 * * ? Every day at midnight
    0 0 12 * * ? Every day at noon
    0 15 10 ? * * Every day at 10:15am
    0 15 10 ? * SUN 10:15am on every Sunday, every month

     

    Status

    4. When the sync task is running, current progress is shown at the bottom of the Admin Console > People > Settings> Dynamic Groups page:

    Rules

     

    Rules

    The rules are used by the sync task to determine whether users should be added/removed to/from groups. A rule consists of two parts :

    • The groups
      • This is the group which the user should be added to if the rule expression is satisfied by the user's profile field values
    • The rule expression
      • This defines the logic for determining whether the user should be added/removed to/from the group
    Conditions
    • A user will be added to a group only if all parts/conditions of the rule are fulfilled and they are not yet a member of the group
    • If a user no longer meets all the conditions of the rule and has previously been added by the dynamic group system, they will be removed from the group
    • Members who are manually deleted from a group, but who fulfill all conditions of the rule will automatically be added again
    • If a rule is added/modified/removed then the change will only take effect during the next sync
    • At least one positive rule expression must be satisfied by the user profile for a group membership addition to occur
    Adding Rules

    5. Add Rules using the form highlighted below:

    Editing Rules

    6. Modify existing rule expressions by clicking on the Edit icon

    Only the expression can be modified, not the group. If the group needs to be changed, please add a new rule and remove the old one

    Deleting Rules

    7. Delete a Rule by clicking on the Delete icon and then confirming the action:

     

     

    Rule Expressions

    8. Use rule expressions in the format: ProfileFieldName(ProfileFieldValue)

    9. Exception: All parameter which can be used to specify all users: All

    10. Chain expressions together using the "&" operator: ProfileFieldName(ProfileFieldValue)&AnotherProfileFieldName(AnotherProfileFieldValue)

     

    Operators

    11. Use the following operators in expressions:

     

    SyntaxDefinition
    &AND
    ,OR
    !NOT
    *WILDCARD

     

    ExpressionDescription
    AllApply to all users
    Department(IT)Apply to all users which have their Department profile field set to IT.
    Department(IT*)Apply to all users which have their Department profile field starting with IT.
    Department(*)Apply to all users which have their Department profile field set.
    Department(IT,HR)Apply to all users which have their Department profile field set to IT or HR.
    Department(IT)&Company(Aurea)Apply to all users which have their Department profile field set to IT and their Company profile field set to Aurea.
    Department(IT)&Company(Aurea)&!Title(Intern)Apply to all users which have their Department profile field set to IT and their Company profile field set to Aurea, except for users which have their Title profile field set to Intern.
    All&!Title(Intern)Apply to all users except for those which have their Title profile field set to Intern.

     

     

    Logging

    12. By default the SBS logs will include messages showing the status of sync tasks:

    INFO com.jivesoftware.ps.plugins.dynamicgroups.task.DynamicGroupsServiceableSyncTask- Task starting at Wed Aug 29 15:49:51 BST 2018

    INFO com.jivesoftware.ps.plugins.dynamicgroups.task.DynamicGroupsServiceableSyncTask - Task completed at Wed Aug 29 15:49:51 BST 2018

    INFO com.jivesoftware.ps.plugins.dynamicgroups.task.DynamicGroupsServiceableSyncTask - Task completed in 40 milliseconds. Total users = 3; Users processed = 3; Users synced = 1; Users removed = 1; Users added = 0

     

    13. For more detailed logged messages, apply DEBUG level logging override to this class:

    com.jivesoftware.ps.plugins.dynamicgroups.manager.impl.DynamicGroupsSyncManagerImpl

     

    14. This override would include messages detailing group membership additions and removals:

    DEBUG com.jivesoftware.ps.plugins.dynamicgroups.manager.impl.DynamicGroupsSyncManagerImpl - Removed security group [2502] membership for user [2501]

    DEBUG com.jivesoftware.ps.plugins.dynamicgroups.manager.impl.DynamicGroupsSyncManagerImpl - Added security group [2503] membership for user [2501]

     

    System Properties

    15. Standard System Properties are as follows:

     

    System PropertyDescriptionTypeDefault ValueExample Value
    dynamicgroups.sync.taskEnabledEnables/disables the sync task.Boolean - true/falsefalsetrue
    dynamicgroups.sync.cronExpressionDefines when the sync task should run.String - cron expression0 0 1 ? * SAT0 15 10 ? * SUN
    dynamicgroups.sync.onProfileUpdateEnabledEnables/disables syncing when user profiles are updated.Boolean - true/falsefalsetrue
    dynamicgroups.sync.cleanupTask.enabledEnables/disables the cleanup task.Boolean - true/falsefalsetrue
    dynamicgroups.cleanupTask.cronExpressionDefines when the cleanup task should run.String - cron expression0 0 3 ? * SAT *0 0 1 ? * SUN
    dynamicgroups.sync.includeHiddenUsersEnables/disables whether hidden users should be included in the sync.Boolean - true/falsefalsetrue
    dynamicgroups.sync.includeDisabledUsersEnables/disables whether disabled users should be included in the sync.Boolean - true/falsefalsetrue
    dynamicgroups.sync.inactiveUserTimeoutDays

    Users with lastLoggedIn before the specified number of days ago won't be included in the sync.

    Value 0 means that users won't be filtered by lastLoggedIn.

    This filter works only when dynamicgroups.sync.includeDisabledUsers = false

    Non-negative number3090

     

     

    16. Testing / Performance Adjustment System Properties are as follows:

     

    System PropertyDescriptionTypeDefault ValueExample Value
    dynamicgroups.sync.testWithUsersDefines a set of user IDs which should be used instead of "all users" when running the sync task.String - comma separated list of user IDs2005,2006,2007
    dynamicgroups.sync.sleepBetweenUsersDefines an amount of time in milliseconds which the sync task should wait for between processing each user.Long - milliseconds30000
    dynamicgroups.sync.reportRefreshInterval

    Defines how long the settings page should wait before checking for new status figures.

    Integer - milliseconds50001000
    dynamicgroups.status.batch.size

    Defines the amount of updates which should occur before the status figures are updated on the settings page.

    Note: having this set to a low value could affect system performance.

    Long - milliseconds100010
    dynamicgroups.sync.threadsDefines the amount of worker threads for processing during a full sync.Integer - number of threads2040
    dynamicgroups.sync.sleepBetweenMembershipUpdateBatchDefines the amount of time the worker thread should sleep for between processing batches of group additions/removals.Long - milliseconds0200
    dynamicgroups.sync.sleepBetweenQueueDrainChecksDefines the amount of time the worker thread should sleep for between checking the queues and draining them.Long - milliseconds1000060000
    dynamicgroups.sync.minQueueSizeBeforeDrainingDefines the minimum amount of items which should be in the addition or removal queues before they are processed.Integer - number of queue items100010000
    dynamicgroups.sync.membershipUpdateBatchSizeDefines the number of group members which should be modified per group update.Integer - number of users5001000