Tuesday, June 15, 2004 9:48 PM Jan Tielens

Workflow Lite for SharePoint: "Value does not fall within the expected range" exception

A few people have reported some problems with the Workflow Lite for SharePoint RC1. When you're using the COPY action for example, the workflow engine reports the following exception in the event log:
Unable to instantiate event handler (assembly "Leadit.SharePoint.Workflow, Version=0.2.0.0, Culture=neutral, PublicKeyToken=3948f234bbbabe18", class "Leadit.SharePoint.Workflow.EventHandler"), or report event for "..." in "...". Could not execute the COPY action.(System.ArgumentException: Value does not fall within the expected range.

It turns out to be that it's not a bug, but a problem with the XML namespaces in the configuration file that was included in the setup package as an example. So everybody who's having that problem, check out my (corrected) previous post for an example config file. An updated version of the setup package will be uploaded tonight, I think RC1b is a nice name. :-) Anyway, I'm sorry for the inconvenience and I thank everyone for helping to solve the problem (especially Jessica J., who now owes me a beer!).

Filed under:

Comments

# Workflow Lite for SharePoint RC1 (Finally!)

Tuesday, June 15, 2004 10:26 AM by TrackBack

# re: Workflow Lite for SharePoint: "Value does not fall within the expected range" exception

Tuesday, June 15, 2004 6:05 PM by Brad

I reinstalled and now I am getting the following...

Unable to instantiate event handler (assembly "Leadit.SharePoint.Workflow, Version=0.2.0.0, Culture=neutral, PublicKeyToken=3948f234bbbabe18", class "Leadit.SharePoint.Workflow.EventHandler"), or report event for "Work In Progress/fdghjhj.doc" in "Work In Progress". Could not read config file.(System.InvalidOperationException: There is an error in XML document (2, 2). ---> System.InvalidOperationException: <WorkflowConfiguration xmlns=''> was not expected.
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read8_WorkflowConfiguration()
--- End of inner exception stack trace ---
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle)
at System.Xml.Serialization.XmlSerializer.Deserialize(TextReader textReader)
at Leadit.SharePoint.Workflow.EventHandler.get_Configuration())

# re: Workflow Lite for SharePoint: "Value does not fall within the expected range" exception

Tuesday, June 15, 2004 10:08 PM by Jorge Ramos

Same thing here.

Unable to instantiate event handler (assembly "Leadit.SharePoint.Workflow, Version=0.2.0.0, Culture=neutral, PublicKeyToken=3948f234bbbabe18", class "Leadit.SharePoint.Workflow.EventHandler"), or report event for "Doclib1/Teste do sp2003.doc" in "Doclib1". Could not read config file.(System.InvalidOperationException: There is an error in XML document (2, 2). ---> System.InvalidOperationException: <WorkflowConfiguration xmlns=''> was not expected.
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read8_WorkflowConfiguration()
--- End of inner exception stack trace ---
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle)
at System.Xml.Serialization.XmlSerializer.Deserialize(TextReader textReader)
at Leadit.SharePoint.Workflow.EventHandler.get_Configuration())

# re: Workflow Lite for SharePoint: "Value does not fall within the expected range" exception

Wednesday, June 16, 2004 1:21 AM by Jan

Oh my god! It seems that the HTML filtered out some tags... :-( Please see the original post, it should display the corrected XML (again).

The Workflow tag should contain following namespaces:

<WorkflowConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://Leadit.SharePoint.Workflow/WorkflowConfiguration">

# re: Workflow Lite for SharePoint: "Value does not fall within the expected range" exception

Wednesday, June 16, 2004 2:23 PM by Brad

works great, Having a little trouble with the email.

# re: Workflow Lite for SharePoint: "Value does not fall within the expected range" exception

Wednesday, June 16, 2004 2:29 PM by Brad

Unable to instantiate event handler (assembly "Leadit.SharePoint.Workflow, Version=0.2.0.0, Culture=neutral, PublicKeyToken=3948f234bbbabe18", class "Leadit.SharePoint.Workflow.EventHandler"), or report event for "Work In Progress/This is work in progress.doc" in "Work In Progress". Could not execute the SENDMAIL action.(System.Web.HttpException: Could not access 'CDO.Message' object. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x80040213): The transport failed to connect to the server.

--- End of inner exception stack trace ---
at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters)
at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args)
--- End of inner exception stack trace ---
at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args)
at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
at System.Web.Mail.SmtpMail.Send(MailMessage message)
at Leadit.SharePoint.Workflow.EventHandler.HandleEvent(SPListEvent le))

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

# re: Workflow Lite for SharePoint: "Value does not fall within the expected range" exception

Wednesday, June 16, 2004 4:15 PM by Brad

please disregard. I needed to enable smtp mail relay

# re: Workflow Lite for SharePoint: "Value does not fall within the expected range" exception

Wednesday, June 16, 2004 4:39 PM by Jorge Ramos

Now working, thanks.

# Source code

Thursday, June 17, 2004 5:12 AM by Oriol

Jan,

Why don't you publish the source code?

Really nice product, keep working on it!!!

Oriol.-

# re: Workflow Lite for SharePoint: "Value does not fall within the expected range" exception

Thursday, June 17, 2004 9:57 AM by Lloyd

Great work! Trying to the SENDMAIL action working but having a little trouble. This is the message saved to the event viewer:

Unable to instantiate event handler (assembly "Leadit.SharePoint.Workflow, Version=0.2.0.0, Culture=neutral, PublicKeyToken=3948f234bbbabe18", class "Leadit.SharePoint.Workflow.EventHandler"), or report event for "In Review/Full page fax print.pdf" in "In Review". Could not execute the SENDMAIL action.(System.Web.HttpException: Could not access 'CDO.Message' object. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x8004020D): At least one of the From or Sender fields is required, and neither was found.

I have specified a From email address in the format name@company.com.

Lloyd

# re: Workflow Lite for SharePoint: "Value does not fall within the expected range" exception

Thursday, June 17, 2004 9:59 AM by Lloyd

>I have specified a From email address in the format name@company.com.

Sorry, this is incorrect. I've specified the "To" email address like: <Parameter1>name@company.com</Parameter1>. I don't know what user it is using as the Sender. I gess Workflow Lite takes care of that?

# re: Workflow Lite for SharePoint: "Value does not fall within the expected range" exception

Thursday, June 17, 2004 11:05 AM by Jan

Lloyd, could you verify that the account you are using to run the workflow (the one specified in the machine.config), has an email address in SharePoint?

# re: Workflow Lite for SharePoint: "Value does not fall within the expected range" exception

Thursday, June 17, 2004 12:46 PM by Lloyd

Thanks Jan, that solved it. Is there a particular reason why the workflow user is being used as the sender rather than the "Modified By" user?

# re: Workflow Lite for SharePoint: "Value does not fall within the expected range" exception

Thursday, June 17, 2004 12:51 PM by Jan

Yes, it was a design choice. It's easier to enforce that that service account has an email, than each user.

# Unable to instantiate event handler (assembly "hp.com.sps.workflow, Version=1.0.1640.29541, Culture=neutral, PublicKeyToken=713d478d171cb5ac", class "hp.com.sps.workflow.documentsEvent"), or report event for "Shared Documents/debu

Monday, June 28, 2004 9:49 AM by Balaji Vemugadda

could you please tell the solution for this.

# re: Workflow Lite for SharePoint: Copy Doc From site to Portal Area

Tuesday, July 27, 2004 1:27 PM by Dave Lowe

Great work, exactly what SharePoint Needed!!
Now for the Question, can it be used to send docs from subsite to a Portal Area? It works fine with doc libs within same area or site

# re: Workflow Lite for SharePoint: "Value does not fall within the expected range" exception

Wednesday, July 28, 2004 8:14 AM by Jan

Dave, this feature will become available in the next version.

# re: Workflow Lite for SharePoint: "Value does not fall within the expected range" exception

Wednesday, May 24, 2006 11:07 PM by bleh1298

Hi guys!

I can't seem to make it work v RC1C work. I deleted all the action types and only used DELETESOURCE but it doesn't work. Anybody has the same problem? I don't think the config.xml I edited is being accessed..How can I know if it is being used or not.

Pls help!
Thanks!

# re: Workflow Lite for SharePoint: "Value does not fall within the expected range" exception

Tuesday, May 30, 2006 12:41 AM by Andy

Check the event viewer? I found the error logs that in the Application section will show you what's working and what isn't. Also you might want to ensure that you have added the assembly items into the advance settings of your doclib.

I had that happen to me and since it didn't register any errors in the event logs I realised my mistake.

# re: Workflow Lite for SharePoint: "Value does not fall within the expected range" exception

Tuesday, August 01, 2006 5:56 AM by nishant

I have just downloaded and installed the RC1c version. All the Installation steps were performed successfully. But i'm unable to see any new columns like Status, comments etc in my library. Nothing in the event logs too. Infact, it doesn't seem to have any effect on the site. Can you please let me know what may be the problem? Thanks.

# re: Workflow Lite for SharePoint: "Value does not fall within the expected range" exception

Tuesday, October 17, 2006 6:24 AM by Imran Rehmani

Can any one please tell me where to get the Leadit.SharePoint.Workflow.dll from, it isn't in the installation package....

# re: Workflow Lite for SharePoint: "Value does not fall within the expected range" exception

Wednesday, October 25, 2006 12:37 PM by Chris Shelton

I've been working to get this running,  and now I finally did.  here are some stuff I had luck with,  and a few questions for problems I still have.

The new columns (status, comments) must be added by you to the document library.

If you want to extract the files ,  you can run the command -

msiexec -a <leadit-msi-file>

which will create network install,  but in the resulting directory you get all the files from the install and do the manual install steps from the readme.

To test if the XML file is getting run or not, just put some random text at the top,  and then try to run the event.  If it was run, you'll see an error in your application event log about an invalid XML file.

----

I'm having some trouble copying docs between libs.  It just keeps telling me my "In Review" folder does not exist.

Is there any more explicit documenation for the actions and what the parameter fields are supposed to be?  I can tell mostly from the config file, but is there any other examples not in the default config file?

Thanks.  Great looking workflow tool, and free to boot.  Too bad it won't likely be updated with MOSS 2007 supposed to include many of these features out of the box.