Some fixes to the Typescript definition generator

This commit is contained in:
axeleron007 2021-09-14 09:29:27 +03:00
parent 14c7582a32
commit df1145bc72
3 changed files with 3 additions and 5 deletions

View file

@ -97,6 +97,7 @@ export class ElsaWorkflowPropertiesPanel {
}
async onExecuteWorkflowClick() {
debugger
this.testActivityMessageReceived.emit(null);
const elsaClient = this.createClient();
await elsaClient.workflowsApi.test(this.workflowDefinition.definitionId, this.workflowDefinition.version, this.signalRConnectionId);

View file

@ -1,6 +1,4 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using System.Text;
@ -10,7 +8,6 @@ using Elsa.Scripting.JavaScript.Events;
using Elsa.Services;
using Elsa.Services.Models;
using MediatR;
using Microsoft.Extensions.Configuration;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
@ -139,7 +136,7 @@ namespace Elsa.Scripting.JavaScript.Handlers
if (schemaProperty == null || schemaProperty.Expressions.Count == 0)
return null;
var json = schemaProperty.Expressions["Json"];
var json = schemaProperty.Expressions.FirstOrDefault().Value;
if (json == null)
return null;

View file

@ -39,7 +39,7 @@ namespace Elsa.Scripting.JavaScript.Services
var schemaProperty = activity.Properties.FirstOrDefault(x => x.Name == "Schema");
if (schemaProperty == null || schemaProperty.Expressions.Count == 0) continue;
var json = schemaProperty.Expressions["Json"];
var json = schemaProperty.Expressions.FirstOrDefault().Value;
if (json == null) continue;
if (string.IsNullOrWhiteSpace(json)) continue;