You can commit the changes using the methods applyChanges() or applyChangesNoAccept() in com.webMethods.caf.faces.data.task.ITaskContentProvider so you can use the method in your code to commit the changes made. The method completeTask() implicitly commits the changes.
The property to auto accept the task, can be set in the bindings view, open the view that display the task info and locate the icon with the task name in bindings, when you look the properties of the icon there is one named Auto Accept, you can bind a value of true or false to this property.
#webMethods#webMethods-BPMS#MWS-CAF-Task-Engine