зеркало из https://github.com/microsoft/MIMWAL.git
Merge pull request #42 from NileshGhodekar/master
Query and Iteration Support for SendEmailNotification and other misc. changes
This commit is contained in:
Коммит
8c115bf4ac
|
@ -22,7 +22,7 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary
|
|||
/// Build Number (MMDD)
|
||||
/// Revision (if any on the same day)
|
||||
/// </summary>
|
||||
internal const string Version = "2.17.0414.0";
|
||||
internal const string Version = "2.17.0716.0";
|
||||
|
||||
/// <summary>
|
||||
/// File Version information for the assembly consists of the following four values:
|
||||
|
@ -31,6 +31,6 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary
|
|||
/// Build Number (MMDD)
|
||||
/// Revision (if any on the same day)
|
||||
/// </summary>
|
||||
internal const string FileVersion = "2.17.0414.0";
|
||||
internal const string FileVersion = "2.17.0716.0";
|
||||
}
|
||||
}
|
|
@ -412,7 +412,7 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.UI {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The definitions table is null or corrupt.
|
||||
/// Looks up a localized string similar to The definitions table is corrupt..
|
||||
/// </summary>
|
||||
internal static string DefinitionsConverter_NullOrEmptyDefinitionsTableError {
|
||||
get {
|
||||
|
@ -2138,5 +2138,50 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.UI {
|
|||
return ResourceManager.GetString("VerifyResourceUniquenessHelpText", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Workflow Lookup Variables.
|
||||
/// </summary>
|
||||
internal static string WorkflowDataVariables {
|
||||
get {
|
||||
return ResourceManager.GetString("WorkflowDataVariables", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to One or more workflow lookup variable definitions are incomplete.
|
||||
/// </summary>
|
||||
internal static string WorkflowDataVariablesDefinitionValidationError {
|
||||
get {
|
||||
return ResourceManager.GetString("WorkflowDataVariablesDefinitionValidationError", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Specify the Workflow Lookup Variables to be used in the email template..
|
||||
/// </summary>
|
||||
internal static string WorkflowDataVariablesHelpText {
|
||||
get {
|
||||
return ResourceManager.GetString("WorkflowDataVariablesHelpText", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Value Expression.
|
||||
/// </summary>
|
||||
internal static string WorkflowDataVariablesLeftHeader {
|
||||
get {
|
||||
return ResourceManager.GetString("WorkflowDataVariablesLeftHeader", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Target.
|
||||
/// </summary>
|
||||
internal static string WorkflowDataVariablesRightHeader {
|
||||
get {
|
||||
return ResourceManager.GetString("WorkflowDataVariablesRightHeader", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -610,7 +610,7 @@
|
|||
<value>A Search Target XPath must be supplied.</value>
|
||||
</data>
|
||||
<data name="DefinitionsConverter_NullOrEmptyDefinitionsTableError" xml:space="preserve">
|
||||
<value>The definitions table is null or corrupt</value>
|
||||
<value>The definitions table is corrupt.</value>
|
||||
</data>
|
||||
<data name="ValueExpressionUniquenessKeyValidationError" xml:space="preserve">
|
||||
<value>Only the last value expression in the list can leverage the [//UniquenessKey] lookup.</value>
|
||||
|
@ -810,4 +810,19 @@
|
|||
<data name="PowerShellUserPasswordValidationError" xml:space="preserve">
|
||||
<value>Specify the PowerShell user password.</value>
|
||||
</data>
|
||||
<data name="WorkflowDataVariables" xml:space="preserve">
|
||||
<value>Workflow Lookup Variables</value>
|
||||
</data>
|
||||
<data name="WorkflowDataVariablesHelpText" xml:space="preserve">
|
||||
<value>Specify the Workflow Lookup Variables to be used in the email template.</value>
|
||||
</data>
|
||||
<data name="WorkflowDataVariablesLeftHeader" xml:space="preserve">
|
||||
<value>Value Expression</value>
|
||||
</data>
|
||||
<data name="WorkflowDataVariablesRightHeader" xml:space="preserve">
|
||||
<value>Target</value>
|
||||
</data>
|
||||
<data name="WorkflowDataVariablesDefinitionValidationError" xml:space="preserve">
|
||||
<value>One or more workflow lookup variable definitions are incomplete</value>
|
||||
</data>
|
||||
</root>
|
|
@ -109,8 +109,15 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.UI.Defini
|
|||
public DefinitionsConverter(Hashtable definitionsTable)
|
||||
{
|
||||
// This constructor handles a hash table which is deserialized from an activity definition's XOML
|
||||
// Throw an exception if the hashtable is null or missing the Count key which indicates how many definitions it stores
|
||||
if (definitionsTable == null || !definitionsTable.ContainsKey("Count"))
|
||||
|
||||
// Do nothing if the hashtable is null. This is to allow backward compatibility of the old Activity UI XOML when a newer version is introduced
|
||||
if (definitionsTable == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Throw an exception if the hashtable is missing the Count key which indicates how many definitions it stores
|
||||
if (definitionsTable != null && !definitionsTable.ContainsKey("Count"))
|
||||
{
|
||||
throw Logger.Instance.ReportError(new ArgumentException(ActivitySettings.DefinitionsConverter_NullOrEmptyDefinitionsTableError, "definitionsTable"));
|
||||
}
|
||||
|
|
|
@ -14,12 +14,15 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.UI.Forms
|
|||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Workflow.ComponentModel;
|
||||
using Microsoft.IdentityManagement.WebUI.Controls;
|
||||
using Microsoft.ResourceManagement.Workflow.Activities;
|
||||
using MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Activities;
|
||||
using MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common;
|
||||
using MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Enumerations;
|
||||
using MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Exceptions;
|
||||
using MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.UI;
|
||||
using MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.UI.Definitions;
|
||||
|
@ -35,6 +38,11 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.UI.Forms
|
|||
{
|
||||
#region Declarations
|
||||
|
||||
/// <summary>
|
||||
/// The regex pattern for FIM resource type and attribute validation
|
||||
/// </summary>
|
||||
private const string RegexPattern = @"^[(a-z)(A-Z)(_)(:)][(a-z)(A-Z)(0-9)(\-)(.)(_)(:)]*$";
|
||||
|
||||
/// <summary>
|
||||
/// The activity display name textbox
|
||||
/// </summary>
|
||||
|
@ -55,6 +63,26 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.UI.Forms
|
|||
/// </summary>
|
||||
private readonly ActivityFormController controller = new ActivityFormController(ActivitySettings.SendEmailNotification);
|
||||
|
||||
/// <summary>
|
||||
/// The iteration textbox
|
||||
/// </summary>
|
||||
private readonly ActivityTextBox iteration;
|
||||
|
||||
/// <summary>
|
||||
/// The queries definitions controller
|
||||
/// </summary>
|
||||
private readonly DefinitionsController queries;
|
||||
|
||||
/// <summary>
|
||||
/// The query resources checkbox
|
||||
/// </summary>
|
||||
private readonly ActivityCheckBox queryResources;
|
||||
|
||||
/// <summary>
|
||||
/// The WorkflowData variables definitions controller
|
||||
/// </summary>
|
||||
private readonly DefinitionsController workflowDataVariables;
|
||||
|
||||
/// <summary>
|
||||
/// The email template textbox
|
||||
/// </summary>
|
||||
|
@ -98,7 +126,39 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.UI.Forms
|
|||
this.advanced.CheckBoxControl.CheckedChanged += this.Advanced_CheckedChanged;
|
||||
this.advanced.CheckBoxControl.AutoPostBack = true;
|
||||
|
||||
this.queryResources = this.controller.AddCheckBox(ActivitySettings.QueryResources, ActivitySettings.QueryResourcesHelpText, false, false);
|
||||
this.queryResources.CheckBoxControl.CheckedChanged += this.QueryResources_CheckedChanged;
|
||||
this.queryResources.CheckBoxControl.AutoPostBack = true;
|
||||
|
||||
// Create a new instance of the definitions controller to capture query definitions
|
||||
// The visibility of the queries control will be governed by the Query Resources checkbox
|
||||
this.queries = new DefinitionsController("Queries", 150, 430, 0)
|
||||
{
|
||||
DisplayName = ActivitySettings.Queries,
|
||||
Description = ActivitySettings.QueriesHelpText,
|
||||
LeftHeader = ActivitySettings.QueriesLeftHeader,
|
||||
RightHeader = ActivitySettings.QueriesRightHeader
|
||||
};
|
||||
this.queries.HeaderRow.Visible = false;
|
||||
this.queries.TableRow.Visible = false;
|
||||
this.controller.ActivityControlTable.Rows.Add(this.queries.HeaderRow);
|
||||
this.controller.ActivityControlTable.Rows.Add(this.queries.TableRow);
|
||||
|
||||
this.activityExecutionCondition = this.controller.AddTextBox(ActivitySettings.ActivityExecutionCondition, ActivitySettings.ConditionHelpText, false, false);
|
||||
this.iteration = this.controller.AddTextBox(ActivitySettings.Iteration, ActivitySettings.IterationHelpText, false, false);
|
||||
|
||||
// Create a new definitions controller to capture update definitions
|
||||
this.workflowDataVariables = new DefinitionsController("Workflow Lookup Variables", 330, 250, 70)
|
||||
{
|
||||
DisplayName = ActivitySettings.WorkflowDataVariables,
|
||||
Description = ActivitySettings.WorkflowDataVariablesHelpText,
|
||||
LeftHeader = ActivitySettings.WorkflowDataVariablesLeftHeader,
|
||||
RightHeader = ActivitySettings.WorkflowDataVariablesRightHeader,
|
||||
};
|
||||
this.workflowDataVariables.HeaderRow.Visible = false;
|
||||
this.workflowDataVariables.TableRow.Visible = false;
|
||||
this.controller.ActivityControlTable.Rows.Add(this.workflowDataVariables.HeaderRow);
|
||||
this.controller.ActivityControlTable.Rows.Add(this.workflowDataVariables.TableRow);
|
||||
|
||||
this.emailTemplate = this.controller.AddTextBox(ActivitySettings.SendEmailNotificationEmailTemplate, ActivitySettings.SendEmailNotificationEmailTemplateHelpText, true, true);
|
||||
this.emailTemplate.TextBoxControl.Width = 300;
|
||||
|
@ -159,8 +219,10 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.UI.Forms
|
|||
SendEmailNotification wfa = new SendEmailNotification
|
||||
{
|
||||
ActivityDisplayName = this.activityDisplayName.Value,
|
||||
QueryResources = this.queryResources.Value,
|
||||
Advanced = this.advanced.Value,
|
||||
ActivityExecutionCondition = this.activityExecutionCondition.Value,
|
||||
Iteration = this.iteration.Value,
|
||||
EmailTemplate = this.emailTemplate.Value,
|
||||
To = this.to.Value,
|
||||
CC = this.cc.Value,
|
||||
|
@ -168,6 +230,13 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.UI.Forms
|
|||
SuppressException = this.suppressException.Value,
|
||||
};
|
||||
|
||||
// Convert the definition listings (web controls) to hash tables which can be serialized to the XOML workflow definition
|
||||
// A hash table is used due to issues with deserialization of lists and other structured data
|
||||
DefinitionsConverter queriesConverter = new DefinitionsConverter(this.queries.DefinitionListings);
|
||||
DefinitionsConverter workflowDataVariablesConverter = new DefinitionsConverter(this.workflowDataVariables.DefinitionListings);
|
||||
wfa.QueriesTable = queriesConverter.DefinitionsTable;
|
||||
wfa.WorkflowDataVariablesTable = workflowDataVariablesConverter.DefinitionsTable;
|
||||
|
||||
return wfa;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -200,13 +269,17 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.UI.Forms
|
|||
|
||||
// Set form control values based on the activity's dependency properties
|
||||
this.activityDisplayName.Value = wfa.ActivityDisplayName;
|
||||
this.queryResources.Value = wfa.QueryResources;
|
||||
this.advanced.Value = wfa.Advanced;
|
||||
this.activityExecutionCondition.Value = wfa.ActivityExecutionCondition;
|
||||
this.iteration.Value = wfa.Iteration;
|
||||
this.emailTemplate.Value = wfa.EmailTemplate;
|
||||
this.to.Value = wfa.To;
|
||||
this.cc.Value = wfa.CC;
|
||||
this.bcc.Value = wfa.Bcc;
|
||||
this.suppressException.Value = wfa.SuppressException;
|
||||
this.queries.LoadActivitySettings(wfa.QueriesTable);
|
||||
this.workflowDataVariables.LoadActivitySettings(wfa.WorkflowDataVariablesTable);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -232,6 +305,8 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.UI.Forms
|
|||
// Use the controller to persist the settings for standard activity controls
|
||||
// The definitions controller will manage persistance of associated values
|
||||
ActivitySettingsPartData data = this.controller.PersistSettings();
|
||||
data = this.queries.PersistSettings(data);
|
||||
data = this.workflowDataVariables.PersistSettings(data);
|
||||
return data;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -257,6 +332,9 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.UI.Forms
|
|||
{
|
||||
// Use the controller and definitions controller to restore settings for activity controls
|
||||
this.controller.RestoreSettings(data);
|
||||
this.queries.RestoreSettings(data);
|
||||
this.workflowDataVariables.RestoreSettings(data);
|
||||
this.ManageQueryControls();
|
||||
this.ManageAdvancedControls();
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -283,6 +361,8 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.UI.Forms
|
|||
// Use the controller to enable/disable standard activity controls
|
||||
// the definitions controller will manage the mode of associated controls
|
||||
this.controller.SwitchMode(mode);
|
||||
this.queries.SwitchMode(mode);
|
||||
this.workflowDataVariables.SwitchMode(mode);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -328,6 +408,35 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.UI.Forms
|
|||
|
||||
if (this.advanced.Value)
|
||||
{
|
||||
if (this.queryResources.Value)
|
||||
{
|
||||
// Loop through all active query listings and make sure they are valid
|
||||
foreach (DefinitionListing query in this.queries.DefinitionListings.Where(query => query.Active))
|
||||
{
|
||||
// If a value is missing for key or query, the definition
|
||||
// will be null and the listing fails validation
|
||||
if (query.Definition == null)
|
||||
{
|
||||
this.controller.ValidationError = ActivitySettings.QueryDefinitionValidationError;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Make sure that the specified query key is properly formatted
|
||||
if (!Regex.Match(query.Definition.Left, RegexPattern).Success)
|
||||
{
|
||||
this.controller.ValidationError = string.Format(CultureInfo.CurrentUICulture, ActivitySettings.QueryDefintionLeftValidationError, query.Definition.Left);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Make sure that the specified XPath filter is properly formatted
|
||||
if (!ExpressionEvaluator.IsXPath(query.Definition.Right))
|
||||
{
|
||||
this.controller.ValidationError = string.Format(CultureInfo.CurrentUICulture, ActivitySettings.QueryDefintionRightValidationError, query.Definition.Left);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(this.activityExecutionCondition.Value))
|
||||
{
|
||||
evaluator.ParseExpression(this.activityExecutionCondition.Value);
|
||||
|
@ -340,8 +449,95 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.UI.Forms
|
|||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(this.iteration.Value))
|
||||
{
|
||||
evaluator.ParseExpression(this.iteration.Value);
|
||||
}
|
||||
|
||||
ParseRecipient(this.cc.Value);
|
||||
ParseRecipient(this.bcc.Value);
|
||||
|
||||
// Loop through all active workflow data listings and make sure they are valid
|
||||
var activeListings = this.workflowDataVariables.DefinitionListings.Where(workflowDataVariable => workflowDataVariable.Active);
|
||||
var activeListingsCount = activeListings.Count();
|
||||
foreach (DefinitionListing workflowDataVariable in activeListings)
|
||||
{
|
||||
if (workflowDataVariable.Definition == null)
|
||||
{
|
||||
// Allow the listing to be null if the count is only one as it's optional in this activity
|
||||
if (activeListingsCount == 1)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// If a value is missing for source or target, the definition
|
||||
// will be null and the listing fails validation
|
||||
this.controller.ValidationError = ActivitySettings.WorkflowDataVariablesDefinitionValidationError;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Attempt to parse the source expression and target lookup or variable
|
||||
// Fail validation if an exception is thrown for either
|
||||
try
|
||||
{
|
||||
evaluator.ParseExpression(workflowDataVariable.Definition.Left);
|
||||
ParameterType targetType = ParameterType.Lookup;
|
||||
try
|
||||
{
|
||||
targetType = ExpressionEvaluator.DetermineParameterType(workflowDataVariable.Definition.Right);
|
||||
}
|
||||
catch (WorkflowActivityLibraryException)
|
||||
{
|
||||
}
|
||||
|
||||
// Target variables are valid
|
||||
// Target lookups require further evaluation to determine if they represent a valid target
|
||||
if (targetType != ParameterType.Variable)
|
||||
{
|
||||
LookupEvaluator lookup = new LookupEvaluator(workflowDataVariable.Definition.Right);
|
||||
if (!lookup.IsValidTarget)
|
||||
{
|
||||
this.controller.ValidationError = string.Format(CultureInfo.CurrentUICulture, ActivitySettings.TargetLookupValidationError, workflowDataVariable.Definition.Right);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (WorkflowActivityLibraryException ex)
|
||||
{
|
||||
this.controller.ValidationError = ex.Message;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Verify that no [//Query/...] or [//Value/...] expressions exist
|
||||
// if the query resources or iteration options are not enabled, respectively
|
||||
bool containsQueryExpressions = false;
|
||||
bool containsValueExpressions = false;
|
||||
|
||||
foreach (LookupEvaluator lookup in evaluator.LookupCache.Keys.Select(key => new LookupEvaluator(key)))
|
||||
{
|
||||
if (lookup.Parameter == LookupParameter.Queries)
|
||||
{
|
||||
containsQueryExpressions = true;
|
||||
}
|
||||
|
||||
if (lookup.Parameter == LookupParameter.Value)
|
||||
{
|
||||
containsValueExpressions = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.queryResources.Value && containsQueryExpressions)
|
||||
{
|
||||
this.controller.ValidationError = ActivitySettings.QueryResourcesValidationError;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(this.iteration.Value) && containsValueExpressions)
|
||||
{
|
||||
this.controller.ValidationError = ActivitySettings.IterationValidationError;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -388,6 +584,25 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.UI.Forms
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles the CheckedChanged event of the QueryResources control.
|
||||
/// </summary>
|
||||
/// <param name="sender">The source of the event.</param>
|
||||
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
|
||||
public void QueryResources_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
Logger.Instance.WriteMethodEntry();
|
||||
|
||||
try
|
||||
{
|
||||
this.ManageQueryControls();
|
||||
}
|
||||
finally
|
||||
{
|
||||
Logger.Instance.WriteMethodExit();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the child controls.
|
||||
/// </summary>
|
||||
|
@ -491,10 +706,41 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.UI.Forms
|
|||
|
||||
try
|
||||
{
|
||||
this.queryResources.Visible = this.advanced.Value;
|
||||
this.activityExecutionCondition.Visible = this.advanced.Value;
|
||||
this.iteration.Visible = this.advanced.Value;
|
||||
this.cc.Visible = this.advanced.Value;
|
||||
this.bcc.Visible = this.advanced.Value;
|
||||
this.suppressException.Visible = this.advanced.Value;
|
||||
this.workflowDataVariables.HeaderRow.Visible = this.advanced.Value;
|
||||
this.workflowDataVariables.TableRow.Visible = this.advanced.Value;
|
||||
if (!this.advanced.Value)
|
||||
{
|
||||
this.queries.HeaderRow.Visible = false;
|
||||
this.queries.TableRow.Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ManageQueryControls();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
Logger.Instance.WriteMethodExit();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Manages the query controls.
|
||||
/// </summary>
|
||||
private void ManageQueryControls()
|
||||
{
|
||||
Logger.Instance.WriteMethodEntry();
|
||||
|
||||
try
|
||||
{
|
||||
this.queries.HeaderRow.Visible = this.queryResources.Value;
|
||||
this.queries.TableRow.Visible = this.queryResources.Value;
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
|
|
@ -1032,6 +1032,11 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Activitie
|
|||
this.ApprovalEmailTemplateGuid, this.EscalationEmailTemplateGuid, this.ApprovalCompleteEmailTemplateGuid,
|
||||
this.ApprovalDeniedEmailTemplateGuid, this.ApprovalTimeoutEmailTemplateGuid
|
||||
};
|
||||
|
||||
Logger.Instance.WriteInfo(
|
||||
EventIdentifier.RequestApprovalTraceCreateApprovalExecuteCode,
|
||||
"Approvers: '{0}'. Threshold: '{1}'. Duration: '{2}'. Escalation: '{3}'. ApprovalEmailTemplate: '{4}'. EscalationEmailTemplate: '{5}'. ApprovalCompleteEmailTemplate: '{6}'. ApprovalDeniedEmailTemplate: '{7}'. ApprovalTimeoutEmailTemplate: '{8}'.",
|
||||
traceData);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -1047,6 +1052,7 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Activitie
|
|||
/// </summary>
|
||||
/// <param name="emailTemplate">An email template expression</param>
|
||||
/// <returns>The Guid of the specified email template expression</returns>
|
||||
[SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily", Justification = "Reviewed.")]
|
||||
private Guid GetEmailTemplateGuid(string emailTemplate)
|
||||
{
|
||||
Logger.Instance.WriteMethodEntry(EventIdentifier.RequestApprovalGetEmailTemplateGuid, "Email Template: '{0}'.", emailTemplate);
|
||||
|
@ -1091,6 +1097,7 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Activitie
|
|||
/// </summary>
|
||||
/// <param name="recipient">Guid or email address of the recipient</param>
|
||||
/// <returns>A string representation of the recipient object</returns>
|
||||
[SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily", Justification = "Reviewed.")]
|
||||
private string FormatRecipient(string recipient)
|
||||
{
|
||||
Logger.Instance.WriteMethodEntry(EventIdentifier.RequestApprovalFormatRecipient, "Recipient: '{0}'.", recipient);
|
||||
|
|
|
@ -30,12 +30,42 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Activitie
|
|||
System.Workflow.ComponentModel.ActivityBind activitybind2 = new System.Workflow.ComponentModel.ActivityBind();
|
||||
System.Workflow.ComponentModel.ActivityBind activitybind3 = new System.Workflow.ComponentModel.ActivityBind();
|
||||
System.Workflow.ComponentModel.ActivityBind activitybind4 = new System.Workflow.ComponentModel.ActivityBind();
|
||||
System.Workflow.ComponentModel.ActivityBind activitybind5 = new System.Workflow.ComponentModel.ActivityBind();
|
||||
System.Workflow.ComponentModel.ActivityBind activitybind6 = new System.Workflow.ComponentModel.ActivityBind();
|
||||
System.Workflow.ComponentModel.ActivityBind activitybind7 = new System.Workflow.ComponentModel.ActivityBind();
|
||||
System.Workflow.ComponentModel.ActivityBind activitybind8 = new System.Workflow.ComponentModel.ActivityBind();
|
||||
System.Workflow.ComponentModel.ActivityBind activitybind9 = new System.Workflow.ComponentModel.ActivityBind();
|
||||
System.Workflow.ComponentModel.ActivityBind activitybind10 = new System.Workflow.ComponentModel.ActivityBind();
|
||||
System.Workflow.ComponentModel.ActivityBind activitybind11 = new System.Workflow.ComponentModel.ActivityBind();
|
||||
System.Workflow.ComponentModel.ActivityBind activitybind12 = new System.Workflow.ComponentModel.ActivityBind();
|
||||
System.Workflow.ComponentModel.ActivityBind activitybind13 = new System.Workflow.ComponentModel.ActivityBind();
|
||||
System.Workflow.ComponentModel.ActivityBind activitybind14 = new System.Workflow.ComponentModel.ActivityBind();
|
||||
System.Workflow.ComponentModel.ActivityBind activitybind15 = new System.Workflow.ComponentModel.ActivityBind();
|
||||
System.Workflow.ComponentModel.ActivityBind activitybind16 = new System.Workflow.ComponentModel.ActivityBind();
|
||||
System.Workflow.ComponentModel.ActivityBind activitybind17 = new System.Workflow.ComponentModel.ActivityBind();
|
||||
System.Workflow.ComponentModel.ActivityBind activitybind18 = new System.Workflow.ComponentModel.ActivityBind();
|
||||
System.Workflow.ComponentModel.ActivityBind activitybind19 = new System.Workflow.ComponentModel.ActivityBind();
|
||||
System.Workflow.Activities.CodeCondition codecondition1 = new System.Workflow.Activities.CodeCondition();
|
||||
System.Workflow.Activities.CodeCondition codecondition2 = new System.Workflow.Activities.CodeCondition();
|
||||
System.Workflow.Activities.CodeCondition codecondition3 = new System.Workflow.Activities.CodeCondition();
|
||||
System.Workflow.Activities.CodeCondition codecondition4 = new System.Workflow.Activities.CodeCondition();
|
||||
System.Workflow.Activities.CodeCondition codecondition5 = new System.Workflow.Activities.CodeCondition();
|
||||
System.Workflow.ComponentModel.ActivityBind activitybind5 = new System.Workflow.ComponentModel.ActivityBind();
|
||||
System.Workflow.ComponentModel.ActivityBind activitybind20 = new System.Workflow.ComponentModel.ActivityBind();
|
||||
System.Workflow.ComponentModel.ActivityBind activitybind21 = new System.Workflow.ComponentModel.ActivityBind();
|
||||
System.Workflow.ComponentModel.ActivityBind activitybind22 = new System.Workflow.ComponentModel.ActivityBind();
|
||||
System.Workflow.ComponentModel.ActivityBind activitybind23 = new System.Workflow.ComponentModel.ActivityBind();
|
||||
System.Workflow.ComponentModel.ActivityBind activitybind24 = new System.Workflow.ComponentModel.ActivityBind();
|
||||
System.Workflow.ComponentModel.ActivityBind activitybind25 = new System.Workflow.ComponentModel.ActivityBind();
|
||||
System.Workflow.ComponentModel.ActivityBind activitybind26 = new System.Workflow.ComponentModel.ActivityBind();
|
||||
System.Workflow.ComponentModel.ActivityBind activitybind27 = new System.Workflow.ComponentModel.ActivityBind();
|
||||
System.Workflow.ComponentModel.ActivityBind activitybind28 = new System.Workflow.ComponentModel.ActivityBind();
|
||||
System.Workflow.ComponentModel.ActivityBind activitybind29 = new System.Workflow.ComponentModel.ActivityBind();
|
||||
System.Workflow.ComponentModel.ActivityBind activitybind30 = new System.Workflow.ComponentModel.ActivityBind();
|
||||
System.Workflow.ComponentModel.ActivityBind activitybind31 = new System.Workflow.ComponentModel.ActivityBind();
|
||||
System.Workflow.Activities.CodeCondition codecondition6 = new System.Workflow.Activities.CodeCondition();
|
||||
System.Workflow.Activities.CodeCondition codecondition7 = new System.Workflow.Activities.CodeCondition();
|
||||
System.Workflow.ComponentModel.ActivityBind activitybind32 = new System.Workflow.ComponentModel.ActivityBind();
|
||||
System.Workflow.ComponentModel.ActivityBind activitybind33 = new System.Workflow.ComponentModel.ActivityBind();
|
||||
this.ResolveEmailBccRecipients = new System.Workflow.Activities.CodeActivity();
|
||||
this.CheckEmailBccRecipientResources = new System.Workflow.Activities.CodeActivity();
|
||||
this.FindEmailBccRecipients = new MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.FindResources();
|
||||
|
@ -48,6 +78,7 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Activitie
|
|||
this.ResolveEmailTemplate = new System.Workflow.Activities.CodeActivity();
|
||||
this.CheckEmailTemplateResource = new System.Workflow.Activities.CodeActivity();
|
||||
this.FindEmailTemplate = new MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.FindResources();
|
||||
this.RunQueriesIterative = new MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.ResolveQueries();
|
||||
this.EmailBccIsExpression = new System.Workflow.Activities.IfElseBranchActivity();
|
||||
this.EmailBccIsXPathOrExpression = new System.Workflow.Activities.IfElseBranchActivity();
|
||||
this.EmailCcIsExpression = new System.Workflow.Activities.IfElseBranchActivity();
|
||||
|
@ -56,16 +87,26 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Activitie
|
|||
this.EmailToIsXPath = new System.Workflow.Activities.IfElseBranchActivity();
|
||||
this.EmailTemplateIsExpression = new System.Workflow.Activities.IfElseBranchActivity();
|
||||
this.EmailTemplateIsXPath = new System.Workflow.Activities.IfElseBranchActivity();
|
||||
this.QueriesDoHaveValueExpressions = new System.Workflow.Activities.IfElseBranchActivity();
|
||||
this.QueriesDoNotHaveValueExpressions = new System.Workflow.Activities.IfElseBranchActivity();
|
||||
this.SendMail = new Microsoft.ResourceManagement.Workflow.Activities.EmailNotificationActivity();
|
||||
this.PrepareSendMail = new System.Workflow.Activities.CodeActivity();
|
||||
this.TraceSendMail = new System.Workflow.Activities.CodeActivity();
|
||||
this.IfEmailBccIsXPathOrExpression = new System.Workflow.Activities.IfElseActivity();
|
||||
this.IfEmailCcIsXPathOrExpression = new System.Workflow.Activities.IfElseActivity();
|
||||
this.IfEmailToIsXPathOrExpression = new System.Workflow.Activities.IfElseActivity();
|
||||
this.IfEmailTemplateIsXPathOrExpression = new System.Workflow.Activities.IfElseActivity();
|
||||
this.ConditionSatisfied = new System.Workflow.Activities.IfElseBranchActivity();
|
||||
this.IfActivityExecutionConditionSatisfied = new System.Workflow.Activities.IfElseActivity();
|
||||
this.Update = new MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.UpdateLookups();
|
||||
this.PrepareUpdate = new System.Workflow.Activities.CodeActivity();
|
||||
this.ResolveForValue = new MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.ResolveLookups();
|
||||
this.IfQueriesHaveValueExpressions = new System.Workflow.Activities.IfElseActivity();
|
||||
this.RunQueriesOnce = new MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.ResolveQueries();
|
||||
this.ProcessMail = new System.Workflow.Activities.SequenceActivity();
|
||||
this.QueriesHaveNoValueExpressions = new System.Workflow.Activities.IfElseBranchActivity();
|
||||
this.ForEachIteration = new System.Workflow.Activities.ReplicatorActivity();
|
||||
this.PrepareIteration = new System.Workflow.Activities.CodeActivity();
|
||||
this.Resolve = new MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.ResolveLookups();
|
||||
this.ParseExpressions = new System.Workflow.Activities.CodeActivity();
|
||||
this.IfQueriesHaveNoValueExpressions = new System.Workflow.Activities.IfElseActivity();
|
||||
this.Prepare = new System.Workflow.Activities.CodeActivity();
|
||||
//
|
||||
// ResolveEmailBccRecipients
|
||||
//
|
||||
|
@ -81,13 +122,20 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Activitie
|
|||
//
|
||||
this.FindEmailBccRecipients.Attributes = null;
|
||||
this.FindEmailBccRecipients.ExcludeWorkflowTarget = false;
|
||||
this.FindEmailBccRecipients.FoundIds = null;
|
||||
activitybind1.Name = "SendEmailNotification";
|
||||
activitybind1.Path = "EmailBccRecipientsFoundIds";
|
||||
this.FindEmailBccRecipients.FoundResources = null;
|
||||
this.FindEmailBccRecipients.Name = "FindEmailBccRecipients";
|
||||
this.FindEmailBccRecipients.Value = null;
|
||||
activitybind1.Name = "SendEmailNotification";
|
||||
activitybind1.Path = "Bcc";
|
||||
this.FindEmailBccRecipients.SetBinding(MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.FindResources.XPathFilterProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind1)));
|
||||
activitybind2.Name = "SendEmailNotification";
|
||||
activitybind2.Path = "QueryResults";
|
||||
activitybind3.Name = "SendEmailNotification";
|
||||
activitybind3.Path = "Value";
|
||||
activitybind4.Name = "SendEmailNotification";
|
||||
activitybind4.Path = "Bcc";
|
||||
this.FindEmailBccRecipients.SetBinding(MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.FindResources.XPathFilterProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind4)));
|
||||
this.FindEmailBccRecipients.SetBinding(MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.FindResources.QueryResultsProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind2)));
|
||||
this.FindEmailBccRecipients.SetBinding(MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.FindResources.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind3)));
|
||||
this.FindEmailBccRecipients.SetBinding(MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.FindResources.FoundIdsProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind1)));
|
||||
//
|
||||
// ResolveEmailCcRecipients
|
||||
//
|
||||
|
@ -103,13 +151,20 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Activitie
|
|||
//
|
||||
this.FindEmailCcRecipients.Attributes = null;
|
||||
this.FindEmailCcRecipients.ExcludeWorkflowTarget = false;
|
||||
this.FindEmailCcRecipients.FoundIds = null;
|
||||
activitybind5.Name = "SendEmailNotification";
|
||||
activitybind5.Path = "EmailCcRecipientsFoundIds";
|
||||
this.FindEmailCcRecipients.FoundResources = null;
|
||||
this.FindEmailCcRecipients.Name = "FindEmailCcRecipients";
|
||||
this.FindEmailCcRecipients.Value = null;
|
||||
activitybind2.Name = "SendEmailNotification";
|
||||
activitybind2.Path = "CC";
|
||||
this.FindEmailCcRecipients.SetBinding(MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.FindResources.XPathFilterProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind2)));
|
||||
activitybind6.Name = "SendEmailNotification";
|
||||
activitybind6.Path = "QueryResults";
|
||||
activitybind7.Name = "SendEmailNotification";
|
||||
activitybind7.Path = "Value";
|
||||
activitybind8.Name = "SendEmailNotification";
|
||||
activitybind8.Path = "CC";
|
||||
this.FindEmailCcRecipients.SetBinding(MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.FindResources.XPathFilterProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind8)));
|
||||
this.FindEmailCcRecipients.SetBinding(MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.FindResources.QueryResultsProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind6)));
|
||||
this.FindEmailCcRecipients.SetBinding(MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.FindResources.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind7)));
|
||||
this.FindEmailCcRecipients.SetBinding(MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.FindResources.FoundIdsProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind5)));
|
||||
//
|
||||
// ResolveEmailToRecipients
|
||||
//
|
||||
|
@ -125,13 +180,20 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Activitie
|
|||
//
|
||||
this.FindEmailToRecipients.Attributes = null;
|
||||
this.FindEmailToRecipients.ExcludeWorkflowTarget = false;
|
||||
this.FindEmailToRecipients.FoundIds = null;
|
||||
activitybind9.Name = "SendEmailNotification";
|
||||
activitybind9.Path = "EmailToRecipientsFoundIds";
|
||||
this.FindEmailToRecipients.FoundResources = null;
|
||||
this.FindEmailToRecipients.Name = "FindEmailToRecipients";
|
||||
this.FindEmailToRecipients.Value = null;
|
||||
activitybind3.Name = "SendEmailNotification";
|
||||
activitybind3.Path = "To";
|
||||
this.FindEmailToRecipients.SetBinding(MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.FindResources.XPathFilterProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind3)));
|
||||
activitybind10.Name = "SendEmailNotification";
|
||||
activitybind10.Path = "QueryResults";
|
||||
activitybind11.Name = "SendEmailNotification";
|
||||
activitybind11.Path = "Value";
|
||||
activitybind12.Name = "SendEmailNotification";
|
||||
activitybind12.Path = "To";
|
||||
this.FindEmailToRecipients.SetBinding(MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.FindResources.XPathFilterProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind12)));
|
||||
this.FindEmailToRecipients.SetBinding(MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.FindResources.QueryResultsProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind10)));
|
||||
this.FindEmailToRecipients.SetBinding(MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.FindResources.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind11)));
|
||||
this.FindEmailToRecipients.SetBinding(MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.FindResources.FoundIdsProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind9)));
|
||||
//
|
||||
// ResolveEmailTemplate
|
||||
//
|
||||
|
@ -147,13 +209,33 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Activitie
|
|||
//
|
||||
this.FindEmailTemplate.Attributes = null;
|
||||
this.FindEmailTemplate.ExcludeWorkflowTarget = false;
|
||||
this.FindEmailTemplate.FoundIds = null;
|
||||
activitybind13.Name = "SendEmailNotification";
|
||||
activitybind13.Path = "EmailTemplateFoundIds";
|
||||
this.FindEmailTemplate.FoundResources = null;
|
||||
this.FindEmailTemplate.Name = "FindEmailTemplate";
|
||||
this.FindEmailTemplate.Value = null;
|
||||
activitybind4.Name = "SendEmailNotification";
|
||||
activitybind4.Path = "EmailTemplate";
|
||||
this.FindEmailTemplate.SetBinding(MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.FindResources.XPathFilterProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind4)));
|
||||
activitybind14.Name = "SendEmailNotification";
|
||||
activitybind14.Path = "QueryResults";
|
||||
activitybind15.Name = "SendEmailNotification";
|
||||
activitybind15.Path = "Value";
|
||||
activitybind16.Name = "SendEmailNotification";
|
||||
activitybind16.Path = "EmailTemplate";
|
||||
this.FindEmailTemplate.SetBinding(MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.FindResources.XPathFilterProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind16)));
|
||||
this.FindEmailTemplate.SetBinding(MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.FindResources.QueryResultsProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind14)));
|
||||
this.FindEmailTemplate.SetBinding(MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.FindResources.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind15)));
|
||||
this.FindEmailTemplate.SetBinding(MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.FindResources.FoundIdsProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind13)));
|
||||
//
|
||||
// RunQueriesIterative
|
||||
//
|
||||
this.RunQueriesIterative.Name = "RunQueriesIterative";
|
||||
activitybind17.Name = "SendEmailNotification";
|
||||
activitybind17.Path = "Queries";
|
||||
activitybind18.Name = "SendEmailNotification";
|
||||
activitybind18.Path = "QueryResults";
|
||||
activitybind19.Name = "SendEmailNotification";
|
||||
activitybind19.Path = "Value";
|
||||
this.RunQueriesIterative.SetBinding(MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.ResolveQueries.QueryDefinitionsProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind17)));
|
||||
this.RunQueriesIterative.SetBinding(MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.ResolveQueries.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind19)));
|
||||
this.RunQueriesIterative.SetBinding(MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.ResolveQueries.QueryResultsProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind18)));
|
||||
//
|
||||
// EmailBccIsExpression
|
||||
//
|
||||
|
@ -207,19 +289,38 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Activitie
|
|||
this.EmailTemplateIsXPath.Condition = codecondition4;
|
||||
this.EmailTemplateIsXPath.Name = "EmailTemplateIsXPath";
|
||||
//
|
||||
// QueriesDoHaveValueExpressions
|
||||
//
|
||||
this.QueriesDoHaveValueExpressions.Activities.Add(this.RunQueriesIterative);
|
||||
this.QueriesDoHaveValueExpressions.Name = "QueriesDoHaveValueExpressions";
|
||||
//
|
||||
// QueriesDoNotHaveValueExpressions
|
||||
//
|
||||
codecondition5.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.QueriesHaveNoValueExpressions_Condition);
|
||||
this.QueriesDoNotHaveValueExpressions.Condition = codecondition5;
|
||||
this.QueriesDoNotHaveValueExpressions.Name = "QueriesDoNotHaveValueExpressions";
|
||||
//
|
||||
// SendMail
|
||||
//
|
||||
this.SendMail.Bcc = null;
|
||||
this.SendMail.CC = null;
|
||||
this.SendMail.EmailTemplate = new System.Guid("00000000-0000-0000-0000-000000000000");
|
||||
activitybind20.Name = "SendEmailNotification";
|
||||
activitybind20.Path = "EmailNotificationBccRecipients";
|
||||
activitybind21.Name = "SendEmailNotification";
|
||||
activitybind21.Path = "EmailNotificationCcRecipients";
|
||||
activitybind22.Name = "SendEmailNotification";
|
||||
activitybind22.Path = "EmailTemplateGuid";
|
||||
this.SendMail.Name = "SendMail";
|
||||
this.SendMail.SuppressException = false;
|
||||
this.SendMail.To = null;
|
||||
activitybind23.Name = "SendEmailNotification";
|
||||
activitybind23.Path = "EmailNotificationToRecipients";
|
||||
this.SendMail.SetBinding(Microsoft.ResourceManagement.Workflow.Activities.EmailNotificationActivity.BccProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind20)));
|
||||
this.SendMail.SetBinding(Microsoft.ResourceManagement.Workflow.Activities.EmailNotificationActivity.CCProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind21)));
|
||||
this.SendMail.SetBinding(Microsoft.ResourceManagement.Workflow.Activities.EmailNotificationActivity.ToProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind23)));
|
||||
this.SendMail.SetBinding(Microsoft.ResourceManagement.Workflow.Activities.EmailNotificationActivity.EmailTemplateProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind22)));
|
||||
//
|
||||
// PrepareSendMail
|
||||
// TraceSendMail
|
||||
//
|
||||
this.PrepareSendMail.Name = "PrepareSendMail";
|
||||
this.PrepareSendMail.ExecuteCode += new System.EventHandler(this.PrepareSendMail_ExecuteCode);
|
||||
this.TraceSendMail.Name = "TraceSendMail";
|
||||
this.TraceSendMail.ExecuteCode += new System.EventHandler(this.TraceSendMail_ExecuteCode);
|
||||
//
|
||||
// IfEmailBccIsXPathOrExpression
|
||||
//
|
||||
|
@ -245,43 +346,122 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Activitie
|
|||
this.IfEmailTemplateIsXPathOrExpression.Activities.Add(this.EmailTemplateIsExpression);
|
||||
this.IfEmailTemplateIsXPathOrExpression.Name = "IfEmailTemplateIsXPathOrExpression";
|
||||
//
|
||||
// ConditionSatisfied
|
||||
// Update
|
||||
//
|
||||
this.ConditionSatisfied.Activities.Add(this.IfEmailTemplateIsXPathOrExpression);
|
||||
this.ConditionSatisfied.Activities.Add(this.IfEmailToIsXPathOrExpression);
|
||||
this.ConditionSatisfied.Activities.Add(this.IfEmailCcIsXPathOrExpression);
|
||||
this.ConditionSatisfied.Activities.Add(this.IfEmailBccIsXPathOrExpression);
|
||||
this.ConditionSatisfied.Activities.Add(this.PrepareSendMail);
|
||||
this.ConditionSatisfied.Activities.Add(this.SendMail);
|
||||
codecondition5.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.ActivityExecutionConditionSatisfied_Condition);
|
||||
this.ConditionSatisfied.Condition = codecondition5;
|
||||
this.ConditionSatisfied.Name = "ConditionSatisfied";
|
||||
this.Update.Actor = new System.Guid("00000000-0000-0000-0000-000000000000");
|
||||
this.Update.ApplyAuthorizationPolicy = false;
|
||||
this.Update.Name = "Update";
|
||||
activitybind24.Name = "SendEmailNotification";
|
||||
activitybind24.Path = "QueryResults";
|
||||
activitybind25.Name = "SendEmailNotification";
|
||||
activitybind25.Path = "LookupUpdates";
|
||||
activitybind26.Name = "SendEmailNotification";
|
||||
activitybind26.Path = "Value";
|
||||
this.Update.SetBinding(MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.UpdateLookups.QueryResultsProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind24)));
|
||||
this.Update.SetBinding(MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.UpdateLookups.UpdateLookupDefinitionsProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind25)));
|
||||
this.Update.SetBinding(MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.UpdateLookups.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind26)));
|
||||
//
|
||||
// IfActivityExecutionConditionSatisfied
|
||||
// PrepareUpdate
|
||||
//
|
||||
this.IfActivityExecutionConditionSatisfied.Activities.Add(this.ConditionSatisfied);
|
||||
this.IfActivityExecutionConditionSatisfied.Name = "IfActivityExecutionConditionSatisfied";
|
||||
this.PrepareUpdate.Name = "PrepareUpdate";
|
||||
this.PrepareUpdate.ExecuteCode += new System.EventHandler(this.PrepareUpdate_ExecuteCode);
|
||||
//
|
||||
// ResolveForValue
|
||||
//
|
||||
this.ResolveForValue.ComparedRequestId = new System.Guid("00000000-0000-0000-0000-000000000000");
|
||||
activitybind27.Name = "SendEmailNotification";
|
||||
activitybind27.Path = "ValueExpressions";
|
||||
this.ResolveForValue.Name = "ResolveForValue";
|
||||
activitybind28.Name = "SendEmailNotification";
|
||||
activitybind28.Path = "QueryResults";
|
||||
activitybind29.Name = "SendEmailNotification";
|
||||
activitybind29.Path = "Value";
|
||||
this.ResolveForValue.SetBinding(MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.ResolveLookups.LookupsProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind27)));
|
||||
this.ResolveForValue.SetBinding(MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.ResolveLookups.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind29)));
|
||||
this.ResolveForValue.SetBinding(MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.ResolveLookups.QueryResultsProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind28)));
|
||||
//
|
||||
// IfQueriesHaveValueExpressions
|
||||
//
|
||||
this.IfQueriesHaveValueExpressions.Activities.Add(this.QueriesDoNotHaveValueExpressions);
|
||||
this.IfQueriesHaveValueExpressions.Activities.Add(this.QueriesDoHaveValueExpressions);
|
||||
this.IfQueriesHaveValueExpressions.Name = "IfQueriesHaveValueExpressions";
|
||||
//
|
||||
// RunQueriesOnce
|
||||
//
|
||||
this.RunQueriesOnce.Name = "RunQueriesOnce";
|
||||
activitybind30.Name = "SendEmailNotification";
|
||||
activitybind30.Path = "Queries";
|
||||
activitybind31.Name = "SendEmailNotification";
|
||||
activitybind31.Path = "QueryResults";
|
||||
this.RunQueriesOnce.Value = null;
|
||||
this.RunQueriesOnce.SetBinding(MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.ResolveQueries.QueryDefinitionsProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind30)));
|
||||
this.RunQueriesOnce.SetBinding(MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.ResolveQueries.QueryResultsProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind31)));
|
||||
//
|
||||
// ProcessMail
|
||||
//
|
||||
this.ProcessMail.Activities.Add(this.IfQueriesHaveValueExpressions);
|
||||
this.ProcessMail.Activities.Add(this.ResolveForValue);
|
||||
this.ProcessMail.Activities.Add(this.PrepareUpdate);
|
||||
this.ProcessMail.Activities.Add(this.Update);
|
||||
this.ProcessMail.Activities.Add(this.IfEmailTemplateIsXPathOrExpression);
|
||||
this.ProcessMail.Activities.Add(this.IfEmailToIsXPathOrExpression);
|
||||
this.ProcessMail.Activities.Add(this.IfEmailCcIsXPathOrExpression);
|
||||
this.ProcessMail.Activities.Add(this.IfEmailBccIsXPathOrExpression);
|
||||
this.ProcessMail.Activities.Add(this.TraceSendMail);
|
||||
this.ProcessMail.Activities.Add(this.SendMail);
|
||||
this.ProcessMail.Name = "ProcessMail";
|
||||
//
|
||||
// QueriesHaveNoValueExpressions
|
||||
//
|
||||
this.QueriesHaveNoValueExpressions.Activities.Add(this.RunQueriesOnce);
|
||||
codecondition6.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.QueriesHaveNoValueExpressions_Condition);
|
||||
this.QueriesHaveNoValueExpressions.Condition = codecondition6;
|
||||
this.QueriesHaveNoValueExpressions.Name = "QueriesHaveNoValueExpressions";
|
||||
//
|
||||
// ForEachIteration
|
||||
//
|
||||
this.ForEachIteration.Activities.Add(this.ProcessMail);
|
||||
this.ForEachIteration.ExecutionType = System.Workflow.Activities.ExecutionType.Sequence;
|
||||
this.ForEachIteration.Name = "ForEachIteration";
|
||||
codecondition7.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.ForEachIteration_UntilCondition);
|
||||
this.ForEachIteration.UntilCondition = codecondition7;
|
||||
this.ForEachIteration.ChildInitialized += new System.EventHandler<System.Workflow.Activities.ReplicatorChildEventArgs>(this.ForEachIteration_ChildInitialized);
|
||||
this.ForEachIteration.ChildCompleted += new System.EventHandler<System.Workflow.Activities.ReplicatorChildEventArgs>(this.ForEachIteration_ChildCompleted);
|
||||
//
|
||||
// PrepareIteration
|
||||
//
|
||||
this.PrepareIteration.Name = "PrepareIteration";
|
||||
this.PrepareIteration.ExecuteCode += new System.EventHandler(this.PrepareIteration_ExecuteCode);
|
||||
//
|
||||
// Resolve
|
||||
//
|
||||
this.Resolve.ComparedRequestId = new System.Guid("00000000-0000-0000-0000-000000000000");
|
||||
activitybind5.Name = "SendEmailNotification";
|
||||
activitybind5.Path = "ActivityExpressionEvaluator.LookupCache";
|
||||
activitybind32.Name = "SendEmailNotification";
|
||||
activitybind32.Path = "ActivityExpressionEvaluator.LookupCache";
|
||||
this.Resolve.Name = "Resolve";
|
||||
this.Resolve.QueryResults = null;
|
||||
activitybind33.Name = "SendEmailNotification";
|
||||
activitybind33.Path = "QueryResults";
|
||||
this.Resolve.Value = null;
|
||||
this.Resolve.SetBinding(MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.ResolveLookups.LookupsProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind5)));
|
||||
this.Resolve.SetBinding(MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.ResolveLookups.LookupsProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind32)));
|
||||
this.Resolve.SetBinding(MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.ResolveLookups.QueryResultsProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind33)));
|
||||
//
|
||||
// ParseExpressions
|
||||
// IfQueriesHaveNoValueExpressions
|
||||
//
|
||||
this.ParseExpressions.Name = "ParseExpressions";
|
||||
this.ParseExpressions.ExecuteCode += new System.EventHandler(this.ParseExpressions_ExecuteCode);
|
||||
this.IfQueriesHaveNoValueExpressions.Activities.Add(this.QueriesHaveNoValueExpressions);
|
||||
this.IfQueriesHaveNoValueExpressions.Name = "IfQueriesHaveNoValueExpressions";
|
||||
//
|
||||
// Prepare
|
||||
//
|
||||
this.Prepare.Name = "Prepare";
|
||||
this.Prepare.ExecuteCode += new System.EventHandler(this.Prepare_ExecuteCode);
|
||||
//
|
||||
// SendEmailNotification
|
||||
//
|
||||
this.Activities.Add(this.ParseExpressions);
|
||||
this.Activities.Add(this.Prepare);
|
||||
this.Activities.Add(this.IfQueriesHaveNoValueExpressions);
|
||||
this.Activities.Add(this.Resolve);
|
||||
this.Activities.Add(this.IfActivityExecutionConditionSatisfied);
|
||||
this.Activities.Add(this.PrepareIteration);
|
||||
this.Activities.Add(this.ForEachIteration);
|
||||
this.Name = "SendEmailNotification";
|
||||
this.CanModifyActivities = false;
|
||||
|
||||
|
@ -289,8 +469,24 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Activitie
|
|||
|
||||
#endregion
|
||||
|
||||
private ComponentActivities.ResolveLookups ResolveLookups;
|
||||
private ComponentActivities.ResolveQueries ResolveQueries;
|
||||
private IfElseBranchActivity QueriesDoHaveValueExpressions;
|
||||
private ComponentActivities.ResolveQueries RunQueriesOnce;
|
||||
private IfElseBranchActivity QueriesHaveNoValueExpressions;
|
||||
private IfElseActivity IfQueriesHaveNoValueExpressions;
|
||||
private IfElseBranchActivity QueriesDoNotHaveValueExpressions;
|
||||
private IfElseActivity IfQueriesHaveValueExpressions;
|
||||
private ComponentActivities.ResolveLookups Resolve;
|
||||
private ComponentActivities.UpdateLookups Update;
|
||||
private CodeActivity TraceSendMail;
|
||||
private CodeActivity PrepareUpdate;
|
||||
private ComponentActivities.ResolveQueries RunQueriesIterative;
|
||||
private CodeActivity PrepareIteration;
|
||||
private ComponentActivities.ResolveLookups ResolveForValue;
|
||||
private SequenceActivity ProcessMail;
|
||||
private ReplicatorActivity ForEachIteration;
|
||||
private Microsoft.ResourceManagement.Workflow.Activities.EmailNotificationActivity SendMail;
|
||||
private CodeActivity PrepareSendMail;
|
||||
private CodeActivity ResolveEmailBccRecipients;
|
||||
private CodeActivity CheckEmailBccRecipientResources;
|
||||
private ComponentActivities.FindResources FindEmailBccRecipients;
|
||||
|
@ -309,15 +505,12 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Activitie
|
|||
private IfElseBranchActivity EmailToIsExpression;
|
||||
private IfElseBranchActivity EmailToIsXPath;
|
||||
private IfElseActivity IfEmailToIsXPathOrExpression;
|
||||
private ComponentActivities.ResolveLookups Resolve;
|
||||
private CodeActivity ResolveEmailTemplate;
|
||||
private CodeActivity CheckEmailTemplateResource;
|
||||
private IfElseBranchActivity EmailTemplateIsExpression;
|
||||
private IfElseBranchActivity EmailTemplateIsXPath;
|
||||
private IfElseActivity IfEmailTemplateIsXPathOrExpression;
|
||||
private ComponentActivities.FindResources FindEmailTemplate;
|
||||
private CodeActivity ParseExpressions;
|
||||
private IfElseBranchActivity ConditionSatisfied;
|
||||
private IfElseActivity IfActivityExecutionConditionSatisfied;
|
||||
private CodeActivity Prepare;
|
||||
}
|
||||
}
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -626,6 +626,7 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Activitie
|
|||
/// </summary>
|
||||
/// <param name="sender">The source of the event.</param>
|
||||
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
|
||||
[SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily", Justification = "Reviewed.")]
|
||||
private void PrepareDynamicGrammarResolution_ExecuteCode(object sender, EventArgs e)
|
||||
{
|
||||
Logger.Instance.WriteMethodEntry(EventIdentifier.UpdateResourcesForEachDynamicStringForResolutionInitialized);
|
||||
|
|
|
@ -1233,6 +1233,11 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common
|
|||
/// </summary>
|
||||
public const int ExpressionFunctionValueByKey = 11681;
|
||||
|
||||
/// <summary>
|
||||
/// The event identifier for ExpressionFunction DataTimeFromString events
|
||||
/// </summary>
|
||||
public const int ExpressionFunctionDateTimeFromString = 11682;
|
||||
|
||||
/// <summary>
|
||||
/// The event identifier for LookupEvaluator Constructor events
|
||||
/// </summary>
|
||||
|
@ -1278,6 +1283,11 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common
|
|||
/// </summary>
|
||||
public const int ResolveQueriesForEachQueryChildCompleted = 11904;
|
||||
|
||||
/// <summary>
|
||||
/// The event identifier for ResolveQueries ForEachQuery_Initialized events
|
||||
/// </summary>
|
||||
public const int ResolveQueriesForEachQueryInitialized = 11905;
|
||||
|
||||
/// <summary>
|
||||
/// The event identifier for UpdateLookups Constructor events
|
||||
/// </summary>
|
||||
|
@ -1529,7 +1539,7 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common
|
|||
/// <summary>
|
||||
/// The event identifier for SendEmailNotification TraceEmailProperties_ExecuteCode events
|
||||
/// </summary>
|
||||
public const int SendEmailNotificationPrepareSendMailExecuteCode = 12620;
|
||||
public const int SendEmailNotificationTraceSendMailExecuteCode = 12620;
|
||||
|
||||
/// <summary>
|
||||
/// The event identifier for SendEmailNotification IsXPath events
|
||||
|
@ -1551,6 +1561,36 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common
|
|||
/// </summary>
|
||||
public const int SendEmailNotificationGetEmailTemplateGuid = 12624;
|
||||
|
||||
/// <summary>
|
||||
/// The event identifier for SendEmailNotification PrepareIterationExecuteCode events
|
||||
/// </summary>
|
||||
public const int SendEmailNotificationPrepareIterationExecuteCode = 12625;
|
||||
|
||||
/// <summary>
|
||||
/// The event identifier for SendEmailNotification ForEachIterationChildInitialized events
|
||||
/// </summary>
|
||||
public const int SendEmailNotificationForEachIterationChildInitialized = 12626;
|
||||
|
||||
/// <summary>
|
||||
/// The event identifier for SendEmailNotification ForEachIterationChildCompleted events
|
||||
/// </summary>
|
||||
public const int SendEmailNotificationForEachIterationChildCompleted = 12627;
|
||||
|
||||
/// <summary>
|
||||
/// The event identifier for SendEmailNotification ForEachIterationUntilCondition events
|
||||
/// </summary>
|
||||
public const int SendEmailNotificationForEachIterationUntilCondition = 12628;
|
||||
|
||||
/// <summary>
|
||||
/// The event identifier for SendEmailNotification PrepareMailTemplate_ExecuteCode events
|
||||
/// </summary>
|
||||
public const int SendEmailNotificationPrepareUpdateExecuteCode = 12629;
|
||||
|
||||
/// <summary>
|
||||
/// The event identifier for SendEmailNotification QueriesHaveNoValueExpressionsCondition events
|
||||
/// </summary>
|
||||
public const int SendEmailNotificationQueriesHaveNoValueExpressionsCondition = 12630;
|
||||
|
||||
/// <summary>
|
||||
/// The event identifier for RequestApproval Constructor events
|
||||
/// </summary>
|
||||
|
@ -2993,6 +3033,31 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common
|
|||
/// </summary>
|
||||
public const int ExpressionFunctionValueByKeyInvalidSecondFunctionParameterTypeError = 41681;
|
||||
|
||||
/// <summary>
|
||||
/// The event identifier for ExpressionFunction DataTimeFromString events
|
||||
/// </summary>
|
||||
public const int ExpressionFunctionDateTimeFromStringInvalidFunctionParameterCountError = 41682;
|
||||
|
||||
/// <summary>
|
||||
/// The event identifier for ExpressionFunction DataTimeFromString events
|
||||
/// </summary>
|
||||
public const int ExpressionFunctionDateTimeFromStringNullFunctionParameterError = 41682;
|
||||
|
||||
/// <summary>
|
||||
/// The event identifier for ExpressionFunction DataTimeFromString events
|
||||
/// </summary>
|
||||
public const int ExpressionFunctionDateTimeFromStringInvalidFirstFunctionParameterTypeError = 41682;
|
||||
|
||||
/// <summary>
|
||||
/// The event identifier for ExpressionFunction DataTimeFromString events
|
||||
/// </summary>
|
||||
public const int ExpressionFunctionDateTimeFromStringInvalidSecondFunctionParameterTypeError = 41682;
|
||||
|
||||
/// <summary>
|
||||
/// The event identifier for ExpressionFunction DataTimeFromString events
|
||||
/// </summary>
|
||||
public const int ExpressionFunctionDateTimeFromStringInvalidFunctionParametersError = 41682;
|
||||
|
||||
/// <summary>
|
||||
/// The event identifier for LookupEvaluator Constructor events
|
||||
/// </summary>
|
||||
|
|
|
@ -142,7 +142,7 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common
|
|||
}
|
||||
else if (suppressValidationError)
|
||||
{
|
||||
Logger.Instance.WriteInfo(EventIdentifier.ExpressionEvaluatorDetermineParameterType, Messages.ExpressionEvaluator_ExpressionParameterTypeValidationError, parameter);
|
||||
Logger.Instance.WriteVerbose(EventIdentifier.ExpressionEvaluatorDetermineParameterType, Messages.ExpressionEvaluator_ExpressionParameterTypeValidationError, parameter);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -177,6 +177,9 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common
|
|||
case "DATETIMEFROMFILETIMEUTC":
|
||||
return this.DateTimeFromFileTimeUtc();
|
||||
|
||||
case "DATETIMEFROMSTRING":
|
||||
return this.DateTimeFromString();
|
||||
|
||||
case "DATETIMENOW":
|
||||
return this.DateTimeNow();
|
||||
|
||||
|
@ -366,7 +369,7 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common
|
|||
{
|
||||
try
|
||||
{
|
||||
paramString += Convert.ToString(parameter) + "',";
|
||||
paramString += Convert.ToString(parameter, CultureInfo.InvariantCulture) + "',";
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
@ -1252,7 +1255,7 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common
|
|||
if (this.mode != EvaluationMode.Parse)
|
||||
{
|
||||
List<string> requestParameters = new List<string>();
|
||||
List<string> valueList = new List<string>();
|
||||
List<object> valueList = new List<object>();
|
||||
|
||||
if (this.parameters[0] is string)
|
||||
{
|
||||
|
@ -1280,7 +1283,7 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common
|
|||
{
|
||||
if (updateRequestParameter.Value != null)
|
||||
{
|
||||
valueList.Add(updateRequestParameter.Value.ToString());
|
||||
valueList.Add(updateRequestParameter.Value);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1294,7 +1297,7 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common
|
|||
CreateRequestParameter createRequestParameter = (CreateRequestParameter)requestParameter;
|
||||
if (createRequestParameter.PropertyName.Equals(this.parameters[1]))
|
||||
{
|
||||
valueList.Add(createRequestParameter.Value.ToString());
|
||||
valueList.Add(createRequestParameter.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1358,7 +1361,7 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common
|
|||
if (this.mode != EvaluationMode.Parse)
|
||||
{
|
||||
List<string> requestParameters = new List<string>();
|
||||
List<string> valueList = new List<string>();
|
||||
List<object> valueList = new List<object>();
|
||||
|
||||
if (this.parameters[0] is string)
|
||||
{
|
||||
|
@ -1386,7 +1389,7 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common
|
|||
{
|
||||
if (updateRequestParameter.Value != null)
|
||||
{
|
||||
valueList.Add(updateRequestParameter.Value.ToString());
|
||||
valueList.Add(updateRequestParameter.Value);
|
||||
}
|
||||
}
|
||||
else if (updateRequestParameter.Mode == UpdateMode.Modify)
|
||||
|
@ -1401,7 +1404,7 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common
|
|||
CreateRequestParameter createRequestParameter = (CreateRequestParameter)requestParameter;
|
||||
if (createRequestParameter.PropertyName.Equals(this.parameters[1]))
|
||||
{
|
||||
valueList.Add(createRequestParameter.Value.ToString());
|
||||
valueList.Add(createRequestParameter.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1465,7 +1468,7 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common
|
|||
if (this.mode != EvaluationMode.Parse)
|
||||
{
|
||||
List<string> requestParameters = new List<string>();
|
||||
List<string> valueList = new List<string>();
|
||||
List<object> valueList = new List<object>();
|
||||
|
||||
if (this.parameters[0] is string)
|
||||
{
|
||||
|
@ -1493,7 +1496,7 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common
|
|||
{
|
||||
if (updateRequestParameter.Value != null)
|
||||
{
|
||||
valueList.Add(updateRequestParameter.Value.ToString());
|
||||
valueList.Add(updateRequestParameter.Value);
|
||||
}
|
||||
}
|
||||
else if (updateRequestParameter.Mode == UpdateMode.Modify)
|
||||
|
@ -2230,6 +2233,81 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This function is used to convert string representation of a date and time to its DateTime equivalent.
|
||||
/// If the string does not contain time zone info, it's assumed to be UTC.
|
||||
/// If the optional culture name parameter is not specified, it's assumed to be invariant culture.
|
||||
/// Function Syntax: DateTimeFromString(string:dateTime [, culture:cultureName])
|
||||
/// </summary>
|
||||
/// <returns>A DateTime equivalent to specified string. If the string is null, a null is returned.</returns>
|
||||
private object DateTimeFromString()
|
||||
{
|
||||
Logger.Instance.WriteMethodEntry(EventIdentifier.ExpressionFunctionDateTimeFromString, "Evaluation Mode: '{0}'.", this.mode);
|
||||
|
||||
try
|
||||
{
|
||||
if (this.parameters.Count < 1 && this.parameters.Count > 2)
|
||||
{
|
||||
throw Logger.Instance.ReportError(EventIdentifier.ExpressionFunctionDateTimeFromStringInvalidFunctionParameterCountError, new InvalidFunctionFormatException(Messages.ExpressionFunction_InvalidFunctionParameterCountError2, this.function, 1, 2, this.parameters.Count));
|
||||
}
|
||||
|
||||
Type parameterType = typeof(string);
|
||||
object parameter = this.parameters[0];
|
||||
if (!this.VerifyType(parameter, parameterType))
|
||||
{
|
||||
throw Logger.Instance.ReportError(EventIdentifier.ExpressionFunctionDateTimeFromStringInvalidFirstFunctionParameterTypeError, new InvalidFunctionFormatException(Messages.ExpressionFunction_InvalidFirstFunctionParameterTypeError, this.function, parameterType.Name, parameter == null ? "null" : parameter.GetType().Name));
|
||||
}
|
||||
|
||||
object result = null;
|
||||
if (this.mode != EvaluationMode.Parse)
|
||||
{
|
||||
if (this.parameters[0] == null)
|
||||
{
|
||||
result = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
var cultureInfo = CultureInfo.InvariantCulture;
|
||||
if (this.parameters.Count == 2)
|
||||
{
|
||||
try
|
||||
{
|
||||
cultureInfo = new CultureInfo(this.parameters[1] as string);
|
||||
}
|
||||
catch (ArgumentException e)
|
||||
{
|
||||
throw Logger.Instance.ReportError(EventIdentifier.ExpressionFunctionDateTimeFromStringInvalidSecondFunctionParameterTypeError, e);
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
result = DateTime.Parse(this.parameters[0] as string, cultureInfo, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal);
|
||||
}
|
||||
catch (FormatException e)
|
||||
{
|
||||
throw Logger.Instance.ReportError(EventIdentifier.ExpressionFunctionDateTimeFromStringInvalidFunctionParametersError, e);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.parameters.Count == 1)
|
||||
{
|
||||
Logger.Instance.WriteVerbose(EventIdentifier.ExpressionFunctionDateTimeFromString, "DateTimeFromString('{0}') returned '{1}'.", this.parameters[0], result);
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.Instance.WriteVerbose(EventIdentifier.ExpressionFunctionDateTimeFromString, "DateTimeFromString('{0}', '{1}') returned '{2}'.", this.parameters[0], this.parameters[1], result);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
finally
|
||||
{
|
||||
Logger.Instance.WriteMethodExit(EventIdentifier.ExpressionFunctionDateTimeFromString, "Evaluation Mode: '{0}'.", this.mode);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This function is used to get a DateTime object that is set to the current date and time on FIM server, expressed as the Coordinated Universal Time (UTC).
|
||||
/// Function Syntax: DateTimeNow()
|
||||
|
@ -4987,6 +5065,7 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common
|
|||
/// Function Syntax: CreateSqlParameter2(sqlConnectionStringConfigKey:string, parameterName:string, parameterDirection:string, parameterType:string [, parameterSize:integer, parameterValue:object])
|
||||
/// </summary>
|
||||
/// <returns>The <see cref="DbParameter" /> object.</returns>
|
||||
[SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily", Justification = "Reviewed.")]
|
||||
private DbParameter CreateSqlParameter2()
|
||||
{
|
||||
Logger.Instance.WriteMethodEntry(EventIdentifier.ExpressionFunctionCreateSqlParameter2, "Evaluation Mode: '{0}'.", this.mode);
|
||||
|
@ -5284,6 +5363,24 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common
|
|||
using (var dbConnection = factory.CreateConnection())
|
||||
{
|
||||
dbConnection.ConnectionString = connectionString;
|
||||
|
||||
if (providerName.Equals("System.Data.Odbc", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
if (connectionString.IndexOf("CONNECTION TIMEOUT=", StringComparison.OrdinalIgnoreCase) != -1)
|
||||
{
|
||||
try
|
||||
{
|
||||
var connectionTimeout = Convert.ToInt32(connectionString.ToUpperInvariant().Split(new string[] { "CONNECTION TIMEOUT=" }, StringSplitOptions.RemoveEmptyEntries)[1].Split(';')[0], CultureInfo.InvariantCulture);
|
||||
Logger.Instance.WriteVerbose(EventIdentifier.ExpressionFunctionExecuteSqlScalar, "Provider Name: '{0}'. Connection Timeout: '{1}'.", providerName, connectionTimeout);
|
||||
((OdbcConnection)dbConnection).ConnectionTimeout = connectionTimeout;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw Logger.Instance.ReportError(EventIdentifier.ExpressionFunctionExecuteSqlNonQueryNullFunctionParameterError, new InvalidFunctionFormatException(Messages.ExpressionFunction_InvalidConfigKeyConfiguration, e, this.function, "Connection Timeout"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
using (var dbCommand = factory.CreateCommand())
|
||||
{
|
||||
dbCommand.Connection = dbConnection;
|
||||
|
@ -5419,6 +5516,24 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common
|
|||
using (var dbConnection = factory.CreateConnection())
|
||||
{
|
||||
dbConnection.ConnectionString = connectionString;
|
||||
|
||||
if (providerName.Equals("System.Data.Odbc", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
if (connectionString.IndexOf("CONNECTION TIMEOUT=", StringComparison.OrdinalIgnoreCase) != -1)
|
||||
{
|
||||
try
|
||||
{
|
||||
var connectionTimeout = Convert.ToInt32(connectionString.ToUpperInvariant().Split(new string[] { "CONNECTION TIMEOUT=" }, StringSplitOptions.RemoveEmptyEntries)[1].Split(';')[0], CultureInfo.InvariantCulture);
|
||||
Logger.Instance.WriteVerbose(EventIdentifier.ExpressionFunctionExecuteSqlNonQuery, "Provider Name: '{0}'. Connection Timeout: '{1}'.", providerName, connectionTimeout);
|
||||
((OdbcConnection)dbConnection).ConnectionTimeout = connectionTimeout;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw Logger.Instance.ReportError(EventIdentifier.ExpressionFunctionExecuteSqlNonQueryNullFunctionParameterError, new InvalidFunctionFormatException(Messages.ExpressionFunction_InvalidConfigKeyConfiguration, e, this.function, "Connection Timeout"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
using (var dbCommand = factory.CreateCommand())
|
||||
{
|
||||
dbCommand.Connection = dbConnection;
|
||||
|
|
|
@ -341,6 +341,7 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Component
|
|||
/// </summary>
|
||||
/// <param name="sender">The source of the event.</param>
|
||||
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
|
||||
[SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily", Justification = "Reviewed.")]
|
||||
private void ResolveString_ExecuteCode(object sender, EventArgs e)
|
||||
{
|
||||
Logger.Instance.WriteMethodEntry(EventIdentifier.ResolveLookupStringResolveStringExecuteCode, "StringForResolution: '{0}'. Working string for resolution: '{1}'.", this.StringForResolution, this.working);
|
||||
|
|
|
@ -29,6 +29,7 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Component
|
|||
System.Collections.Generic.List<System.Guid> list_11 = new System.Collections.Generic.List<System.Guid>();
|
||||
System.Collections.Generic.List<Microsoft.ResourceManagement.WebServices.WSResourceManagement.ResourceType> list_12 = new System.Collections.Generic.List<Microsoft.ResourceManagement.WebServices.WSResourceManagement.ResourceType>();
|
||||
System.Workflow.ComponentModel.ActivityBind activitybind1 = new System.Workflow.ComponentModel.ActivityBind();
|
||||
System.Workflow.ComponentModel.ActivityBind activitybind2 = new System.Workflow.ComponentModel.ActivityBind();
|
||||
this.RunQuery = new MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.FindResources();
|
||||
this.ForEachQuery = new System.Workflow.Activities.ReplicatorActivity();
|
||||
//
|
||||
|
@ -39,9 +40,13 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Component
|
|||
this.RunQuery.FoundIds = list_11;
|
||||
this.RunQuery.FoundResources = list_12;
|
||||
this.RunQuery.Name = "RunQuery";
|
||||
this.RunQuery.XPathFilter = null;
|
||||
this.RunQuery.QueryResults = null;
|
||||
activitybind1.Name = "ResolveQueries";
|
||||
activitybind1.Path = "QueryDefinitions";
|
||||
activitybind1.Path = "Value";
|
||||
this.RunQuery.XPathFilter = null;
|
||||
this.RunQuery.SetBinding(MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.ComponentActivities.FindResources.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind1)));
|
||||
activitybind2.Name = "ResolveQueries";
|
||||
activitybind2.Path = "QueryDefinitions";
|
||||
//
|
||||
// ForEachQuery
|
||||
//
|
||||
|
@ -50,7 +55,8 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Component
|
|||
this.ForEachQuery.Name = "ForEachQuery";
|
||||
this.ForEachQuery.ChildInitialized += new System.EventHandler<System.Workflow.Activities.ReplicatorChildEventArgs>(this.ForEachQuery_ChildInitialized);
|
||||
this.ForEachQuery.ChildCompleted += new System.EventHandler<System.Workflow.Activities.ReplicatorChildEventArgs>(this.ForEachQuery_ChildCompleted);
|
||||
this.ForEachQuery.SetBinding(System.Workflow.Activities.ReplicatorActivity.InitialChildDataProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind1)));
|
||||
this.ForEachQuery.Initialized += new System.EventHandler(this.ForEachQuery_Initialized);
|
||||
this.ForEachQuery.SetBinding(System.Workflow.Activities.ReplicatorActivity.InitialChildDataProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind2)));
|
||||
//
|
||||
// ResolveQueries
|
||||
//
|
||||
|
@ -60,19 +66,17 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Component
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
private ReplicatorActivity ForEachQuery;
|
||||
|
||||
private FindResources RunQuery;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,6 +38,10 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Component
|
|||
public static DependencyProperty QueryResultsProperty =
|
||||
DependencyProperty.Register("QueryResults", typeof(Dictionary<string, List<Guid>>), typeof(ResolveQueries));
|
||||
|
||||
[SuppressMessage("Microsoft.Usage", "CA2211:NonConstantFieldsShouldNotBeVisible", Justification = "DependencyProperty")]
|
||||
public static DependencyProperty ValueProperty =
|
||||
DependencyProperty.Register("Value", typeof(object), typeof(ResolveQueries));
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
|
@ -50,11 +54,6 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Component
|
|||
try
|
||||
{
|
||||
this.InitializeComponent();
|
||||
|
||||
if (this.QueryResults == null)
|
||||
{
|
||||
this.QueryResults = new Dictionary<string, List<Guid>>(StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -104,6 +103,27 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Component
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value which should be used for [//Value/...] lookup resolution.
|
||||
/// </summary>
|
||||
[SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods", Justification = "Reviewed")]
|
||||
[Description("The value which should be used for [//Value/...] lookup resolution.")]
|
||||
[Category("Input")]
|
||||
[Browsable(true)]
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
|
||||
public object Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.GetValue(ValueProperty);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.SetValue(ValueProperty, value);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
@ -138,6 +158,26 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Component
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles the Initialized event of the ForEachQuery ReplicatorActivity.
|
||||
/// </summary>
|
||||
/// <param name="sender">The source of the event.</param>
|
||||
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
|
||||
private void ForEachQuery_Initialized(object sender, EventArgs e)
|
||||
{
|
||||
Logger.Instance.WriteMethodEntry(EventIdentifier.ResolveQueriesForEachQueryInitialized);
|
||||
|
||||
try
|
||||
{
|
||||
// initialize this afresh at the start of the processing
|
||||
this.QueryResults = new Dictionary<string, List<Guid>>(StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
finally
|
||||
{
|
||||
Logger.Instance.WriteMethodExit(EventIdentifier.ResolveQueriesForEachQueryInitialized);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles the ChildInitialized event of the ForEachQuery ReplicatorActivity.
|
||||
/// </summary>
|
||||
|
|
|
@ -45,9 +45,15 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Definitio
|
|||
/// <param name="definitionsTable">The definitions table.</param>
|
||||
public DefinitionsConverter(Hashtable definitionsTable)
|
||||
{
|
||||
// Do nothing if the hashtable is null. This is to allow backward compatibility of the old Activity UI XOML when a newer version is introduced
|
||||
if (definitionsTable == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// This constructor handles a hash table which is deserialized from an activity definition's XOML
|
||||
// Throw an exception if the hashtable is null or missing the Count key which indicates how many definitions it stores
|
||||
if (definitionsTable == null || !definitionsTable.ContainsKey("Count"))
|
||||
if (definitionsTable != null && !definitionsTable.ContainsKey("Count"))
|
||||
{
|
||||
throw Logger.Instance.ReportError(new ArgumentException(Messages.DefinitionsConverter_NullOrEmptyDefinitionsTableError, "definitionsTable"));
|
||||
}
|
||||
|
|
|
@ -88,7 +88,7 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The definitions table is null or corrupt.
|
||||
/// Looks up a localized string similar to The definitions table is corrupt..
|
||||
/// </summary>
|
||||
internal static string DefinitionsConverter_NullOrEmptyDefinitionsTableError {
|
||||
get {
|
||||
|
|
|
@ -208,7 +208,7 @@
|
|||
<value>Unable to get type '{0}' from the current assembly.</value>
|
||||
</data>
|
||||
<data name="DefinitionsConverter_NullOrEmptyDefinitionsTableError" xml:space="preserve">
|
||||
<value>The definitions table is null or corrupt</value>
|
||||
<value>The definitions table is corrupt.</value>
|
||||
</data>
|
||||
<data name="ExpressionEvaluator_ExpressionParameterTypeValidationError" xml:space="preserve">
|
||||
<value>The expression '{0}' is invalid.</value>
|
||||
|
|
Загрузка…
Ссылка в новой задаче