diff --git a/src/scripting/Elsa.Scripting.JavaScript/Handlers/ConfigureJavaScriptEngine.cs b/src/scripting/Elsa.Scripting.JavaScript/Handlers/ConfigureJavaScriptEngine.cs index dbef88fe70..53b89acc97 100644 --- a/src/scripting/Elsa.Scripting.JavaScript/Handlers/ConfigureJavaScriptEngine.cs +++ b/src/scripting/Elsa.Scripting.JavaScript/Handlers/ConfigureJavaScriptEngine.cs @@ -3,6 +3,7 @@ using System.Dynamic; using System.Globalization; using System.Linq; +using System.Text; using System.Threading; using System.Threading.Tasks; using Elsa.Models; @@ -94,6 +95,7 @@ public async Task Handle(EvaluatingJavaScriptExpression notification, Cancellati engine.RegisterType(); engine.RegisterType(); engine.RegisterType(); + engine.RegisterType(); // Workflow variables. var variables = workflowExecutionContext.GetMergedVariables(); diff --git a/src/scripting/Elsa.Scripting.JavaScript/Typings/CommonTypeDefinitionProvider.cs b/src/scripting/Elsa.Scripting.JavaScript/Typings/CommonTypeDefinitionProvider.cs index 9475b70e78..0f895bbbcb 100644 --- a/src/scripting/Elsa.Scripting.JavaScript/Typings/CommonTypeDefinitionProvider.cs +++ b/src/scripting/Elsa.Scripting.JavaScript/Typings/CommonTypeDefinitionProvider.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Globalization; +using System.Text; using Elsa.Models; using Elsa.Scripting.JavaScript.Services; using Elsa.Services.Models; @@ -49,6 +50,7 @@ public override IEnumerable CollectTypes(TypeDefinitionContext context) => typeof(ActivityExecutionContext), typeof(WorkflowExecutionContext), typeof(WorkflowInstance), + typeof(Encoding) }; } } \ No newline at end of file