Skip to content

Commit

Permalink
Changed - Starts-With XPath will now have behave default behaviour. T…
Browse files Browse the repository at this point in the history
…o have a backward compatible behaviour use AppConfig AppSetting GenerateUniqueValueActivity_OptimizeUniquenessKey = 'true'
  • Loading branch information
NileshGhodekar committed Jan 10, 2019
1 parent 7dc20e7 commit 401699a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
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.1110.0";
internal const string Version = "2.19.0110.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.1110.0";
internal const string FileVersion = "2.19.0110.0";
}
}
12 changes: 10 additions & 2 deletions src/WorkflowActivityLibrary/Activities/GenerateUniqueValue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,11 @@ public GenerateUniqueValue()
{
this.maxLoopCount = 512;
}

if (!bool.TryParse(ConfigurationManager.AppSettings["GenerateUniqueValueActivity_OptimizeUniquenessKey"], out this.optimizeUniquenessKey))
{
this.optimizeUniquenessKey = false;
}
}
finally
{
Expand Down Expand Up @@ -740,8 +745,11 @@ private void Prepare_ExecuteCode(object sender, EventArgs e)
{
// Find the attributes to read on potentially conflicing resources
// so that the uniqueness seed can be repositioned instead of simply incremented
// when the conflict filter XPath uses a starts-with fuction
this.SetAttributesToReadForConflictResources();
// when the conflict filter XPath uses a starts-with fuction
if (this.optimizeUniquenessKey)
{
this.SetAttributesToReadForConflictResources();
}

// Default the uniqueness key to the specified uniqueness seed,
// resolve the first value expression in the list, and use that value to resolve
Expand Down

0 comments on commit 401699a

Please sign in to comment.