using Elsa.Expressions.Models;
// ReSharper disable InconsistentNaming
namespace Elsa.Python.Models;
///
/// Provides access to activity outcomes.
///
public class OutcomeProxy
{
///
/// Gets the key of the outcomes property.
///
public static readonly object OutcomePropertiesKey = new();
///
/// Initializes a new instance of the class.
///
public OutcomeProxy(ExpressionExecutionContext expressionExecutionContext)
{
ExpressionExecutionContext = expressionExecutionContext;
}
private ExpressionExecutionContext ExpressionExecutionContext { get; }
///
/// Sets the outcome of the current activity.
///
/// The names of the outcomes.
public void Set(params string[] outcomeNames)
{
ExpressionExecutionContext.TransientProperties[OutcomePropertiesKey] = outcomeNames;
}
}