Issue #868 - Switched LiteralExpression & JavaScriptExpression to base
type WorkflowExpression in activities.
This commit is contained in:
parent
f1f1df1297
commit
685e256fc6
|
|
@ -5,7 +5,7 @@ using Elsa.Attributes;
|
|||
using Elsa.Expressions;
|
||||
using Elsa.Extensions;
|
||||
using Elsa.Results;
|
||||
using Elsa.Scripting.JavaScript;
|
||||
using Elsa.Scripting.JavaScript.Services;
|
||||
using Elsa.Services;
|
||||
using Elsa.Services.Models;
|
||||
|
||||
|
|
@ -24,7 +24,7 @@ namespace Elsa.Activities.ControlFlow.Activities
|
|||
[ActivityProperty(Hint = "Enter an expression that evaluates to an array of items to iterate over.")]
|
||||
public WorkflowExpression<IList> CollectionExpression
|
||||
{
|
||||
get => GetState(() => new JavaScriptExpression<IList>("[]"));
|
||||
get => GetState(() => new WorkflowExpression<IList>(JavaScriptExpressionEvaluator.SyntaxName, "[]"));
|
||||
set => SetState(value);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
using System.Threading;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Elsa.Attributes;
|
||||
using Elsa.Expressions;
|
||||
using Elsa.Extensions;
|
||||
using Elsa.Results;
|
||||
using Elsa.Scripting.JavaScript;
|
||||
using Elsa.Scripting.JavaScript.Services;
|
||||
using Elsa.Services;
|
||||
using Elsa.Services.Models;
|
||||
|
||||
|
|
@ -29,7 +29,7 @@ namespace Elsa.Activities.ControlFlow.Activities
|
|||
[ActivityProperty(Hint = "The expression to evaluate. The evaluated value will be used to switch on.")]
|
||||
public WorkflowExpression<bool> ConditionExpression
|
||||
{
|
||||
get => GetState(() => new JavaScriptExpression<bool>("true"));
|
||||
get => GetState(() => new WorkflowExpression<bool>(JavaScriptExpressionEvaluator.SyntaxName, "true"));
|
||||
set => SetState(value);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ using Elsa.Attributes;
|
|||
using Elsa.Expressions;
|
||||
using Elsa.Extensions;
|
||||
using Elsa.Results;
|
||||
using Elsa.Scripting.JavaScript;
|
||||
using Elsa.Scripting.JavaScript.Services;
|
||||
using Elsa.Services;
|
||||
using Elsa.Services.Models;
|
||||
|
||||
|
|
@ -23,7 +23,7 @@ namespace Elsa.Activities.ControlFlow.Activities
|
|||
[ActivityProperty(Hint = "Enter an expression that evaluates to a boolean value.")]
|
||||
public WorkflowExpression<bool> ConditionExpression
|
||||
{
|
||||
get => GetState(() => new JavaScriptExpression<bool>("true"));
|
||||
get => GetState(() => new WorkflowExpression<bool>(JavaScriptExpressionEvaluator.SyntaxName, "true"));
|
||||
set => SetState(value);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ namespace Elsa.Activities.Timers.Activities
|
|||
[ActivityProperty(Hint = "Specify a CRON expression. See https://crontab.guru/ for help.")]
|
||||
public WorkflowExpression<string> CronExpression
|
||||
{
|
||||
get => GetState(() => new LiteralExpression("* * * * *"));
|
||||
get => GetState(() => new WorkflowExpression<string>(LiteralEvaluator.SyntaxName, "* * * * *"));
|
||||
set => SetState(value);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ namespace Elsa.Activities.Timers.Activities
|
|||
[ActivityProperty(Hint = "An expression that evaluates to a TimeSpan value")]
|
||||
public WorkflowExpression<TimeSpan> TimeoutExpression
|
||||
{
|
||||
get => GetState(() => new LiteralExpression<TimeSpan>("00:01:00"));
|
||||
get => GetState(() => new WorkflowExpression<TimeSpan>(LiteralEvaluator.SyntaxName, "00:01:00"));
|
||||
set => SetState(value);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
using System.Threading;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Elsa.Attributes;
|
||||
using Elsa.Expressions;
|
||||
using Elsa.Extensions;
|
||||
using Elsa.Models;
|
||||
using Elsa.Results;
|
||||
using Elsa.Scripting.JavaScript;
|
||||
using Elsa.Scripting.JavaScript.Services;
|
||||
using Elsa.Services;
|
||||
using Elsa.Services.Models;
|
||||
|
||||
|
|
@ -28,7 +28,7 @@ namespace Elsa.Activities.Workflows.Activities
|
|||
[ActivityProperty(Hint = "An expression that evaluates to a dictionary to be set as the workflow's output.'")]
|
||||
public WorkflowExpression<Variables> WorkflowOutput
|
||||
{
|
||||
get => GetState(() => new JavaScriptExpression<Variables>("({})"));
|
||||
get => GetState(() => new WorkflowExpression<Variables>(JavaScriptExpressionEvaluator.SyntaxName, "({})"));
|
||||
set => SetState(value);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ using Elsa.Expressions;
|
|||
using Elsa.Extensions;
|
||||
using Elsa.Models;
|
||||
using Elsa.Results;
|
||||
using Elsa.Scripting.JavaScript;
|
||||
using Elsa.Scripting.JavaScript.Services;
|
||||
using Elsa.Services;
|
||||
using Elsa.Services.Models;
|
||||
|
||||
|
|
@ -31,7 +31,7 @@ namespace Elsa.Activities.Workflows.Activities
|
|||
[ActivityProperty(Hint = "An expression that evaluates to the activity type to use when triggering workflows.")]
|
||||
public WorkflowExpression<string> ActivityType
|
||||
{
|
||||
get => GetState(() => new LiteralExpression(""));
|
||||
get => GetState(() => new WorkflowExpression<string>(LiteralEvaluator.SyntaxName, ""));
|
||||
set => SetState(value);
|
||||
}
|
||||
|
||||
|
|
@ -40,14 +40,14 @@ namespace Elsa.Activities.Workflows.Activities
|
|||
)]
|
||||
public WorkflowExpression<Variables> Input
|
||||
{
|
||||
get => GetState(() => new JavaScriptExpression<Variables>("{}"));
|
||||
get => GetState(() => new WorkflowExpression<Variables>(JavaScriptExpressionEvaluator.SyntaxName, "{}"));
|
||||
set => SetState(value);
|
||||
}
|
||||
|
||||
[ActivityProperty(Hint = "An expression that evaluates to the correlation ID to use when triggering workflows.")]
|
||||
public WorkflowExpression<string> CorrelationId
|
||||
{
|
||||
get => GetState(() => new LiteralExpression(Guid.NewGuid().ToString()));
|
||||
get => GetState(() => new WorkflowExpression<string>(LiteralEvaluator.SyntaxName, Guid.NewGuid().ToString()));
|
||||
set => SetState(value);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue