Answered Web Analytics Report Workflow email/alerts

  • Dienstag, 1. Mai 2012 18:51
     
     

    I Created couple of workflows by going to SiteActions --> SiteAdministration --> WorkFlow Settings --> Add Workflow --> schedule Web Analytics Report   to generate a Web Analytics report in a email to provided recipients.

    There is no option to start workflow immediately. It is scheduled to run once in every day. And I found the respective Timer job "Web Analytics Trigger Workflows Timer Job" running and showing success message in Central Admin. But in ULS logs I am seeing the below exception daily this timer job runs and but no emails/alerts sending out. No entries in Workflow history or workflow tasks.

    Anybody seen this behavior in their farms? It is a out of box worfkflow but generating below exception

    Is it any patch issue? This farms patch level is  14.0.6106.5002 June 2011 CU (Refresh)

    By the way this a Claims based (SAML) web application/sitecollection.

    Detected use of SPRequest for previously closed SPWeb object.  Please close SPWeb objects when you are done with all objects obtained from them, but not before.  Stack trace:  

    at Microsoft.SharePoint.Workflow.SPWorkflow.CreateHistoryEventBatchable(Guid instanceId, Guid templateId, Guid baseTemplateId, SPList historyList, Int32 eventId, Object groupId, Guid listId, Int32 itemId, String mwsInstanceId, Int32 userId, TimeSpan duration, String outcome, String description, String otherData)   

    at Microsoft.SharePoint.Workflow.SPWinOEWSSService.AddHistoryItem(SPWorkflow wf, IPendingWork wb, BatchOperation method, SPWorkflowHistoryEventType eventId, Int32 userId, TimeSpan duration, String outcome, String description, String otherData)   

    at Microsoft.SharePoint.Workflow.SPWinOEWSSService.LogToHistoryList(Guid workflowId, SPWorkflowHistoryEventType eventId, Int32 userId, TimeSpan duration, String outcome, String description, String otherData)   

    at Microsoft.Office.Server.WebAnalytics.ParserHelper.LogToHistoryList(ActivityExecutionContext context, SPWorkflowActivationProperties activeProps, SPWorkflowHistoryEventType eventType, String outcome, String description)   

    at Microsoft.Office.Server.WebAnalytics.ScheduleReportActivity.GetSearchReportStream(String reportName, AggregationContext ac, AggregationLevel al, Int32 timePeriod, Boolean includeSubsites, Stream& reportPath)   

    at Microsoft.Office.Server.WebAnalytics.ScheduleReportActivity.Execute(ActivityExecutionContext executionContext)   

    at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(T activity, ActivityExecutionContext executionContext)   

    at System.Workflow.ComponentModel.CompositeActivityExecutor`1.Execute(T activity, ActivityExecutionContext executionContext)   

    at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(Activity activity, ActivityExecutionContext executionContext)   

    at System.Workflow.ComponentModel.ActivityExecutorOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime)   

    at System.Workflow.Runtime.Scheduler.Run()   

    at System.Workflow.Runtime.WorkflowExecutor.RunScheduler()   

    at System.Workflow.Runtime.WorkflowExecutor.RunSome(Object ignored)   

    at System.Workflow.Runtime.Hosting.DefaultWorkflowSchedulerService.WorkItem.Invoke(WorkflowSchedulerService service)   

    at System.Workflow.Runtime.Hosting.ManualWorkflowSchedulerService.RunOne(Guid workflowInstanceId)   

    at System.Workflow.Runtime.Hosting.ManualWorkflowSchedulerService.RunWorkflow(Guid workflowInstanceId)   

    at Microsoft.SharePoint.Workflow.SPWinOeHostServices.Send(SPWorkflow workflow, SPWinOeWorkflow winoeworkflow, SPWorkflowEvent e)   

    at Microsoft.SharePoint.Workflow.SPWinOeEngine.RunWorkflow(SPWorkflowHostService host, SPWorkflow workflow, Collection`1 events, TimeSpan timeOut)   

    at Microsoft.SharePoint.Workflow.SPWorkflowManager.RunWorkflowElev(SPWorkflow workflow, Collection`1 events, SPWorkflowRunOptionsInternal runOptions)   

    at Microsoft.SharePoint.Workflow.SPWorkflowManager.StartWorkflowElev(Object context, SPWorkflowAssociation association, DateTime elevationTimeUtc, SPWorkflowEvent startEvent, SPWorkflowRunOptions runOptions)   

    at Microsoft.SharePoint.Workflow.SPWorkflowManager.<>c__DisplayClass13.<StartWorkflow>b__12(SPSite superUserSite, SPWeb superUserWeb)   

    at Microsoft.SharePoint.SPSecurity.<>c__DisplayClassc.<RunWithSystemSiteAndWeb>b__a()   

    at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2()   

    at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)   

    at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param)   

    at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode)   

    at Microsoft.SharePoint.Workflow.SPWorkflowManager.StartWorkflow(Object context, SPWorkflowAssociation association, SPWorkflowEvent startEvent, SPWorkflowRunOptions runOpts)   

    at Microsoft.SharePoint.Workflow.SPWorkflowManager.StartWorkflow(Object context, SPWorkflowAssociation association, String eventData, SPWorkflowRunOptions runOptions)   

    at Microsoft.Office.Server.WebAnalytics.WebAnalyticsWorkflowTriggerJobDefinition.<>c__DisplayClass6.<RunAnalyticsSiteWorkflows>b__0()   

    at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2()   

    at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)   

    at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param)   

    at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode)   

    at Microsoft.Office.Server.WebAnalytics.WebAnalyticsWorkflowTriggerJobDefinition.RunAnalyticsSiteWorkflows(SPWeb web)   

    at Microsoft.Office.Server.WebAnalytics.WebAnalyticsWorkflowTriggerJobDefinition.ProcessSite(SPSite siteToProcess, SPJobState jobState)   

    at Microsoft.SharePoint.Administration.SPAllSitesJobDefinition.Execute(SPContentDatabase contentDatabase, SPJobState jobState)   

    at Microsoft.Office.Server.WebAnalytics.WebAnalyticsWorkflowTriggerJobDefinition.Execute(SPContentDatabase contentDatabase, SPJobState jobState)   

    at Microsoft.SharePoint.Administration.SPContentDatabaseJobDefinition.Execute(SPJobState jobState)   

    at Microsoft.SharePoint.Administration.SPTimerJobInvokeInternal.Invoke(SPJobDefinition jd, Guid targetInstanceId, Boolean isTimerService, Int32& result)   

    at Microsoft.SharePoint.Administration.SPTimerJobInvoke.Invoke(TimerJobExecuteData& data, Int32& result)


    Gopikrishnaega

Alle Antworten

  • Donnerstag, 3. Mai 2012 07:08
     
     Beantwortet

    Hi,

    Did you try to add the Schedule Web Analytics Alerts workflow? If not, please try to add this one, then check the result.

    Please check the following permission settings:

    Create and configure the View Web Analytics Data permission

    After the Web Analytics service application is configured, the View Web Analytics Data permission needs to be created for users that are not a site collection administrator or site owner. This is the minimum required permission needed to view Web Analytics reports. End users who need to access a Web Analytics report must have this permission assigned to them.

    To create the View Web Analytics Data permission for a site or site collection

    1. Verify that the user account that is performing this procedure is that of a site collection administrator or a site owner.

    2. From a site or site collection, click Site Permissions from the Site Actions menu.

    3. On Site Permissions page, on the Edit tab, in the Manage group, click Permission Levels.

    4. Click Add a Permission Level.

    5. In the Name field, type View Web Analytics Data.

    6. In the Permissions section, under the List Permissions, select the View Application Pages check box.

    7. In the Permissions section, under the Site Permissions, select the View Web Analytics Data and Enumerate Permissions check boxes.

    8. Click Create.

    To configure the View Web Analytics Data permission for a site or site collection

    1. Verify that the user account that is performing this procedure is that of a site collection administrator or a site owner.

    2. From a site or site collection, click Site Permissions from the Site Actions menu.

    3. On the Site Permissions page, on the Edit tab, in the Grant group, click Grant Permissions.

    4. In the Users/Groups box, add the users that will be granted the View Web Analytics Data permission.

    5. In the Grant Permissions section, click Grant users permission directly, and then select the View Web Analytics Data check box.

    6. Click OK.

    Finally, please try to create a new web analytic service application or add the workflow in another site collection, check the result.

    Thanks,

    Rock Wang


    Rock Wang TechNet Community Support

  • Freitag, 11. Mai 2012 22:40
     
     Beantwortet

    Mark, thanks for your suggestion.

    In my case it is due to a custom claims provider, which is unable to reslove a user's emai id. And throwing internal exceptions after the above SPWeb related exception.

    I got cosnfuse with above SPWeb exception and was thinking couldbe a Bug. But it's not.


    Gopi


    • Als Antwort markiert egopie22 Freitag, 11. Mai 2012 22:40
    • Bearbeitet egopie22 Freitag, 11. Mai 2012 22:41
    •