Use Interfaces with DotNet-SDK

Hey guys,

I’m new to the party and trying to implement a use case using DotNet.
I looked through the examples in DotNet and other languages but could find a solution to seperate the workflow definition from the actual implementation like e.g. in Java.

Am I missing something? Is there a way to ship only the abstract workflow definition (RunMethod, Signals, Updates and Queries to all relevant parties) and not the actual implementation and their dependencies like activities which depend on database or other services?

thank you and best regards,
Peter

From GitHub - temporalio/sdk-dotnet: Temporal .NET SDK

Interfaces and abstract methods can have these attributes. This is helpful for defining a workflow implemented elsewhere. But if/when implemented, all pieces of the implementation should have the attributes too.

Java forces this separation, .NET simply allows it if wanted, but we don’t have an explicit sample showing just this. Can look at our ActivityWorker sample which shows calling a Go workflow from a .NET client and therefore had to represent the Go workflow as a .NET interface. And here is the actual test in our SDK asserting the functionality.

Thank you for the really quick response!

I was able to make work now like you suggested.

Best regards,
Peter