Several Sharepointers notice that using the CreateTask activity alone in a Sharepoint workflow doesn’t really create a Sharepoint Task: To have the task created (in the task list) you need to have an activity that will move the workflow in waiting state ; any activity implementing the IEventActivity interface will do the job; that is the case of all sharepoint activities having name starting with “On” (OnTaskCreated, OnTaskChanged,OnTaskDeleted,…), and also the Delay activity.
The Sharepoint activities modifying the Sharepoint content database are enrolled in a transaction which is committed when the workflow persists.
The following setting in the web.config file specifies the Transaction timeout duration:
By default the value is set to 1 minute. You can increase the value to 5 minutes if you face the following error, which can happen if yoy create several hundreds of tasks :
Workflow Infrastructure 72fg High Error in persisting workflow: System.Transactions.TransactionAbortedException: The transaction has aborted. —> System.TimeoutException: Transaction Timeout — End of inner exception stack trace — at System.Transactions.TransactionStateAborted.CreateAbortingClone(InternalTransaction tx).