开发者

Can we use the task list from "another" web site of same site collection as task list for Sharepoint Workflow?

Can I specify/use an existing task list from "another" website but f开发者_高级运维rom 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..


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜