Take the 2-minute tour ×

I have created a workflow with approval and reject process. whenever the document is approved it works fine but when rejected the process does not get rejected and the task is reassigned. I have used sequential workflow and on rejection i have used code activity to update the process and then the terminate activity. It shows as rejected but reassigns the task. Any Suggessions?

share|improve this question
Hi, did you use Visual Studio or Designer? if you used Visual Studio could you please pasta your code? –  user1211929 Nov 21 '12 at 10:33
add comment

1 Answer

up vote 0 down vote accepted

I have used Visual studio workflow. and this what happens at the rejection process.

enter code hereSPSite mySite = new SPSite(TaskDetails);
        SPWeb myweb = mySite.OpenWeb();
        if (TasksListstitle == "Request Form")
            SPList myList = myweb.Lists["Request Form"];
            SPListItem myListItem = myList.GetItemById(TaskItemID);
            myListItem["Document Status"] = "Request Rejected";
        if (TasksListstitle == "Contract Forms")
            SPList myList1 = myweb.Lists["Contract Forms"];
            SPListItem myListItem1 = myList1.GetItemById(TaskItemID);
            myListItem1["Document Status"] = "Document Rejected";


After rejection i have used terminate activity process. sometimes Its getting reassigning without getting rejected and sometimes it gets rejected and terminate activity is called. I think there might be some problem with the ID.

share|improve this answer
add comment

Your Answer


