質問

I have successfuly saved the state machine and applied bookmarks to state machine after loading them for mutiple times.

But what happens when they reach to a final state ?

Why they are removed from persitance data store ([System.Activities.DurableInstancing].[InstancesTable]) after geting finished?

Is that normal or am I makeing a mistake in persisting finished statemachines ?

役に立ちましたか?

解決

Workflow is code. You define the logic using larger pieces, but it executes and returns a result. It is not the result itself.

Imagine you had a class that had methods you call that determines approval/denial. You would spin up that class, pass in argument values, and let the code execution determine approval/denial. What do you do after this code executes?

You wouldn't store the code of that method, that's for sure. You would store who approved, who denied, and the final result.

So you shouldn't be storing the code of the workflow but the results.

I would accomplish the goals of this workflow by creating custom Activities extending NativeActivity, using one or more workflow extensions to communicate with the outside world to send notifications about approval or denials waiting for action. Along the way I'd record who did what when my bookmarks resume execution. When the workflow completes, I record the final result as well.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top