Identity Broker Forum
Welcome to the community forum for Identity Broker.
Browse the knowledge base, ask questions directly to the product group, or leverage the community to get answers. Leave ideas for new features and vote for the features or bug fixes you want most.
System.InvalidOperationException thrown by PowerShell connector during full import
I have several functioning PowerShell connectors which support both full and polling methods, all of which are working without error. However, the
following exception is being thrown for one of the PowerShell connectors only (SF Position):
Connector Processing page 3 for connector SF Position failed with reason The transaction associated with the current connection has completed but has not been disposed. The transaction must be disposed before the connection can be used to execute SQL statements.. Duration: 00:31:23.4557884. Error details: System.InvalidOperationException: The transaction associated with the current connection has completed but has not been disposed. The transaction must be disposed before the connection can be used to execute SQL statements. at System.Data.SqlClient.TdsParser.TdsExecuteRPC(_SqlRPC[] rpcArray, Int32 timeout, Boolean inSchema, SqlNotificationRequest notificationRequest, TdsParserStateObject stateObj, Boolean isCommandProc, Boolean sync, TaskCompletionSource`1 completion, Int32 startRpc, Int32 startParam) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult) at System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries) at System.Data.Linq.SqlClient.SqlProvider.CompiledQuery.Execute(IProvider provider, Object[] arguments) at System.Data.Linq.CommonDataServices.DeferredSourceFactory`1.ExecuteKeyQuery(Object[] keyValues) at System.Data.Linq.CommonDataServices.DeferredSourceFactory`1.Execute(Object instance) at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source) at System.Data.Linq.EntityRef`1.get_Entity() at Unify.Product.IdentityBroker.Repository.EntityLinqQueryConverterUtilitiesBase`4.SetEntityValue(IGrouping`2 dataValue, IValueCollection`2 entity) at Unify.Framework.Visitor.Visit[T](IEnumerable`1 visitCollection, Action`2 visitor) at Unify.Product.IdentityBroker.Repository.EntityLinqQueryConverterUtilitiesBase`4.DataToBusinessConverter(TSourceEntity entityToConvert) at Unify.Product.IdentityBroker.Repository.KnownEntityLinqQueryConverterUtilitiesBase`4.DataToBusinessConverter(TSourceEntity entityToConvert) at Unify.Product.IdentityBroker.Repository.EntityLinqQueryConverterUtilitiesBase`4.MapEntityToBusiness(TSourceEntity entity) at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext() at System.Linq.Buffer`1..ctor(IEnumerable`1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source) at Unify.Framework.Data.LinqWhereQuery`5.GetEnumerator() at System.Linq.Buffer`1..ctor(IEnumerable`1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source) at Unify.Product.IdentityBroker.EntityRepositoryExtensions.ConvertConnectorEntitiesWithRepositoryEntities(IEnumerable`1 connectorEntities, IMultiKey`1 schemaKey, IQueryable`1 sourceEntities, Guid connectorId, IEnumerable`1 originalEntities) at Unify.Product.IdentityBroker.RepositoryChangeDetectionWorkerBase.PerformChangeDetectionOnConnectorEntityPage(IEnumerable`1 connectorEntities, Int32& index, Int32 entitiesProcessedSoFar, IEntityChangesReportGenerator`2 reportGenerator) at Unify.Product.IdentityBroker.RepositoryChangeDetectionWorkerBase.<>c__DisplayClass3.<PerformChangeDetection>b__0(IEnumerable`1 page) at Unify.Framework.Visitor.ThreadsafeVisitorEvaluator`1.ThreadsafeItemEvaluator.Evaluate()",Normal 20150119,00:29:13,UNIFY Identity Broker,Change detection engine,Error,"Change detection engine import all items failed. Change detection engine import all items for connector SF Position failed with reason An error occurred while evaluating a task on a worker thread. See the inner exception details for information.. Duration: 00:33:52.0953947 Error details: Unify.Framework.EvaluatorVisitorException: An error occurred while evaluating a task on a worker thread. See the inner exception details for information. ---> System.InvalidOperationException: The transaction associated with the current connection has completed but has not been disposed. The transaction must be disposed before the connection can be used to execute SQL statements. at System.Data.SqlClient.TdsParser.TdsExecuteRPC(_SqlRPC[] rpcArray, Int32 timeout, Boolean inSchema, SqlNotificationRequest notificationRequest, TdsParserStateObject stateObj, Boolean isCommandProc, Boolean sync, TaskCompletionSource`1 completion, Int32 startRpc, Int32 startParam) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult) at System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries) at System.Data.Linq.SqlClient.SqlProvider.CompiledQuery.Execute(IProvider provider, Object[] arguments) at System.Data.Linq.CommonDataServices.DeferredSourceFactory`1.ExecuteKeyQuery(Object[] keyValues) at System.Data.Linq.CommonDataServices.DeferredSourceFactory`1.Execute(Object instance) at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source) at System.Data.Linq.EntityRef`1.get_Entity() at Unify.Product.IdentityBroker.Repository.EntityLinqQueryConverterUtilitiesBase`4.SetEntityValue(IGrouping`2 dataValue, IValueCollection`2 entity) at Unify.Framework.Visitor.Visit[T](IEnumerable`1 visitCollection, Action`2 visitor) at Unify.Product.IdentityBroker.Repository.EntityLinqQueryConverterUtilitiesBase`4.DataToBusinessConverter(TSourceEntity entityToConvert) at Unify.Product.IdentityBroker.Repository.KnownEntityLinqQueryConverterUtilitiesBase`4.DataToBusinessConverter(TSourceEntity entityToConvert) at Unify.Product.IdentityBroker.Repository.EntityLinqQueryConverterUtilitiesBase`4.MapEntityToBusiness(TSourceEntity entity) at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext() at System.Linq.Buffer`1..ctor(IEnumerable`1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source) at Unify.Framework.Data.LinqWhereQuery`5.GetEnumerator() at System.Linq.Buffer`1..ctor(IEnumerable`1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source) at Unify.Product.IdentityBroker.EntityRepositoryExtensions.ConvertConnectorEntitiesWithRepositoryEntities(IEnumerable`1 connectorEntities, IMultiKey`1 schemaKey, IQueryable`1 sourceEntities, Guid connectorId, IEnumerable`1 originalEntities) at Unify.Product.IdentityBroker.RepositoryChangeDetectionWorkerBase.PerformChangeDetectionOnConnectorEntityPage(IEnumerable`1 connectorEntities, Int32& index, Int32 entitiesProcessedSoFar, IEntityChangesReportGenerator`2 reportGenerator) at Unify.Product.IdentityBroker.RepositoryChangeDetectionWorkerBase.<>c__DisplayClass3.<PerformChangeDetection>b__0(IEnumerable`1 page) at Unify.Framework.Visitor.ThreadsafeVisitorEvaluator`1.ThreadsafeItemEvaluator.Evaluate() --- End of inner exception stack trace --- at Unify.Framework.Visitor.ThreadsafeVisitorEvaluator`1.CheckForException() at Unify.Framework.Visitor.ThreadsafeVisitorEvaluator`1.WaitForAvailableThread() at Unify.Framework.Visitor.ThreadsafeVisitorEvaluator`1.Visit() at Unify.Product.IdentityBroker.RepositoryChangeDetectionWorkerBase.PerformChangeDetection(IEnumerable`1 connectorEntities) at Unify.Product.IdentityBroker.ChangeDetectionImportAllJob.ImportAllChangeProcess() at Unify.Product.IdentityBroker.ChangeDetectionImportAllJob.RunBase() at Unify.Framework.DefinedScopeJobAuditTrailJobDecorator.Run() at Unify.Product.IdentityBroker.ConnectorJobExecutor.<>c__DisplayClass29.<Run>b__27() at Unify.Framework.AsynchronousJobExecutor.PerformJobCallback(Object state)",Normal
The "Import All" details from the web console show as follows:
Total Entities: 0 Started: 19/Jan/2015 10:55:21 Completed: 19/Jan/2015 11:29:13 Duration: 00:33:52.0953947 -------------------------------------------------------------------------------- Indicates that this last run errored. Change detection engine import all items for connector SF Position failed with reason An error occurred while evaluating a task on a worker thread. See the inner exception details for information.. Duration: 00:33:52.0953947 -------------------------------------------------------------------------------- Warning raised: 19/Jan/2015 10:56:22 Warning Some items failed schema validation - refer to the logs for more information
UnifyLog20150119.csv
Secure storage of password value for use with PowerShell connector
I have a requirement to send a password in clear text within the HTTP header (only protection is SSL) when calling the SAP ODATA API. This cannot be in encoded form, so I cannot use the standard approach used say when calling the Exchange API to provision a mailbox. Is there a way that an encoded password can be accessed and decoded from within the Identity Broker configuration itself (e.g. via a $variable), so that it is not exposed to anyone viewing the IdB configuration?
As an alternative to the Exchange style file-based encoding mechanism I am saving the Base64 encoded password to a text file for now, but this is not exactly secure. If the answer to the above is no, and there are any alternatives that you are aware of please advise.
PowerShell connector use original entities on update
For the PowerShell connector, the collection of original entities should be available to the script.
PowerShell connector - investigate use of stored values collection
PowerShell connector:
- Reference stored values engine in connector plugin
- Create instance of stored values collection (see below)
- Add stored values collection to component that is passed into PowerShell scripts
- Test
Stored values details:
- Example: S:\hg\Connectors\HP.Trim\Master\Source\Communicator\Unify.Connectors.HPTrimWSCommunicator\HPTrimWSCommunicator.cs
- Look at the Translations
- Don't follow exactly, the connector factory should create the context, retrieve (insert a collection if there isn't an existing one), and dispose when the connector is disposed.
- The connector should then pass the collection into the PowerShell components.
- The connector should submit the changes to the context - consider making the PowerShell components disposable so that it can do it, just make sure the usages of the components are all wrapped in using statements.
Identity Broker export performance issue for PowerShell connector
Export performance is likely to be a major bottleneck for Origin during the "initial load" sync process where FIM is writing back network account and email address to SuccessFactors (SAP HR). Current performance metrics from DEV are not a great guide due to the limited number of employees loaded into FIM for that environment (<50), however the last sizeable batch was 39 user updates in 00:09:50 (a rate of 1 every 15 seconds!!!). When it comes to a full set we are talking upwards of 33K users requiring updates - and at the above rate we will be looking at 8250 minutes, or 137.5 hours, or 5.7 days.
In an attempt to head this problem off in advance of it coming to the attention of the testers, I am thinking that we may have to rethink the way we are applying updates for the initial load.
See linked issue for idea as to how the PS connector architecture might be improved for exports in future.
Customer support service by UserEcho