none
IListItemService - Handling list item events in Webs other than the Workflow Web RRS feed

  • Question


  • My workflow is associated with a list in the root web of a site collection and in that workflow I need to listen for item changed events in a sub-site list of that site collection.  In my custom activity I can figure out which site the item is in and therefore retrieve the specific list id.

    However when I call InitializeForEvent, passing that listId, I get the error below.

    Does SPWinOEWSSService expect that all operations are intended for the parent web of the requesting workflow?  If so is there any way to override this? 

    Many Thanks,

    Brian

    [1820] The page you selected contains a list that does not exist.  It may have been deleted by another user.
    [1820]    at Microsoft.SharePoint.Library.SPRequestInternalClass.GetListsWithCallback(String bstrUrl, Guid foreignWebId, String bstrListInternalName, Int32 dwBaseType, Int32 dwBaseTypeAlt, Int32 dwServerTemplate, UInt32 dwGetListFlags, UInt32 dwListFilterFlags, Boolean bPrefetchMetaData, Boolean bSecurityTrimmed, Boolean bGetSecurityData, ISP2DSafeArrayWriter p2DWriter, Int32& plRecycleBinCount)
    [1820]    at Microsoft.SharePoint.Library.SPRequest.GetListsWithCallback(String bstrUrl, Guid foreignWebId, String bstrListInternalName, Int32 dwBaseType, Int32 dwBaseTypeAlt, Int32 dwServerTemplate, UInt32 dwGetListFlags, UInt32 dwListFilterFlags, Boolean bPrefetchMetaData, Boolean bSecurityTrimmed, Boolean bGetSecurityData, ISP2DSafeArrayWriter p2DWriter, Int32& plRecycleBinCount)
    [1820]    --- End of inner exception stack trace ---
    [1820]    at Microsoft.SharePoint.Library.SPRequest.GetListsWithCallback(String bstrUrl, Guid foreignWebId, String bstrListInternalName, Int32 dwBaseType, Int32 dwBaseTypeAlt, Int32 dwServerTemplate, UInt32 dwGetListFlags, UInt32 dwListFilterFlags, Boolean bPrefetchMetaData, Boolean bSecurityTrimmed, Boolean bGetSecurityData, ISP2DSafeArrayWriter p2DWriter, Int32& plRecycleBinCount)
    [1820]    at Microsoft.SharePoint.SPListCollection.EnsureListsData(Guid webId, String strListName)
    [1820]    at Microsoft.SharePoint.SPListCollection.EnsureListsData(String strListName)
    [1820]    at Microsoft.SharePoint.SPListCollection.ItemByInternalName(String strInternalName, Boolean bThrowException)
    [1820]    at Microsoft.SharePoint.SPListCollection.GetListById(Guid uniqueID, Boolean bThrowException)
    [1820]    at Microsoft.SharePoint.SPListCollection.get_Item(Guid uniqueID)
    [1820]    at Microsoft.SharePoint.Workflow.SPWinOEWSSService.CreateSubscription(MessageEventSubscription sub)
    [1820]    at Microsoft.SharePoint.Workflow.SPWinOESubscriptionService.CreateSubscription(MessageEventSubscription sub)
    [1820]    at System.Workflow.Activities.CorrelationTokenInvalidatedHandler.CreateSubscription(Guid instanceId, ActivityExecutionContext context, ICollection`1 correlationValues)
    [1820]    at System.Workflow.Activities.CorrelationTokenInvalidatedHandler.System.Workflow.ComponentModel.IActivityEventListener<System.Workflow.Runtime.CorrelationTokenEventArgs>.OnEvent(Object sender, CorrelationTokenEventArgs dataChangeEventArgs)
    [1820]    at System.Workflow.ComponentModel.ActivityExecutorDelegateInfo`1.ActivityExecutorDelegateOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime)
    [1820]    at System.Workflow.ComponentModel.ActivityExecutorDelegateInfo`1.InvokeDelegate(Activity currentContextActivity, Activity targetContextActivity, T e, Boolean sync, Boolean transacted)
    [1820]    at System.Workflow.ComponentModel.ActivityExecutorDelegateInfo`1.InvokeDelegate(Activity currentContextActivity, T e, Boolean sync, Boolean transacted)
    [1820]    at System.Workflow.Runtime.CorrelationToken.Initialize(Activity activity, ICollection`1 propertyValues)
    [1820]    at System.Workflow.Activities.CorrelationService.InvalidateCorrelationToken(Activity activity, Type interfaceType, String methodName, Object[] messageArgs)
    [1820]    at System.Workflow.Activities.CallExternalMethodActivity.Execute(ActivityExecutionContext executionContext)
    [1820]    at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(T activity, ActivityExecutionContext executionContext)
    [1820]    at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(Activity activity, ActivityExecutionContext executionContext)
    [1820]    at System.Workflow.ComponentModel.ActivityExecutorOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime)
    [1820]    at System.Workflow.Runtime.Scheduler.Run()
    Thursday, November 19, 2009 9:39 PM