Problem using CreateTaskWithContentType

I recieve an error when try to set the ContentTypeId to other than 0x010801 (0x01080100D09BD90EFB3244a194C27F1CBD6D525C).

I'm able to use this contenttype when it is set as defalut in workflow.xml (TaskListContentTypeId)

Exception from wss workflow infrastructure:

System.Reflection.TargetInvocationException:--->

System.ArgumentException: "Value is not from expected range"

or

System.NullReferenceException

.....

Microsoft.SharePoint.SPContentTypeId..ctor(String id) in Microsoft.SharePoint.Workflow.SPWinOETaskService.CreateTaskWithContentType(Guid taskId, SPWorkflowTaskProperties properties, String taskContentTypeId, HybridDictionary specialPermissions).

Any idea how to resolve the problem



Answer this question

Problem using CreateTaskWithContentType

  • Tyrael Tong

    Hi,

    I am having the same problem, only I'm not even getting an error message, my workflow just reports an error.

    I've tried debugging, but I can't seem to step through the point of failure.

    Anyone have any suggestions

    -Woody


  • Zapp

    Also, your content type ID looks wrong.

    I think you need to be using
    0x01080100D09BD90EFB3244a10094C27F1CBD6D525C with 00 seperating the parent content type from the child. Is the content type itself working ok

  • Anarchy

    Have you associated your content type with the task list I was having a similar problem until I did that.

    Robert Bogue has a good post on the subject here: http://thorprojects.com/blog/archive/2007/01/24/635.aspx


  • Mike3983

    Hi

    My id is separated as follows 0x01080100D09BD90EFB3244a194C27F1CBD6D525C

    I'll check the Robert Bogue post you sent, think it may be helpfull.

    For now I'm using another machine to develop my contenttype workflow without presented problem.


  • Problem using CreateTaskWithContentType