serverlessworkflow / sdk-net

.NET SDK for Serverless Workflow
Apache License 2.0
54 stars 15 forks source link

Some services are not able to be constructed #47

Closed Flex-Xuan closed 2 months ago

Flex-Xuan commented 8 months ago

What happened: After inject the serverless workflow, the application cannot run successfully

How to reproduce it:

Install the Serverlessworkflow.0.8.7 , then image

cdavernas commented 8 months ago

Thanks for reporting! I'll have a look!

Flex-Xuan commented 8 months ago

Thanks for reporting! I'll have a look!

It seems there is no place to 'inject' those state definitions , so when the service collection resolve the validator, the definitions can not be resolved.

If I try to manually register those definitions, this issue seems gone. But I still don't know why

image

cdavernas commented 8 months ago

I think there's an artefact being carried over from my last refactor. I'll check it out this afternoon.

Flex-Xuan commented 8 months ago

I think there's an artefact being carried over from my last refactor. I'll check it out this afternoon.

Another thing I found is when I using ODataConventionModelBuilder to get the EdmModel, it will throw exceptions likes bellow,

image

This seems that the Definition implemented both IMetadata and IExtensible, if I comment Metadata out, this issue gone. is there any solution on this?

Thanks a lot.

Flex-Xuan commented 8 months ago

I think there's an artefact being carried over from my last refactor. I'll check it out this afternoon.

Another thing I found is when I using ODataConventionModelBuilder to get the EdmModel, it will throw exceptions likes bellow,

image

This seems that the Definition implemented both IMetadata and IExtensible, if I comment Metadata out, this issue gone. is there any solution on this?

Thanks a lot.

I think the type 'DynamicMapping' doesn't need to implement IDictionary<String,Object>, because it already contains an property with type IDictionary<String,Object>, and it is public get, so those Add, ContainsKey, etc methods already exposed. I don't know if I am right or not.

Flex-Xuan commented 8 months ago

I am curious that, for example FunctionReference Definition in the spec, it doesn't has 'additional properties', but in the sdk why it implemented IExtensible, also?

cdavernas commented 8 months ago

@Flex-Xuan Sorry for the delay, I have a lot on my plate! Extensible and metadata are two different things. The first is used by eventual extensions of the spec to add new properties and features, whereas the metadata provides additional properties to describe the object, and is serdes as its own property instead of being merged at top level. So far, only metadata was supported, both for description and as a supposed mechanism for extending some specific components. This was, imho, not enough, and felt to be a kinduv trick. If you want to know more about said extensions, please don't hesitate to join weeklies, so that we can showcase extension merge patches, for instance. I guess the doc about those will make it to 0.9