eg call ConfigureElsa in MyCompanyName.MyProjectName.IdentityService.HttpApi.Host
then you can use IWorkflowInvoker in MyCompanyName.MyProjectName.IdentityService.Application
Please check the dependencies between your modules.
hi
Your ConfigureElsa in the MicroServiceDemoWebModule
and MicroServiceDemoWebModule depends on ProductServiceWebModule that's the way you can inject the IWorkflowInvoker
but the application doesn't call ConfigureElsa
hi
Configure<Microsoft.AspNetCore.Mvc.JsonOptions>(options =>
{
options.JsonSerializerOptions.Converters.Add(new UpdateProfileDtoConverter());
});
using System;
using System.Linq;
using System.Text.Json;
using System.Text.Json.Serialization;
using Volo.Abp.Account;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
namespace Acs.Cts.Portal;
public class UpdateProfileDtoConverter : JsonConverter<UpdateProfileDto>, ITransientDependency
{
private JsonSerializerOptions _readJsonSerializerOptions;
private JsonSerializerOptions _writeJsonSerializerOptions;
public override UpdateProfileDto Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
_readJsonSerializerOptions ??= JsonSerializerOptionsHelper.Create(options, this);
var rootElement = JsonDocument.ParseValue(ref reader).RootElement;
var obj = rootElement.Deserialize<UpdateProfileDto>(_readJsonSerializerOptions);
var extraProperties = rootElement.EnumerateObject().Where(x => x.Name.StartsWith("extraProperties[", StringComparison.OrdinalIgnoreCase)).ToList();
foreach (var extraProperty in extraProperties)
{
var x = extraProperty.Name.IndexOf("[", StringComparison.InvariantCultureIgnoreCase);
var y = extraProperty.Name.Length - 2 - x;
if (x <= 0 || y <= 0)
{
continue;
}
var key = extraProperty.Name.Substring(x + 1, y);
var value = extraProperty.Value.GetString();
obj.SetProperty(key, value);
}
return obj;
}
public override void Write(Utf8JsonWriter writer, UpdateProfileDto value, JsonSerializerOptions options)
{
_writeJsonSerializerOptions ??= JsonSerializerOptionsHelper.Create(options, this);
JsonSerializer.Serialize(writer, value, value.GetType(), _writeJsonSerializerOptions);
}
}
hi viswajwalith
Please share a simple project I can check whenever trying to inject in AppService/Controller, We are getting ActivatorChain error.
We may not have released this patch yet.
https://github.com/volosoft/volo/pull/9916
hi
I think you need set up the API clients.
Please see
https://docs.abp.io/en/abp/latest/API/Dynamic-CSharp-API-Clients https://docs.abp.io/en/abp/latest/API/Static-CSharp-API-Clients
ok
I will test this in MS project.