Skip to main content
Hi all,

I'm developing a process based on Sharepoint Workflow Integration... I start my workflow when a new item is created in associated list, my question is the follow:

is there a way to get the task item id generated in task list?

My goal is to delete task item in task list when my workflow ends using "Sharepoint List Item" event wizard.

Thanks
I resolved this problem using the workaround in the follow.

  •  I add a Datafield to my process called TaskID
  •  In my Sharepoint Workflow Integration Client, I customized the code in "- ExecuteForUser -" region:
     

    string taskIDstring = service.ModifyWorkflowAndGetTaskID(listId, listItemId, workflowInstanceId, modificationID, contextData, "");

    string taskID = taskIDstring.Split(new stringt] { "?ID=" }, StringSplitOptions.None)N1];


    K2.ProcessInstance.DataFieldsi

    "TaskID"].Value = taskID;


    Infact ModifyWorkflowAndGetTaskId returns a string like "http://<your moss server>/Lists/Tasks/DispForm.aspx?ID=12" that is the link url to the item in the Task List
    So, when I want to modify/delete the item in the task List, I have the ID to that item



 

Its a good way dude...thanks lot of help


Regards


Ankur


Reply