Skip to content

Commit

Permalink
Merge pull request #63 from NileshGhodekar/master
Browse files Browse the repository at this point in the history
Version 2.18.1110.0
  • Loading branch information
NileshGhodekar authored Nov 10, 2018
2 parents 40ab606 + 7dc20e7 commit 074c47e
Show file tree
Hide file tree
Showing 14 changed files with 527 additions and 133 deletions.
109 changes: 98 additions & 11 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,25 @@ All notable changes to MIMWAL project will be documented in this file. The "Unre
* Implement Approve Request Activity.
* Support for `[//Value]` lookups in Query definitions across rest of the activities.

------------
### Version 2.18.1110.0

#### Changed

* [FormatMultivaluedList][FormatMultivaluedListFunction] now accepts all null values.
* [DateTimeAdd][DateTimeAddFunction] now accepts a null value for timespan parameter.
* [ConvertStringToGuid][ConvertStringToGuidFunction] returns Empty GUID if the input is a null/empty string.
* [ConvertFromBase64][ConvertFromBase64Function] returns null if the input is a null/empty string.
* [ConvertToBase64][ConvertToBase64Function] returns null if the input is a null/empty string.
* [ConvertToNumber][ConvertToNumberFunction] returns 0 if the input is a null/empty string.
* [SplitString][SplitStringFunction] returns null if the input is a null/empty string.
* [RemoveDuplicates][RemoveDuplicatesFunction] returns null if the input is a null list.
* [Eq][EqFunction] function will return true if one string parameter is null and other string parameter is Empty

#### Removed

* Removed validation check from RunPowerShellScript activity UI from that the PowerShell User Password is Decryptable as the code runs under the context of submitter instead of FIMService plus the code runs on the Portal Server which may not be co-located with FIMService server.

------------

### Version 2.18.0318.0
Expand Down Expand Up @@ -174,20 +193,88 @@ All notable changes to MIMWAL project will be documented in this file. The "Unre

* There are no bug fixes in this release.

[NormalizeStringFunction]: https://github.com/Microsoft/MIMWAL/wiki/NormalizeString-Function
[RunPowerShellScriptActivity]: https://github.com/Microsoft/MIMWAL/wiki/Run-PowerShell-Script-Activity
[UpdateResourcesActivity]: https://github.com/Microsoft/MIMWAL/wiki/Update-Resources-Activity
[EvaluateExpressionFunction]: https://github.com/Microsoft/MIMWAL/wiki/EvaluateExpression-Function
[FormatMultivaluedListFunction]: https://github.com/Microsoft/MIMWAL/wiki/FormatMultivaluedList-Function
[ConvertToUniqueIdentifierFunction]: https://github.com/Microsoft/MIMWAL/wiki/ConvertToUniqueIdentifier-Function
[AddFunction]: https://github.com/Microsoft/MIMWAL/wiki/Add-Function
[AfterFunction]: https://github.com/Microsoft/MIMWAL/wiki/After-Function
[AndFunction]: https://github.com/Microsoft/MIMWAL/wiki/And-Function
[BeforeFunction]: https://github.com/Microsoft/MIMWAL/wiki/Before-Function
[BitAndFunction]: https://github.com/Microsoft/MIMWAL/wiki/BitAnd-Function
[BitNotFunction]: https://github.com/Microsoft/MIMWAL/wiki/BitNot-Function
[BitOrFunction]: https://github.com/Microsoft/MIMWAL/wiki/BitOr-Function
[ConcatenateFunction]: https://github.com/Microsoft/MIMWAL/wiki/Concatenate-Function
[ConcatenateMultivaluedStringFunction]: https://github.com/Microsoft/MIMWAL/wiki/ConcatenateMultivaluedString-Function
[ContainsFunction]: https://github.com/Microsoft/MIMWAL/wiki/Contains-Function
[ConvertFromBase64Function]: https://github.com/Microsoft/MIMWAL/wiki/ConvertFromBase64-Function
[ConvertNumberToListFunction]: https://github.com/Microsoft/MIMWAL/wiki/ConvertNumberToList-Function
[ConvertSIDToStringFunction]: https://github.com/Microsoft/MIMWAL/wiki/ConvertSIDToString-Function
[ConvertStringToGUIDFunction]: https://github.com/Microsoft/MIMWAL/wiki/ConvertStringToGUID-Function
[ConvertToBase64Function]: https://github.com/Microsoft/MIMWAL/wiki/ConvertToBase64-Function
[ConvertToBooleanFunction]: https://github.com/Microsoft/MIMWAL/wiki/ConvertToBoolean-Function
[ConvertToNumberFunction]: https://github.com/Microsoft/MIMWAL/wiki/ConvertToNumber-Function
[ConvertToStringFunction]: https://github.com/Microsoft/MIMWAL/wiki/ConvertToString-Function
[ConvertToUniqueIdentifierFunction]: https://github.com/Microsoft/MIMWAL/wiki/ConvertToUniqueIdentifier-Function
[CountFunction]: https://github.com/Microsoft/MIMWAL/wiki/Count-Function
[CreateSqlParameterFunction]: https://github.com/Microsoft/MIMWAL/wiki/CreateSqlParameter-Function
[CreateSqlParameter2Function]: https://github.com/Microsoft/MIMWAL/wiki/CreateSqlParameter2-Function
[ExecuteSqlNonQueryFunction]: https://github.com/Microsoft/MIMWAL/wiki/ExecuteSqlNonQuery-Function
[ExecuteSqlScalarFunction]: https://github.com/Microsoft/MIMWAL/wiki/ExecuteSqlScalar-Function
[ValueByKeyFunction]: https://github.com/Microsoft/MIMWAL/wiki/ValueByKey-Function
[CRLFFunction]: https://github.com/Microsoft/MIMWAL/wiki/CRLF-Function
[DateTimeAddFunction]: https://github.com/Microsoft/MIMWAL/wiki/DateTimeAdd-Function
[DateTimeFormatFunction]: https://github.com/Microsoft/MIMWAL/wiki/DateTimeFormat-Function
[DateTimeFromFileTimeUTCFunction]: https://github.com/Microsoft/MIMWAL/wiki/DateTimeFromFileTimeUTC-Function
[DateTimeFromStringFunction]: https://github.com/Microsoft/MIMWAL/wiki/DateTimeFromString-Function
[ConvertNumberToListFunction]: https://github.com/Microsoft/MIMWAL/wiki/ConvertNumberToList-Function
[MultiplyFunction]: https://github.com/Microsoft/MIMWAL/wiki/Multiply-Function
[DateTimeNowFunction]: https://github.com/Microsoft/MIMWAL/wiki/DateTimeNow-Function
[DateTimeSubtractFunction]: https://github.com/Microsoft/MIMWAL/wiki/DateTimeSubtract-Function
[DateTimeToFileTimeUTCFunction]: https://github.com/Microsoft/MIMWAL/wiki/DateTimeToFileTimeUTC-Function
[DivideFunction]: https://github.com/Microsoft/MIMWAL/wiki/Divide-Function
[EqFunction]: https://github.com/Microsoft/MIMWAL/wiki/Eq-Function
[EscapeDNComponentFunction]: https://github.com/Microsoft/MIMWAL/wiki/EscapeDNComponent-Function
[EvaluateExpressionFunction]: https://github.com/Microsoft/MIMWAL/wiki/EvaluateExpression-Function
[ExecuteSqlScalarFunction]: https://github.com/Microsoft/MIMWAL/wiki/ExecuteSqlScalar-Function
[ExecuteSqlNonQueryFunction]: https://github.com/Microsoft/MIMWAL/wiki/ExecuteSqlNonQuery-Function
[FirstFunction]: https://github.com/Microsoft/MIMWAL/wiki/First-Function
[FormatMultivaluedListFunction]: https://github.com/Microsoft/MIMWAL/wiki/FormatMultivaluedList-Function
[GenerateRandomPasswordFunction]: https://github.com/Microsoft/MIMWAL/wiki/GenerateRandomPassword-Function
[GreaterThanFunction]: https://github.com/Microsoft/MIMWAL/wiki/GreaterThan-Function
[IIFFunction]: https://github.com/Microsoft/MIMWAL/wiki/IIF-Function
[InsertValuesFunction]: https://github.com/Microsoft/MIMWAL/wiki/InsertValues-Function
[IsPresentFunction]: https://github.com/Microsoft/MIMWAL/wiki/IsPresent-Function
[LastFunction]: https://github.com/Microsoft/MIMWAL/wiki/Last-Function
[LeftFunction]: https://github.com/Microsoft/MIMWAL/wiki/Left-Function
[LeftPadFunction]: https://github.com/Microsoft/MIMWAL/wiki/LeftPad-Function
[LengthFunction]: https://github.com/Microsoft/MIMWAL/wiki/Length-Function
[LessThanFunction]: https://github.com/Microsoft/MIMWAL/wiki/LessThan-Function
[LowerCaseFunction]: https://github.com/Microsoft/MIMWAL/wiki/LowerCase-Function
[LTrimFunction]: https://github.com/Microsoft/MIMWAL/wiki/LTrim-Function
[MidFunction]: https://github.com/Microsoft/MIMWAL/wiki/Mid-Function
[ModFunction]: https://github.com/Microsoft/MIMWAL/wiki/Mod-Function
[MultiplyFunction]: https://github.com/Microsoft/MIMWAL/wiki/Multiply-Function
[NormalizeStringFunction]: https://github.com/Microsoft/MIMWAL/wiki/NormalizeString-Function
[NotFunction]: https://github.com/Microsoft/MIMWAL/wiki/Not-Function
[NullFunction]: https://github.com/Microsoft/MIMWAL/wiki/Null-Function
[OrFunction]: https://github.com/Microsoft/MIMWAL/wiki/Or-Function
[ParametersContainFunction]: https://github.com/Microsoft/MIMWAL/wiki/ParametersContain-Function
[ParametersListFunction]: https://github.com/Microsoft/MIMWAL/wiki/ParametersList-Function
[ParametersTableFunction]: https://github.com/Microsoft/MIMWAL/wiki/ParametersTable-Function
[ParameterValueFunction]: https://github.com/Microsoft/MIMWAL/wiki/ParameterValue-Function
[ParameterValueAddedFunction]: https://github.com/Microsoft/MIMWAL/wiki/ParameterValueAdded-Function
[ParameterValueRemovedFunction]: https://github.com/Microsoft/MIMWAL/wiki/ParameterValueRemoved-Function
[ProperCaseFunction]: https://github.com/Microsoft/MIMWAL/wiki/ProperCase-Function
[RandomNumFunction]: https://github.com/Microsoft/MIMWAL/wiki/RandomNum-Function
[RegexMatchFunction]: https://github.com/Microsoft/MIMWAL/wiki/RegexMatch-Function
[RegexReplaceFunction]: https://github.com/Microsoft/MIMWAL/wiki/RegexReplace-Function
[RemoveDuplicatesFunction]: https://github.com/Microsoft/MIMWAL/wiki/RemoveDuplicates-Function
[RemoveValuesFunction]: https://github.com/Microsoft/MIMWAL/wiki/RemoveValues-Function
[ReplaceStringFunction]: https://github.com/Microsoft/MIMWAL/wiki/ReplaceString-Function
[RightFunction]: https://github.com/Microsoft/MIMWAL/wiki/Right-Function
[RightPadFunction]: https://github.com/Microsoft/MIMWAL/wiki/RightPad-Function
[RTrimFunction]: https://github.com/Microsoft/MIMWAL/wiki/RTrim-Function
[SortListFunction]: https://github.com/Microsoft/MIMWAL/wiki/SortList-Function
[SplitStringFunction]: https://github.com/Microsoft/MIMWAL/wiki/SplitString-Function
[SubtractFunction]: https://github.com/Microsoft/MIMWAL/wiki/Subtract-Function
[TitleCaseFunction]: https://github.com/Microsoft/MIMWAL/wiki/TitleCase-Function
[TrimFunction]: https://github.com/Microsoft/MIMWAL/wiki/Trim-Function
[UpperCaseFunction]: https://github.com/Microsoft/MIMWAL/wiki/UpperCase-Function
[ValueByIndexFunction]: https://github.com/Microsoft/MIMWAL/wiki/ValueByIndex-Function
[ValueByKeyFunction]: https://github.com/Microsoft/MIMWAL/wiki/ValueByKey-Function
[ValueTypeFunction]: https://github.com/Microsoft/MIMWAL/wiki/ValueType-Function
[WordFunction]: https://github.com/Microsoft/MIMWAL/wiki/Word-Function
[WrapXPathFilterFunction]: https://github.com/Microsoft/MIMWAL/wiki/WrapXPathFilter-Function
[MIMWalFunctionsTable]: https://github.com/Microsoft/MIMWAL/wiki/Functions-Table
4 changes: 2 additions & 2 deletions src/VersionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ internal static class VersionInfo
/// Build Number (MMDD)
/// Revision (if any on the same day)
/// </summary>
internal const string Version = "2.18.0318.0";
internal const string Version = "2.18.1110.0";

/// <summary>
/// File Version information for the assembly consists of the following four values:
Expand All @@ -31,6 +31,6 @@ internal static class VersionInfo
/// Build Number (MMDD)
/// Revision (if any on the same day)
/// </summary>
internal const string FileVersion = "2.18.0318.0";
internal const string FileVersion = "2.18.1110.0";
}
}
20 changes: 11 additions & 9 deletions src/WorkflowActivityLibrary.UI/Forms/RunPowerShellScriptForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -569,15 +569,17 @@ public override bool ValidateInputs()
return false;
}

try
{
ProtectedData.DecryptData(this.powerShellUserPassword.Value);
}
catch (WorkflowActivityLibraryException ex)
{
this.controller.ValidationError = ex.Message;
return false;
}
// Limited value in this check as the code runs under the context of submitter instead of FIMService plus
// code run on the Portal Server which may not be co-located with FIMService server.
////try
////{
//// ProtectedData.DecryptData(this.powerShellUserPassword.Value);
////}
////catch (WorkflowActivityLibraryException ex)
////{
//// this.controller.ValidationError = ex.Message;
//// return false;
////}
}

// If no errors were found, clear any validation error and return true
Expand Down
31 changes: 31 additions & 0 deletions src/WorkflowActivityLibrary/Activities/AddDelay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Activitie
#region Namespaces Declarations

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Linq;
using System.Workflow.Activities;
using System.Workflow.ComponentModel;
using MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common;
Expand Down Expand Up @@ -173,6 +175,35 @@ protected override ActivityExecutionStatus Execute(ActivityExecutionContext exec
}
}

/// <summary>
/// Determines the action taken when the activity has completed execution.
/// </summary>
/// <param name="executionContext">The execution context of the activity.</param>
protected override void OnSequenceComplete(ActivityExecutionContext executionContext)
{
Logger.Instance.WriteMethodEntry(EventIdentifier.AddDelayOnSequenceComplete);

try
{
// Clear the variable cache for the expression evaluator
// so that any variables, such as SqlParameter, not marked as serializable does not cause dehyration issues.
if (this.ActivityExpressionEvaluator != null
&& this.ActivityExpressionEvaluator.VariableCache != null
&& this.ActivityExpressionEvaluator.VariableCache.Keys != null)
{
List<string> variables = this.ActivityExpressionEvaluator.VariableCache.Keys.ToList();
foreach (string variable in variables)
{
this.ActivityExpressionEvaluator.VariableCache[variable] = null;
}
}
}
finally
{
Logger.Instance.WriteMethodExit(EventIdentifier.AddDelayOnSequenceComplete);
}
}

/// <summary>
/// Handles the ExecuteCode event of the ParseExpressions CodeActivity.
/// </summary>
Expand Down
29 changes: 29 additions & 0 deletions src/WorkflowActivityLibrary/Activities/CreateResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,35 @@ protected override ActivityExecutionStatus Execute(ActivityExecutionContext exec
}
}

/// <summary>
/// Determines the action taken when the activity has completed execution.
/// </summary>
/// <param name="executionContext">The execution context of the activity.</param>
protected override void OnSequenceComplete(ActivityExecutionContext executionContext)
{
Logger.Instance.WriteMethodEntry(EventIdentifier.CreateResourceOnSequenceComplete);

try
{
// Clear the variable cache for the expression evaluator
// so that any variables, such as SqlParameter, not marked as serializable does not cause dehyration issues.
if (this.ActivityExpressionEvaluator != null
&& this.ActivityExpressionEvaluator.VariableCache != null
&& this.ActivityExpressionEvaluator.VariableCache.Keys != null)
{
List<string> variables = this.ActivityExpressionEvaluator.VariableCache.Keys.ToList();
foreach (string variable in variables)
{
this.ActivityExpressionEvaluator.VariableCache[variable] = null;
}
}
}
finally
{
Logger.Instance.WriteMethodExit(EventIdentifier.CreateResourceOnSequenceComplete);
}
}

/// <summary>
/// Handles the ExecuteCode event of the ParseDefinitions CodeActivity.
/// </summary>
Expand Down
29 changes: 29 additions & 0 deletions src/WorkflowActivityLibrary/Activities/DeleteResources.cs
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,35 @@ protected override ActivityExecutionStatus Execute(ActivityExecutionContext exec
}
}

/// <summary>
/// Determines the action taken when the activity has completed execution.
/// </summary>
/// <param name="executionContext">The execution context of the activity.</param>
protected override void OnSequenceComplete(ActivityExecutionContext executionContext)
{
Logger.Instance.WriteMethodEntry(EventIdentifier.DeleteResourcesOnSequenceComplete);

try
{
// Clear the variable cache for the expression evaluator
// so that any variables, such as SqlParameter, not marked as serializable does not cause dehyration issues.
if (this.ActivityExpressionEvaluator != null
&& this.ActivityExpressionEvaluator.VariableCache != null
&& this.ActivityExpressionEvaluator.VariableCache.Keys != null)
{
List<string> variables = this.ActivityExpressionEvaluator.VariableCache.Keys.ToList();
foreach (string variable in variables)
{
this.ActivityExpressionEvaluator.VariableCache[variable] = null;
}
}
}
finally
{
Logger.Instance.WriteMethodExit(EventIdentifier.DeleteResourcesOnSequenceComplete);
}
}

/// <summary>
/// Handles the ExecuteCode event of the PrepareResolve CodeActivity.
/// </summary>
Expand Down
29 changes: 29 additions & 0 deletions src/WorkflowActivityLibrary/Activities/GenerateUniqueValue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,35 @@ protected override ActivityExecutionStatus Execute(ActivityExecutionContext exec
}
}

/// <summary>
/// Determines the action taken when the activity has completed execution.
/// </summary>
/// <param name="executionContext">The execution context of the activity.</param>
protected override void OnSequenceComplete(ActivityExecutionContext executionContext)
{
Logger.Instance.WriteMethodEntry(EventIdentifier.GenerateUniqueValueOnSequenceComplete);

try
{
// Clear the variable cache for the expression evaluator
// so that any variables, such as SqlParameter, not marked as serializable does not cause dehyration issues.
if (this.ActivityExpressionEvaluator != null
&& this.ActivityExpressionEvaluator.VariableCache != null
&& this.ActivityExpressionEvaluator.VariableCache.Keys != null)
{
List<string> variables = this.ActivityExpressionEvaluator.VariableCache.Keys.ToList();
foreach (string variable in variables)
{
this.ActivityExpressionEvaluator.VariableCache[variable] = null;
}
}
}
finally
{
Logger.Instance.WriteMethodExit(EventIdentifier.GenerateUniqueValueOnSequenceComplete);
}
}

/// <summary>
/// Resolves the value filter.
/// </summary>
Expand Down
Loading

0 comments on commit 074c47e

Please sign in to comment.