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

Elsa integration #12128


User avatar
0
[email protected] created

Hi @ismcagdas

We are using Asp.net Zero V 13.3.0 with.NET Core and Angular.

we have installed below NuGet package.

but getting this error after run application.

How can we solve this issue? Can you please check this issue as soon as possible, and can you help us integrate Elsa?

Note: - Only NuGet package. Install on the host project and execute the application without any modifications at startup.cs


41 Answer(s)
  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi

    Have you followed the instructions in the document found here?

  • User Avatar
    0
    [email protected] created

    Hi

    Have you followed the instructions in the document found here?

    we are using Asp.net core & angular .

    we added Startup.cs below code but getting below error

  • User Avatar
    0
    [email protected] created

    Hi @oguzhanagir,

    any Update.

  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi

    For UseEntityFrameworkPersistence you need to add namespace as below.

    using Elsa.Persistence.EntityFramework.Core.Extensions;
    

    You need to add the following namespaces for all methods inside the ConfigureElsa method.

    using Elsa.Persistence.EntityFramework.Core.Extensions;
    using Elsa.Persistence.EntityFramework.SqlServer;
    using Elsa;
    using Microsoft.AspNetCore.Mvc.Versioning;
    using Microsoft.AspNetCore.Routing;
    using Microsoft.AspNetCore.Mvc;
    
  • User Avatar
    0
    oguzhanagir created
    Support Team

    If your project is Angular, you can proceed from this blog post.

  • User Avatar
    0
    [email protected] created

    If your project is Angular, you can proceed from this blog post.

    I have add the following namespaces but Getting below error

    please help us to integration of Elsa. here I have changed the Namespace then getting below error

  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi cyber50.ae

    Could you update the Elsa package to version 2.14.1 and try this again?

  • User Avatar
    0
    [email protected] created

    Hi cyber50.ae

    Could you update the Elsa package to version 2.14.1 and try this again? here is my update package and below error

    Namespace use

  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi

    Make sure you have updated the package marked with a red field to 2.14.1.

  • User Avatar
    0
    [email protected] created

    Hi

    Make sure you have updated the package marked with a red field to 2.14.1.

    Issue Solved , Thank you So much.

  • User Avatar
    0
    [email protected] created

    HI @oguzhanagir but project run then issue

  • User Avatar
    0
    [email protected] created

    Hi

    Make sure you have updated the package marked with a red field to 2.14.1.

    Issue Solved , Thank you So much.

    getting below error

  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi

    Make sure you have completed all the steps in this blog post because the steps are interconnected. Have you applied the steps under the title Hiding Elsa Controllers from Swagger in this blog post? Since we do not use API versioning in ASP.NET Zero, the steps under this heading are important.

  • User Avatar
    0
    [email protected] created

    Hi

    Make sure you have completed all the steps in this blog post because the steps are interconnected. Have you applied the steps under the title Hiding Elsa Controllers from Swagger in this blog post? Since we do not use API versioning in ASP.NET Zero, the steps under this heading are important.

    yes ,I followed all the steps .Here is my Code .

    private void ConfigureElsa(IServiceCollection services) { services.AddElsa(elsa => { elsa .UseEntityFrameworkPersistence(ef => ef.UseSqlServer(_appConfiguration.GetConnectionString("Default")) ) .AddConsoleActivities() .AddHttpActivities(_appConfiguration.GetSection("Elsa").GetSection("Server").Bind) .AddQuartzTemporalActivities() .AddJavaScriptActivities() .AddWorkflowsFrom<Startup>();

          elsa.UseAutoMapper(() => { });
      }
      );
    
      // Elsa API endpoints.
      services.AddZeroElsaApiEndpoints();
      services.Configure&lt;ApiVersioningOptions&gt;(options =>
      {
          options.UseApiBehavior = false;
      });
    
      services.Configure&lt;RouteOptions&gt;(options =>
      {
          options.LowercaseUrls = false;
      });
      // For Elsa Dashboard.
      services.AddRazorPages();
    
      // Remove ABP filter and add Elsa special filter
      services.PostConfigure&lt;MvcOptions&gt;(options =>
      {
          ReplaceResultFilter(options);
      });
    

    }

    here added SwaggerDocumentFilter
    public class SwaggerDocumentFilter : IDocumentFilter { public void Apply(OpenApiDocument swaggerDoc, DocumentFilterContext context) { foreach (var path in swaggerDoc.Paths) { Console.WriteLine(path); } swaggerDoc.Paths .Where(x => x.Key.Contains("/workflow-definitions") || x.Key.Contains("/workflow-instances") || x.Key.Contains("/workflow-registry") || x.Key.Contains("/workflows/") || x.Key.Contains("/v{apiVersion}", StringComparison.InvariantCultureIgnoreCase) || x.Key.Contains("/v{version}", StringComparison.InvariantCultureIgnoreCase) ) .ToList() .ForEach(x => swaggerDoc.Paths.Remove(x.Key)); } }

    here SwaggerOperationFilter

    public class SwaggerOperationFilter : IOperationFilter { public void Apply(OpenApiOperation operation, OperationFilterContext context) { if (operation.Parameters == null) { return; }

           for (var i = 0; i &lt; operation.Parameters.Count; ++i)
           {
               var parameter = operation.Parameters[i];              
               var enumType = context?.ApiDescription?.ParameterDescriptions[i]?.ParameterDescriptor?.ParameterType;
               if (enumType == null)
               {
                   continue;
               }
    
               var schema = context.SchemaRepository.Schemas.GetOrAdd($&quot;{enumType.Name}&quot;, () =&gt;
                   context.SchemaGenerator.GenerateSchema(enumType, context.SchemaRepository)
               );
    
               parameter.Schema = schema;
           }
       }
    

    } then SwaggerEnumParameterFilter Changes if (context.ApiParameterDescription == null || context.ApiParameterDescription.Type == null) { return; } then startup swagger

    only Backend changes Done not angular Side

  • User Avatar
    0
    [email protected] created

    Hi

    Make sure you have completed all the steps in this blog post because the steps are interconnected. Have you applied the steps under the title Hiding Elsa Controllers from Swagger in this blog post? Since we do not use API versioning in ASP.NET Zero, the steps under this heading are important.

    Any update please.

  • User Avatar
    0
    m.aliozkaya created
    Support Team

    Hi @[email protected],

    Could you check on this project? https://github.com/aspnetzero/aspnet-zero-samples/tree/master/ElsaAngularDemo

    If you are unable to get it to work, please share your project with us. [email protected]

  • User Avatar
    0
    [email protected] created

    Hi @[email protected],

    Could you check on this project? https://github.com/aspnetzero/aspnet-zero-samples/tree/master/ElsaAngularDemo

    If you are unable to get it to work, please share your project with us. [email protected]

    not access can you please provide access to me. I will send my GitHub details on [email protected].

  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi

    After logging in with the user who has the plan on the aspnetzero.com website, clicking the manage button under the Account button, you can give permission to the github user you are trying to log in from the Github Members tab on the relevant page.

  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi

    You need to write your Github username in this section. Email is not accepted.

  • User Avatar
    0
    [email protected] created

    HI @oguzhanagir ,

    We followed all the Step for Elsa integration same As below git hub project https://github.com/aspnetzero/aspnet-zero-samples/tree/master/ElsaAngularDemo

    but the problem remains the same, with only one alteration present. We are utilizing 2.14.1, while your project uses version 2.12 of Elsa.

    getting below error

  • User Avatar
    0
    [email protected] created

    HI @oguzhanagir ,

    We have resolved the backend issue, but we are now facing the following problem:

    please help as soon as possible.

  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi

    Did you write the script and style files in angular.json under the Adding NPM Packages heading in the blog post?

    And have you added this package to your project @elsa-workflows/elsa-workflows-studio?

  • User Avatar
    0
    [email protected] created

    Hi

    Did you write the script and style files in angular.json under the Adding NPM Packages heading in the blog post?

    And have you added this package to your project @elsa-workflows/elsa-workflows-studio?

    yes, below is my code

    angular.json

  • User Avatar
    0
    [email protected] created

    Hi @oguzhanagir ,

    Any update.

  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi

    Could you please send your project to [email protected] to reproduce the issue?

    Before sending the project to us, can you create minify in the project with this command npm run create-dynamic-bundles as shown in this document? If the problem persists, you can send your project to us so that we can help you more easily.