зеркало из https://github.com/microsoft/MIMWAL.git
Added design time check to the Activity Execution Condition for a Boolean function.
This commit is contained in:
Родитель
70de51c835
Коммит
ce7e60fcc9
|
@ -87,6 +87,15 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.UI {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The activity execution condition must be a boolean function. Consider wrapping your current condition inside a ConverToBoolean() function..
|
||||
/// </summary>
|
||||
internal static string ActivityExecutionConditionValidationError {
|
||||
get {
|
||||
return ResourceManager.GetString("ActivityExecutionConditionValidationError", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Actor String.
|
||||
/// </summary>
|
||||
|
|
|
@ -798,4 +798,7 @@
|
|||
<data name="RequestApprovalEscalationEmailTemplateFieldValidationError" xml:space="preserve">
|
||||
<value>Escalation email template is required when escalated approvers are specified.</value>
|
||||
</data>
|
||||
<data name="ActivityExecutionConditionValidationError" xml:space="preserve">
|
||||
<value>The activity execution condition must be a boolean function. Consider wrapping your current condition inside a ConverToBoolean() function.</value>
|
||||
</data>
|
||||
</root>
|
|
@ -289,7 +289,12 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.UI.Forms
|
|||
{
|
||||
if (!string.IsNullOrEmpty(this.activityExecutionCondition.Value))
|
||||
{
|
||||
evaluator.ParseExpression(this.activityExecutionCondition.Value);
|
||||
// Verify that the activity execution condition resolves to a Boolean value
|
||||
if (!evaluator.IsBooleanExpression(this.activityExecutionCondition.Value))
|
||||
{
|
||||
this.controller.ValidationError = ActivitySettings.ActivityExecutionConditionValidationError;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (WorkflowActivityLibraryException ex)
|
||||
|
|
|
@ -484,7 +484,12 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.UI.Forms
|
|||
{
|
||||
if (!string.IsNullOrEmpty(this.activityExecutionCondition.Value))
|
||||
{
|
||||
evaluator.ParseExpression(this.activityExecutionCondition.Value);
|
||||
// Verify that the activity execution condition resolves to a Boolean value
|
||||
if (!evaluator.IsBooleanExpression(this.activityExecutionCondition.Value))
|
||||
{
|
||||
this.controller.ValidationError = ActivitySettings.ActivityExecutionConditionValidationError;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(this.iteration.Value))
|
||||
|
|
|
@ -343,7 +343,12 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.UI.Forms
|
|||
{
|
||||
if (!string.IsNullOrEmpty(this.activityExecutionCondition.Value))
|
||||
{
|
||||
evaluator.ParseExpression(this.activityExecutionCondition.Value);
|
||||
// Verify that the activity execution condition resolves to a Boolean value
|
||||
if (!evaluator.IsBooleanExpression(this.activityExecutionCondition.Value))
|
||||
{
|
||||
this.controller.ValidationError = ActivitySettings.ActivityExecutionConditionValidationError;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(this.iteration.Value))
|
||||
|
|
|
@ -455,7 +455,12 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.UI.Forms
|
|||
{
|
||||
if (!string.IsNullOrEmpty(this.activityExecutionCondition.Value))
|
||||
{
|
||||
evaluator.ParseExpression(this.activityExecutionCondition.Value);
|
||||
// Verify that the activity execution condition resolves to a Boolean value
|
||||
if (!evaluator.IsBooleanExpression(this.activityExecutionCondition.Value))
|
||||
{
|
||||
this.controller.ValidationError = ActivitySettings.ActivityExecutionConditionValidationError;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (WorkflowActivityLibraryException ex)
|
||||
|
|
|
@ -361,7 +361,12 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.UI.Forms
|
|||
{
|
||||
if (!string.IsNullOrEmpty(this.activityExecutionCondition.Value))
|
||||
{
|
||||
evaluator.ParseExpression(this.activityExecutionCondition.Value);
|
||||
// Verify that the activity execution condition resolves to a Boolean value
|
||||
if (!evaluator.IsBooleanExpression(this.activityExecutionCondition.Value))
|
||||
{
|
||||
this.controller.ValidationError = ActivitySettings.ActivityExecutionConditionValidationError;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
ParseApprovers(this.approvers.Value);
|
||||
|
|
|
@ -526,7 +526,12 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.UI.Forms
|
|||
{
|
||||
if (!string.IsNullOrEmpty(this.activityExecutionCondition.Value))
|
||||
{
|
||||
evaluator.ParseExpression(this.activityExecutionCondition.Value);
|
||||
// Verify that the activity execution condition resolves to a Boolean value
|
||||
if (!evaluator.IsBooleanExpression(this.activityExecutionCondition.Value))
|
||||
{
|
||||
this.controller.ValidationError = ActivitySettings.ActivityExecutionConditionValidationError;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (WorkflowActivityLibraryException ex)
|
||||
|
|
|
@ -330,7 +330,12 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.UI.Forms
|
|||
{
|
||||
if (!string.IsNullOrEmpty(this.activityExecutionCondition.Value))
|
||||
{
|
||||
evaluator.ParseExpression(this.activityExecutionCondition.Value);
|
||||
// Verify that the activity execution condition resolves to a Boolean value
|
||||
if (!evaluator.IsBooleanExpression(this.activityExecutionCondition.Value))
|
||||
{
|
||||
this.controller.ValidationError = ActivitySettings.ActivityExecutionConditionValidationError;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
ParseRecipient(this.cc.Value);
|
||||
|
|
|
@ -413,7 +413,12 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.UI.Forms
|
|||
{
|
||||
if (!string.IsNullOrEmpty(this.activityExecutionCondition.Value))
|
||||
{
|
||||
evaluator.ParseExpression(this.activityExecutionCondition.Value);
|
||||
// Verify that the activity execution condition resolves to a Boolean value
|
||||
if (!evaluator.IsBooleanExpression(this.activityExecutionCondition.Value))
|
||||
{
|
||||
this.controller.ValidationError = ActivitySettings.ActivityExecutionConditionValidationError;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(this.iteration.Value))
|
||||
|
|
|
@ -411,7 +411,12 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.UI.Forms
|
|||
{
|
||||
if (!string.IsNullOrEmpty(this.activityExecutionCondition.Value))
|
||||
{
|
||||
evaluator.ParseExpression(this.activityExecutionCondition.Value);
|
||||
// Verify that the activity execution condition resolves to a Boolean value
|
||||
if (!evaluator.IsBooleanExpression(this.activityExecutionCondition.Value))
|
||||
{
|
||||
this.controller.ValidationError = ActivitySettings.ActivityExecutionConditionValidationError;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче