Background

Like many Rock churches, we've used the Org Chart feature in the platform to manage our staff. Then we tied these groups and roles to data views which we sync with security roles. So as long as our HR director maintains the Org Chart in Rock, we don't have people with security roles (and system access) that they shouldn't have. If you aren't using the Org Chart in this way, I would highly recommend Luke Taylor's excellent recipe.

The challenge for us was off boarding. HR finds out about staff leaving before their official end date, but staff typically needs access to Rock until they transition out of the organization. Wouldn't it be great if HR could set an end date in the Org Chart and move on to their next task? This simple recipe can make that happen.

Components

This recipe consists of the following components, all of which will be explained in detail:

  • Group attribute for effective termination date
  • Workflow to check for staff past their effective termination date
  • Job to trigger workflow

The workflow is attached to this recipe.

Group Attribute for Effective Termination Date

First, we set up a group attribute to track effective termination date for Org Chart members.

  1. Using an account with RSR-Rock Admin permissions, navigate to Admin Tools > General Settings > Group Types.
  2. Navigate to the Organization Unit group type and scroll down to the Member Attributes section.
  3. Click on the plus (+) icon and add the Effective Term Date attribute as shown below, then click the Save button.
  4. Click on the lock icon for the new attribute and give your HR team (or HR admin) View and Edit permission.
  5. Scroll to the bottom of the page and click the Save button to save your changes to the group type.

Screen_Shot_2022-12-17_at_12.21.03_PM.png

The Workflow

Feel free to just skip to the end and download the workflow. It should be straightforward to upload it in your environment.

Here is the outline of the workflow:

Screen_Shot_2022-12-17_at_12.32.14_PM.png

Alert readers may notice the eerie similarity to Mark Wampler's workflow looping structure. If you aren't familiar with this method to loop through items in a workflow, I recommend Mark's excellent RX2020 presentation. I've used this design pattern a few times in our workflows.

Essentially, this workflow generates a list of all active members in the Org Chart, checks them one by one for expired effective dates, and then makes them inactive.

The Daily Job

Lastly, we set up a daily job to trigger the workflow.

  1. Using an account with RSR-Rock Admin permissions, navigate to Admin Tools > System Settings > Jobs Administration.
  2. Click on the plus (+) icon and configure the launch workflow job as shown below, then click the Save button.

Screen_Shot_2022-12-17_at_8.48.26_PM.png

That's all! Now let's take it out for a spin.

The Demo

We'll terminate fictitious Facilities staff member Dan Smith in our test environment.

Screen_Shot_2022-12-17_at_9.19.07_PM.png

Let's backdate his termination date. We'll all miss Dan.

Screen_Shot_2022-12-17_at_9.19.42_PM.png

Next, we'll run the daily job.

Screen_Shot_2022-12-17_at_9.27.23_PM.png

Finally, let's confirm he is inactive in the Org Chart.

Screen_Shot_2022-12-17_at_9.30.22_PM.png

That's all there is to it. Dan will lose his access to Rock when the Security Role data views sync up later in the day.

A Note on Security

This is a simple, yet powerful feature as it allows the user to remove access to Rock. Of course, HR can already remove user access by inactivating staff directly in the Org Chart, so Manage Member and Edit access to the Org Chart should be carefully secured.

We did this by limiting Manage Member and Edit access to the Org Chart group type (and the Org Chart by inheritance) to Rock Admins and members of our HR team.

Screen_Shot_2022-12-19_at_4.08.51_PM.png

You should also always maintain an Admin account for gaining Rock Admin access as a back door in case it is needed.

Disclaimer

I've made some assumptions writing this up. If your environment is different or you have any questions at all, hit me up in Rocket Chat and we'll work through it together. Happy terminating!