Sync Service SDK / RunWithObject method

Hello,

This seems like a long shot, but I thought I would try. Technically speaking, the Sync Service offers an SDK, of sorts. The CHM documentation was removed ages ago (is all Dell-branded), but it's still largely functional and I've used it here and there. I was taking a look at it recently because it offers the ability to run a workflow against a single object on-demand. In that old help file, there is even a Running a Workflow Step on a Specific Source Object topic with some sample code. Very exciting... but I've been experiencing inconsistent results, and seem to be constantly getting:

Exception calling "RunWithObject" with "1" argument(s): "Value cannot be null.
Parameter name: elementType"
At line:8 char:1
+ $result = $qcWorkflowStep.RunWithObject($sourceObject)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : FaultException

The log file hasn't really provided me any insight, either.

2021-04-20 22:15:07.9276 19 Error --> [IImport.Modify] ActiveRoles.SyncService.Connectors.AzureADConnector.AzureAdConnector.Modify System.ArgumentNullException: Value cannot be null.
Parameter name: elementType
   at ActiveRoles.SyncService.Connectors.AzureADConnector.Client.DirectoryObjectsWrapperCreator.CreateWrapper(DataServiceQuery objectsQuery, DataServiceContext service, Type elementType)
   at ActiveRoles.SyncService.Connectors.AzureADConnector.Client.AzureAdClient.GetDirectoryObjects(String type)
   at ActiveRoles.SyncService.Connectors.AzureADConnector.Utils.PropertyUtils.ParseDirectoryObject(String str, IAzureAdClient client)
   at ActiveRoles.SyncService.Connectors.AzureADConnector.Utils.PropertyUtils.SaveDirectoryObjectCollection(Object obj, String name, Object value, IDirectoryObjects directoryObjects, IAzureAdClient client)
   at ActiveRoles.SyncService.Connectors.AzureADConnector.Utils.QcAttributeUtils.SetProperties(Object obj, QcAttributeModificationCollection attributes, IDirectoryObjects directoryObjects, IAzureAdClient client)
   at ActiveRoles.SyncService.Connectors.AzureADConnector.Implementations.ExportImpl.Modify(IAzureAdClient client, SystemEntry targetObject, IModifyAttributesRequest request, QcAttributeNameCollection attributesToLoad)
   at ActiveRoles.SyncService.Connectors.AzureADConnector.AzureAdConnector.Modify(SystemEntry targetObject, IModifyAttributesRequest request, QcAttributeNameCollection attributesToLoad)
2021-04-20 22:15:07.9276 19 Debug --> failed to apply operation ActiveRoles.SyncService.Server.OperationAppliers.ApplyOperationHelper.ApplyOperation System.ArgumentNullException: Value cannot be null.
Parameter name: elementType
   at ActiveRoles.SyncService.Connectors.AzureADConnector.Client.DirectoryObjectsWrapperCreator.CreateWrapper(DataServiceQuery objectsQuery, DataServiceContext service, Type elementType)
   at ActiveRoles.SyncService.Connectors.AzureADConnector.Client.AzureAdClient.GetDirectoryObjects(String type)
   at ActiveRoles.SyncService.Connectors.AzureADConnector.Utils.PropertyUtils.ParseDirectoryObject(String str, IAzureAdClient client)
   at ActiveRoles.SyncService.Connectors.AzureADConnector.Utils.PropertyUtils.SaveDirectoryObjectCollection(Object obj, String name, Object value, IDirectoryObjects directoryObjects, IAzureAdClient client)
   at ActiveRoles.SyncService.Connectors.AzureADConnector.Utils.QcAttributeUtils.SetProperties(Object obj, QcAttributeModificationCollection attributes, IDirectoryObjects directoryObjects, IAzureAdClient client)
   at ActiveRoles.SyncService.Connectors.AzureADConnector.Implementations.ExportImpl.Modify(IAzureAdClient client, SystemEntry targetObject, IModifyAttributesRequest request, QcAttributeNameCollection attributesToLoad)
   at ActiveRoles.SyncService.Connectors.AzureADConnector.AzureAdConnector.Modify(SystemEntry targetObject, IModifyAttributesRequest request, QcAttributeNameCollection attributesToLoad)
   at ActiveRoles.SyncService.Server.QcConnector.Modify(SystemEntry targetObject, Request request, QcAttributeNameCollection attributesToLoad)
   at ActiveRoles.SyncService.Server.QcConnectorTS.Modify(SystemEntry targetObject, Request request, QcAttributeNameCollection attributesToLoad)
   at ActiveRoles.SyncService.Server.OperationAppliers.ApplyOperationHelper.ApplyUpdate[TRequest](TRequest request, IOperation operation, ConnectionContext sourceConnectionContext, ConnectionContext targetConnectionContext, QcExtensionCommandProcessor extensionCommandProcessor, SystemEntry& result)
   at ActiveRoles.SyncService.Server.OperationAppliers.ApplyOperationHelper.ApplyUpdate[TRequest](TRequest request, IOperation operation, IOperationDetailsProvider operationDetailsProvider, ConnectionContext sourceConnectionContext, ConnectionContext targetConnectionContext, ApplyOperationHelper helper, QcExtensionCommandProcessor extensionCommandProcessor, SystemEntry& result)
   at ActiveRoles.SyncService.Server.OperationAppliers.ApplyOperationHelper.ApplyOperation(IOperation operation, QcExtensionCommandProcessor extensionCommandProcessor)
   ...
   ... uninteresting lines redacted ...
   ...
   2021-04-20 22:15:08.0046 19 Debug --> { ActiveRoles.SyncService.ServerCommon.ErrorHandling.SimpleErrorHandler.HandleError 
2021-04-20 22:15:08.0046 19 Error --> Outgoing exception ActiveRoles.SyncService.ServerCommon.ErrorHandling.SimpleErrorHandler.HandleError System.ApplicationException: Value cannot be null.
Parameter name: elementType
   at ActiveRoles.SyncService.Server.MainWCFService.RunWorkflowStepWithObject(Guid workflowId, Guid workflowStepId, SystemEntry sourceObject)
   at SyncInvokeRunWorkflowStepWithObject(Object , Object[] , Object[] )
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

Just wondering if anyone else has tried anything along these or might have any ideas.

Thanks!

Parents
  • With the utmost respect, I would question the efficiency of processing a single object on demand with the sync service?  Wouldn't it be faster to use a Change or Automation workflow within the Admin Service?  I say this because in my experience (and I am sure your's is the same), there's a ton of "spool up" overhead associated with the sync service - something which you don't have with a workflow within the Admin Service.  This overhead is OK if you are performing batch operations that are not time sensitive but for anything that I want to have have occur quickly, I typically would use an Admin Service workflow.

    You do have me curious though about the use case that took you in this direction.

Reply
  • With the utmost respect, I would question the efficiency of processing a single object on demand with the sync service?  Wouldn't it be faster to use a Change or Automation workflow within the Admin Service?  I say this because in my experience (and I am sure your's is the same), there's a ton of "spool up" overhead associated with the sync service - something which you don't have with a workflow within the Admin Service.  This overhead is OK if you are performing batch operations that are not time sensitive but for anything that I want to have have occur quickly, I typically would use an Admin Service workflow.

    You do have me curious though about the use case that took you in this direction.

Children
No Data