Synchronization Service - Step Handlers

Hi,

We just recently implemented the Active Roles Synchronization Service in our organization to aid in employee onboarding.

I am wondering what the "Step Handlers" can be used for? The documentation says the following:

"Sync workflow step handlers allow you to automatically perform custom actions either before running a workflow step or after the workflow step run results have been committed (written) to the data system. Out of the box, Synchronization Service includes a single predefined handler type that can automatically execute your custom PowerShell script and thus perform the desired action."

 

I was hoping to be able to use this to read the data collected from our HR software, check a specific attribute we are receiving from that system, and if it is set to a specific value, trigger an alert.

I tried using the $Srcobj hash table that is detailed in the documentation, but this appears to be only be available in the "Creation Rules".

Is there a way to reference objects in the source location from scripts running in the "Step Handlers" step?

 

Cheers

Parents
  • #1. AR Sync Services support MSDTG related data sources (AD, AAD, SQL DB etc…) In general the list of platforms used to change in past.
    #2. Challenge point: is customized data structure on HR platform side
    #3. CSV input. Probably the most easiest and robust way to start: ask HR to provide \\SHARE\HR.CSV with user records. AR Sync Service supports user create/update/terminate from CSV to ARS/AD OOB. Limitation: it will be one-way sync from CSV to AD.
    In case you need to have more detailed discussion on the matter, please let me know.

  • Hi Aidar,

    The sync process is actually completely setup. We are connecting to an SQL database currently.

    Everything is working as expected, I am just now looking to expand the functionality.

    This is why I am asking what the purpose of these Step Handlers are. I am wondering if they give me the ability to work with the data and pre and post commit. From their description, it seems like I should be able to. But maybe I am wrong. I am just trying to understand if there is a hast table that is created that I can access from the Step Handler steps.

Reply
  • Hi Aidar,

    The sync process is actually completely setup. We are connecting to an SQL database currently.

    Everything is working as expected, I am just now looking to expand the functionality.

    This is why I am asking what the purpose of these Step Handlers are. I am wondering if they give me the ability to work with the data and pre and post commit. From their description, it seems like I should be able to. But maybe I am wrong. I am just trying to understand if there is a hast table that is created that I can access from the Step Handler steps.

Children
  • Global action for the step. As JohnyQuest pointed above, I used Step Handles to do global Pre-Step action / Post-Step action for all records processed in the step (for example, massage the HR.CSV file input before/after processing the step).

    Per-record pre-commit/post-commit steps: I’m not sure that you can do this (though it is a great question).  Though, you can access in-process user data on both side (ARS/AD, and HR/SQL) via $Srcobj, $DirObj.

    Trick. Try to sync some hidden attribute (Write <TimeStamp> in CA-15, or Virtual Attribute like MY_ARS_SYNC) and fit in the attribute sync a script to process $Srcobj, $DirObj, calculate result and “hit” QAD-Users (ARS/AD) and SQL SELECT UPDATE (HR). It is not exactly pre/post commit per record, but close enough.

    If the trick above does not help and you need *during the sync* a status of the record from outside of the current values (old and new) to be calculated based on complex logic data combined in AD and HR *together*: maybe it would be beneficial to rethink whole sync process logistics and dependencies which comes first and latter.