Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Workflow won't start with console app

73 views
Skip to first unread message

vitoman66

unread,
Oct 30, 2009, 1:06:04 PM10/30/09
to
My company want to run a weekly sales report every Sunday at 1am.

I setup a Document Library with a custom Excel template and attached a
workflow, programmed in Visual Studio, to fill the new spreadsheet list item
with data.

I can manually create the document and then run the workflow and everything
is fine.

I have created a console app that will run as a scheduled job. The console
app opens the Sharepoint list and successfully creates the new item. Then
code executes to run the associated workflow and document library list shows
the item is starting. After a few moments I get a "Failed On Start
(retrying)" message then I have to manually terminate the workflow.

Here are the results from the Sharepiont logs:


10/30/2009 11:34:35.53 SalesWeeklySalesReportKickoff.e (0x0E14) 0x0DA8 ULS
Logging Unified Logging Service 8wsv High ULS
Init Completed (SalesWeeklySalesReportKickoff.exe, onetnative.dll)
10/30/2009 11:34:36.33 SalesWeeklySalesReportKickoff.e (0x0E14) 0x0DA8 ULS
Logging Unified Logging Service 8wsv High ULS
Init Completed (SalesWeeklySalesReportKickoff.exe,
Microsoft.Office.Server.Native.dll)
10/30/2009 11:34:38.97 SalesWeeklySalesReportKickoff.e
(0x0E14) 0x0DA8 Windows SharePoint Services General
72oy Information #96000f: Loading antivirus scanner...
10/30/2009 11:34:38.97 SalesWeeklySalesReportKickoff.e
(0x0E14) 0x0DA8 Windows SharePoint Services General
72oz Information #960010: Finished loading antivirus scanner. No scanner
installed.
10/30/2009 11:34:39.01 SalesWeeklySalesReportKickoff.e
(0x0E14) 0x0DA8 Windows SharePoint Services IRM
95lu Information Information Rights Management (IRM): The initialization of
protector {4F9976DD-47C3-4518-B2A2-A258B379F970} was completed. Protector:
{4F9976DD-47C3-4518-B2A2-A258B379F970}
10/30/2009 11:34:39.01 SalesWeeklySalesReportKickoff.e
(0x0E14) 0x0DA8 Windows SharePoint Services IRM
95lu Information Information Rights Management (IRM): The initialization of
protector {4F9976DE-47C3-4518-B2A2-A258B379F970} was completed. Protector:
{4F9976DE-47C3-4518-B2A2-A258B379F970}
10/30/2009 11:34:39.01 SalesWeeklySalesReportKickoff.e
(0x0E14) 0x0DA8 Windows SharePoint Services IRM
95lu Information Information Rights Management (IRM): The initialization of
protector {4F9976DC-47C3-4518-B2A2-A258B379F970} was completed. Protector:
{4F9976DC-47C3-4518-B2A2-A258B379F970}
10/30/2009 11:34:40.58 SalesWeeklySalesReportKickoff.e
(0x0E14) 0x0DA8 Windows SharePoint Services General
75fe High Failed to determine definition for Feature with ID
'c7d79579-6040-4759-9dcf-0cabae5b7acd'. Skipping this feature for element
querying consideration.
10/30/2009 11:34:40.58 SalesWeeklySalesReportKickoff.e
(0x0E14) 0x0DA8 Windows SharePoint Services General
75fe High Failed to determine definition for Feature with ID
'5588d18a-106c-4081-849e-1aff4e50396a'. Skipping this feature for element
querying consideration.
10/30/2009 11:34:40.59 SalesWeeklySalesReportKickoff.e
(0x0E14) 0x0DA8 Windows SharePoint Services General
75fe High Failed to determine definition for Feature with ID
'ae9e40a8-d89e-495f-a5c9-62ed9f945e92'. Skipping this feature for element
querying consideration.
10/30/2009 11:34:40.59 SalesWeeklySalesReportKickoff.e
(0x0E14) 0x0DA8 Windows SharePoint Services General
75fe High Failed to determine definition for Feature with ID
'0e910345-4a53-4785-bc36-62ffd14675e8'. Skipping this feature for element
querying consideration.
10/30/2009 11:34:40.59 SalesWeeklySalesReportKickoff.e
(0x0E14) 0x0DA8 Windows SharePoint Services General
75fe High Failed to determine definition for Feature with ID
'087ba75d-8f5c-47e9-932d-7ad9942dac6a'. Skipping this feature for element
querying consideration.
10/30/2009 11:34:40.59 SalesWeeklySalesReportKickoff.e
(0x0E14) 0x0DA8 Windows SharePoint Services General
75fe High Failed to determine definition for Feature with ID
'e374bbd0-5ed8-4ff0-af75-83419c41b767'. Skipping this feature for element
querying consideration.
10/30/2009 11:34:40.61 SalesWeeklySalesReportKickoff.e
(0x0E14) 0x0DA8 Windows SharePoint Services General
75fe High Failed to determine definition for Feature with ID
'c3a604b8-f9ef-406a-9290-f1f53a36f1cc'. Skipping this feature for element
querying consideration.
10/30/2009 11:34:40.61 SalesWeeklySalesReportKickoff.e
(0x0E14) 0x0DA8 Windows SharePoint Services General
75fe High Failed to determine definition for Feature with ID
'b71d1c32-657b-4022-8094-fdf74697f7c1'. Skipping this feature for element
querying consideration.
10/30/2009 11:34:40.83 SalesWeeklySalesReportKickoff.e
(0x0E14) 0x0DA8 Windows SharePoint Services Workflow Infrastructure
8ncx Verbose RunWorkflow, cannot deliver events to STA thread
10/30/2009 11:34:40.97 SalesWeeklySalesReportKickoff.e (0x0E14) 0x0DA8 ULS
Logging Unified Logging Service 8wsw High Now
terminating ULS (SalesWeeklySalesReportKickoff.exe,
Microsoft.Office.Server.Native.dll)
10/30/2009 11:34:40.97 SalesWeeklySalesReportKickoff.e (0x0E14) 0x0DA8 ULS
Logging Unified Logging Service 8wsw High Now
terminating ULS (SalesWeeklySalesReportKickoff.exe, onetnative.dll)


10/30/2009 11:35:24.45 OWSTIMER.EXE (0x048C)
0x04CC Windows SharePoint Services Workflow Infrastructure
72fs Unexpected RunWorkflow: System.ArgumentException: Value does not fall
within the expected range. at
Microsoft.SharePoint.Workflow.SPWorkflowActivationProperties..ctor(SPWorkflow
workflow, Int32 runAsUserId, String associationData, String initiationData)
at
Microsoft.SharePoint.Workflow.SPWinOEWSSService.MakeActivation(SPWorkflow
workflow, SPWorkflowEvent e) at
Microsoft.SharePoint.Workflow.SPWinOeEngine.RunWorkflow(Guid trackingId,
SPWorkflowHostService host, SPWorkflow workflow, Collection`1 events,
TimeSpan timeOut) at
Microsoft.SharePoint.Workflow.SPWorkflowManager.RunWorkflowElev(SPWorkflow
originalWorkflow, SPWorkflow workflow, Collection`1 events,
SPRunWorkflowOptions runOptions)
10/30/2009 11:35:24.45 OWSTIMER.EXE (0x048C)
0x04CC Windows SharePoint Services Workflow Infrastructure
98d7 Unexpected System.ArgumentException: Value does not fall within the
expected range. at
Microsoft.SharePoint.Workflow.SPWorkflowActivationProperties..ctor(SPWorkflow
workflow, Int32 runAsUserId, String associationData, String initiationData)
at
Microsoft.SharePoint.Workflow.SPWinOEWSSService.MakeActivation(SPWorkflow
workflow, SPWorkflowEvent e) at
Microsoft.SharePoint.Workflow.SPWinOeEngine.RunWorkflow(Guid trackingId,
SPWorkflowHostService host, SPWorkflow workflow, Collection`1 events,
TimeSpan timeOut) at
Microsoft.SharePoint.Workflow.SPWorkflowManager.RunWorkflowElev(SPWorkflow
originalWorkflow, SPWorkflow workflow, Collection`1 events,
SPRunWorkflowOptions runOptions)
10/30/2009 11:35:24.64 OWSTIMER.EXE (0x048C)
0x04CC Windows SharePoint Services Workflow Infrastructure
98d8 Unexpected System.UnauthorizedAccessException: Access is denied.
(Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) at
Microsoft.SharePoint.SPGlobal.HandleUnauthorizedAccessException(UnauthorizedAccessException
ex) at Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String
bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean
bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String&
pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion,
Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object&
pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration,
Boolean bPublish) at
Microsoft.SharePoint.SPListItem.AddOrUpdateItem(Boolean bAdd, Boolean
bSystem, Boolean bPreserveItemVersion, Boolean bNoVersion, Boolean...
10/30/2009 11:35:24.64* OWSTIMER.EXE (0x048C)
0x04CC Windows SharePoint Services Workflow Infrastructure
98d8 Unexpected ... bMigration, Boolean bPublish, Boolean bCheckOut, Boolean
bCheckin, Guid newGuidOnAdd, Int32& ulID, Object& objAttachmentNames, Object&
objAttachmentContents, Boolean suppressAfterEvents) at
Microsoft.SharePoint.SPListItem.UpdateInternal(Boolean bSystem, Boolean
bPreserveItemVersion, Guid newGuidOnAdd, Boolean bMigration, Boolean
bPublish, Boolean bNoVersion, Boolean bCheckOut, Boolean bCheckin, Boolean
suppressAfterEvents) at Microsoft.SharePoint.SPListItem.Update() at
Microsoft.SharePoint.Workflow.SPWorkflow.CreateHistoryEvent(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 Micr...
10/30/2009 11:35:24.64* OWSTIMER.EXE (0x048C)
0x04CC Windows SharePoint Services Workflow Infrastructure
98d8 Unexpected ...osoft.SharePoint.Workflow.SPWorkflow.CreateHistoryEvent(Int32
eventId, Object groupId, SPMember user, TimeSpan duration, String outcome,
String description, String otherData) at
Microsoft.SharePoint.Workflow.SPWorkflowManager.RunWorkflowElev(SPWorkflow
originalWorkflow, SPWorkflow workflow, Collection`1 events,
SPRunWorkflowOptions runOptions)


In the console app code I have tried many variations to get the workflow to
complete such as making the workflow run when a new item is created (thus
eliminating the console app code) and evelating privledges of the code to no
avail.
What am I missing?


I am running MOSS on Server 2008 64-bit

olego

unread,
Nov 2, 2009, 3:27:29 AM11/2/09
to
I think the point error is:

10/30/2009 11:34:40.83 SalesWeeklySalesReportKickoff.e
(0x0E14) 0x0DA8 Windows SharePoint Services Workflow Infrastructure
8ncx Verbose RunWorkflow, cannot deliver events to STA thread

First, try to mark entry point with [MTAThread] (http://msdn.microsoft.com/en-us/library/system.mtathreadattribute.aspx)

Also, I can recommend you to migrate code from console to SharePoint Job (Create a SPJobDefinition ...).
Oleg
Virtosoftware - Vendor of Web Part for SharePoint.

vitoman66 wrote:

Workflow won't start with console app
30-???-09

Previous Posts In This Thread:

EggHeadCafe - Software Developer Portal of Choice
Easy Cross-Browser Collapsible Divs Redux
http://www.eggheadcafe.com/tutorials/aspnet/2c0ba302-d7a5-453d-9b63-6e9095a9597a/easy-crossbrowser-collap.aspx

pis...@gmail.com

unread,
May 18, 2012, 3:33:54 PM5/18/12
to
Hello,

I know this is an old post but I think I found the fix. At least the fix works for me.

My SharePoint 2010 environment is very restricted and I used a least privelege permission model. I also changed the "User Permissions for Web Application" in the CA under Application Management, Manage Web Applications (selecting the web application where you are running the workflow).

Under Site Permissions you need to make sure that the checbox for "Manage Web Site - Grants the ability to perform all administration tasks for the web site as well as manage content" is marked.

Having that box unchecked will prevent any user (including the farm account) to run any workflow.

Good Luck!
0 new messages