Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Elsa Dashboard Integration #8847


User avatar
0
maharatha created

I am trying to integrate Elsa Dshboard to my project.

I was able to intergate the Migration but somehow getting the issue while integrating the Dashboard :

https://elsa-workflows.github.io/elsa-core/docs/guides-dashboard

ComponentNotFoundException: No component for supporting the service Elsa.Dashboard.Areas.Elsa.Controllers.HomeController was found Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, Arguments arguments, IReleasePolicy policy, bool ignoreParentContext) Castle.MicroKernel.DefaultKernel.Resolve(Type service, Arguments arguments)

Any help would be highly appreciated.

Also in the start up I added :

 // Add services used for the workflows runtime.
            services.AddElsa(elsa => elsa.AddEntityFrameworkStores<PostgreSqlContext>(options =>
                options.UseNpgsql(_appConfiguration.GetConnectionString("Default"))));
            services.AddHttpActivities(options => options.Bind(_appConfiguration.GetSection("Elsa:Http")));
            services.AddEmailActivities(options => options.Bind(_appConfiguration.GetSection("Elsa:Smtp")));
            services.AddTimerActivities(options => options.Bind(_appConfiguration.GetSection("Elsa:Timers")));

Error I get

AutoMapperMappingException: Missing type map configuration or unsupported mapping. Mapping types: User -> UserLoginInfoDto DOCUHOLD.EDRMS.Authorization.Users.User -> DOCUHOLD.EDRMS.Sessions.Dto.UserLoginInfoDto


20 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    I assume you don't have access to source code of Elsa.Dashboard.Areas.Elsa.Controllers.HomeController. If so, you can register this controller in the InitializeMethod of your Web Module;

    IocManager.Register<Elsa.Dashboard.Areas.Elsa.Controllers.HomeController, Elsa.Dashboard.Areas.Elsa.Controllers.HomeController>();

    For the second problem, you can define a mapping in the CustomDtoMapper.cs

  • User Avatar
    0
    murat.yuceer created

    Hi how can i disable wrapper for dont accsess controller

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @murat.yuceer,

    Could't understand, could you explain a bit more detailed ?

    Thanks.

  • User Avatar
    0
    murat.yuceer created

    i mean for disable abp api response wrapper,

  • User Avatar
    0
    maharatha created

    This is what is happening :

    Elsa creates a MapperConfiguration and uses it to create an IMapper, which is registered with IoC. ABP also creates a MapperConfiguration and uses it to create an IMapper, which is also registered. Because the one from Elsa is registered first, anytime something resolves/injects IMapper, it receives the instance from Elsa, which does not contain any of the mapping configuration from ABP.

    Any idea or suggestion you can think of ?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    It seems like Elsa is also working on this issue https://github.com/elsa-workflows/elsa-core/issues/290. If you can share your project with [email protected], I can also try to find a solution.

    Thanks,

  • User Avatar
    0
    maharatha created

    Can you send me an email to share the link to the project , i have already shared it with Elsa to look into it ?

  • User Avatar
    0
    BobIngham created

    @maharatha, ELSA looks neat. Please keep the post updated with your progress.

  • User Avatar
    0
    murat.yuceer created

    https://github.com/elsa-workflows/elsa-core/issues/290

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @maharatha

    You can share it with [email protected].

  • User Avatar
    0
    maharatha created

    Done

  • User Avatar
    0
    ismcagdas created
    Support Team

    Thanks @maharatha,

    We will get back to you probably on Tuesday.

  • User Avatar
    0
    maharatha created

    Any updates?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @maharatha,

    Sorry, couldn't find a way to do it. We have to wait for https://github.com/elsa-workflows/elsa-core/issues/290

  • User Avatar
    0
    murat.yuceer created

    Hi, Elsa fixed automapper problem but we have new problem

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @murat.yuceer,

    Does your project use v3.1.3 of Microsoft.* NuGet packages ? Latest version of ABP uses that version, maybe Elsa is using a different version.

  • User Avatar
    0
    murat.yuceer created

    Yes i guess elsa and my project use diffirent ef core version so how we can use third party packages if them use diffirent ef core version. For example Hangfire works but i guess its not use ef core

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @murat.yuceer,

    As a temporary workaround, you can directly reference this package to your solution.

  • User Avatar
    0
    staffing created

    Hi Support,

    I think I am facing the same issue with IMapper. I am able to configure the elsa in abpbpoilerplate sample templates but when I am trying to configure this in aspnetzero then getting below error.

    MissingMethodException: Method not found: 'System.__Canon AutoMapper.IMapper.Map(System.Object)'. Elsa.Services.AutoMapperMapper.Map<TDestination>(object source)

  • User Avatar
    0
    maliming created
    Support Team

    hi @staffing

    Can you share a simple demo to me? [email protected]