I have a test work flow which is querying a database and returning a result set. This is working fine and I am able to loop through the collection and assign the variables as needed. In the loop, I am assigning a Flexi-Task with two custom branches (Complete, Pending.) In the completed branch i am attempting to Execute an update statement against the database using another Execute SQL task. Everything works as intended if I complete the FlexiTask in the browser, however, if i reply to the task email for Lazy Approval, the Flexi Task completes, but the Execute SQL errors out.
The error I am receiving is "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible." The connection string being used is the same for all Execute SQL tasks and when i print the final SQL, it executes fine directly against the database. It seems that it simply doesnt work when using Lazy Approval.
Am I missing something?
I haven't tested this scenario myself, but it almost sounds like a context issue. Are you able to access your ULS logs to see if anything more specific related to the error can be obtained?