views:

51

answers:

2

Can I specify/use an existing task list from "another" website but from same site collection to be used in my Sequential Sharepoint Workflow? I am using Visual Studio to code the workflow, and it will be deployed in /subsite, the root site already has a task list to which everyone has connected to Outlook etc...Instead of creating a new task list in /subsite and asking concerned to subscribe to this new task list...I want to use the existing one..

A: 
skyflyer
+1  A: 

I may be mistaking, but, as looking up for this information with reflector, i find there is a method SPWorkflowAssociation.SetTaskList(SPList).

Looks hopefull. But, within this this method, such thing happens:

this.EnsureListInThisWeb(list);

method definition:

private void EnsureListInThisWeb(SPList list)
{
    if ((this.m_templates != null) && (list.ParentWeb.ID != this.m_templates.ParentWeb.ID))
    {
        throw new ArgumentException(SPResource.GetString("WorkflowAssociationListNotInWeb", new object[0]));
    }
}

So it checks if list's parentweb is equal to web where workflow associations are. If not, you get the exception.

So my answer would be no, you can't have task list in another web.

Janis Veinbergs