Skip to content

Ensure uniqueness of workflows by instance Id #5746

Closed Answered by rosca-sabina
rosca-sabina asked this question in Q&A
Discussion options

You must be logged in to vote

You can implement interface IWorkflowActivationStrategy, and then use your custom implementation in your workflow by calling builder.WithActivationStrategyType<MyCustomActivationStrategy>() when you override method WorkflowBase.Build(IWorkflowBuilder builder).

This way, when calling IWorkflowRuntime.CanStartWorkflowAsync(string definitionId, StartWorkflowRuntimeParams? options = default), the activation strategy you configured will be used to determine whether the workflow can be started or not.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@rosca-sabina
Comment options

Answer selected by rosca-sabina
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant