Should I use InfoPath forms for every task in my SharePoint workflow?
Can InfoPath forms be used in a SharePoint workflow for all but one of the workflow tasks? Our client wants a particular task to use the default sharepoint page to edit that list item, but disabling the form I used for this task only makes the default Task0_FormURN workflow defined inside workflow.xml. If I am convinced that this definition is empty or does not exist, I just get an error. It seems to me that if you want to use InfoPath forms, you have to struggle with every task.
source to share
You're right. You cannot mix issue forms and custom Infopath pages in the same workflow.
You can try to create a task in a workflow using custom code.
var newTask = list.Items.Add(someUrl, SPFileSystemObjectType.File, someTitle);
newTask["AssignedTo"] = new SPFieldUserValueCollection(new SPFieldUserValue(web, id, name));
newTask["StartDate"] = DateTime.Now;
newTask["Body"] = "task body";
newTask.Update();
In this case, your workflow will not "watch" the changes to tasks. I am assuming that you will be monitoring workflow changes with an activity OnWorkflowItemChanged
.
hope this helps
source to share