Workflow Foundation ExternalDataExchange Queued and Transactional Messages?

In WF, I recently worked with some messages based on ExternalDataExchange. My understanding is that when working with long-running workflows (in this case, State Machine), communication is queued, long-lasting and transactional.

I use SQL Persistence and EventArgs, which is marked as "WaitForIdle = true".

I would suggest that when I do something like this:

using(TransactionScope scope = new TransactionScope())
{
     IMyEDEService service = wfRuntime.GetService<IMyEDEService>()
     service.MyMethod(wfInstanceGuid, "Here some data");
     DoSomeDatabaseWork();
} //Dispose causes scope to rollback

I expect my event will not fire in the workflow. It seems like it really delivered, so it makes me think that it is not transactional. You can see how the data transferred to the database in DoSomeDatabaseWork () rolls back, but the workflow moving forward can be bad.

- , , , ?

, :

  • , , , , , ( SQL-).

- -

  1. , , . , . , , , .
+3
1

. -, SQL, , ... , .

- - , , , , - " " - .

, , , , , .

, "MyMethod" try/catch. - , ... " " EDES.

, , , WF, , .

, , API . , , , , .

, , EDES, , ().

9 10, , , WF , , , , , , , .

+2

Source: https://habr.com/ru/post/1706196/


All Articles