Step Handlers - Synchronization Service

Does anyone know how to use step handlers? The documentation barely even talks about them and no examples are given.

I would like to take data from srcobj or dstobj and perform actions pre or post run. Is this not doable. In what forms are step handlers useful then?

Parents
  • The Step Handlers are executed before and after the steps run, not during the enumeration of the objects, therefore the SrcObj and DstObj objects are not available. Maybe the Pre and Post Event Handlers in Active Roles can help here?

    In the Source tab of a Workflow step, code can be executed here, which would essentially be at the beginning of the enumeration of each source object before bulk of that step runs, so maybe you could run some Pre operation code here. Can't really think of a way to run code at the end of a step that would provide access to the SrcObj and DstObj objects.

    If you wanted to provide an example of what you might be trying to accomplish maybe some suggestions could be made.

Reply
  • The Step Handlers are executed before and after the steps run, not during the enumeration of the objects, therefore the SrcObj and DstObj objects are not available. Maybe the Pre and Post Event Handlers in Active Roles can help here?

    In the Source tab of a Workflow step, code can be executed here, which would essentially be at the beginning of the enumeration of each source object before bulk of that step runs, so maybe you could run some Pre operation code here. Can't really think of a way to run code at the end of a step that would provide access to the SrcObj and DstObj objects.

    If you wanted to provide an example of what you might be trying to accomplish maybe some suggestions could be made.

Children
  • It's not that I'm trying to accomplish anything specific at the moment. I am trying to find out what is the purpose of a step handler if the objects are not available to call. What is the use case of a step handler. If there is no use case, then why did the developers add something that is unusable?

  • The simplest use-case that I've seen for a Step Handler is with a CSV file, using PowerShell in a Step Handler to get a remote copy of a CSV and put it locally, for isolation and latency purposes.

    You could also use it to create a VPN for access to a specific resource, or to query a connected system for information that is needed later on in a Workflow.

    It's not a commonly-used feature, certainly, but there is sometimes the need for pre- and post- operation tasks.

  • You're right that Step Handlers run after or before the execution of the workflow steps. You can configure connection handlers though that can be configured to run after object creation or modification that, I believe, does have access to the source and target objects.

    There's also the ability to run a script after passwords are reset with the password sync functionality if it's something like updating a date attribute whenever a password has been set.