The [//Request/RequestParameter] lookup for a SystemEvent request will resolve to request parameters in the parent request.

This commit is contained in:
Nilesh Ghodekar 2016-03-20 18:53:34 +00:00
Родитель 1b242c69bf
Коммит 656c46be88
4 изменённых файлов: 40 добавлений и 5 удалений

Просмотреть файл

@ -8,6 +8,14 @@ All notable changes to MIMWAL project will be documented in this file. The "Unre
------------
### Version 2.16.0320.0
#### Changed
* The `[//Request/RequestParameter]` lookup for a SystemEvent request will resolve to request parameters in the parent request.
------------
### Version 2.16.0315.0
#### Added

Просмотреть файл

@ -22,7 +22,7 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary
/// Build Number (MMDD)
/// Revision (if any on the same day)
/// </summary>
internal const string Version = "2.16.0315.0";
internal const string Version = "2.16.0320.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.16.0315.0";
internal const string FileVersion = "2.16.0320.0";
}
}

Просмотреть файл

@ -344,7 +344,7 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common
/// <typeparam name="T">Type of the object to be deserialized</typeparam>
/// <param name="xml">Serialized representation of the specified type</param>
/// <returns>The Object being deserialized.</returns>
private static T DeserializeObject<T>(string xml)
internal static T DeserializeObject<T>(string xml)
where T : class
{
T t;

Просмотреть файл

@ -760,7 +760,7 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Component
this.ReadResources = this.resources[this.resourceKey];
this.ReadAttributes = this.reads[this.resourceKey].ToArray();
Logger.Instance.WriteVerbose(EventIdentifier.ResolveLookupsForEachReadChildInitialized, "ResourceKey: '{0}'. Read Attributes: '{1}'.", e.InstanceData, string.Join(",", this.ReadAttributes));
Logger.Instance.WriteVerbose(EventIdentifier.ResolveLookupsForEachReadChildInitialized, "ResourceKey: '{0}'. Read Attributes: '{1}'.", e.InstanceData, string.Join(",", this.ReadAttributes));
}
}
finally
@ -813,7 +813,34 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Component
foreach (string attribute in this.reads[this.resourceKey].Where(attribute => read.Resource[attribute] != null))
{
this.Publish(string.Format(CultureInfo.InvariantCulture, "{0}/{1}", this.resourceKey, attribute), read.Resource[attribute]);
// If the request is SystemEvent, RequestParameter of Request is published from the parent request.
if (this.resourceKey.Equals(LookupParameter.Request.ToString()) && this.Request.CurrentRequest.Operation == OperationType.SystemEvent && attribute == "RequestParameter")
{
RequestType parentRequest = this.ReadParentRequest.Resource as RequestType;
if (parentRequest != null)
{
IList<string> parentRequestParameters = parentRequest.RequestParameters;
List<string> requestParameters = new List<string>();
if (parentRequestParameters.Count != 0)
{
foreach (string s in parentRequestParameters)
{
RequestParameter parentRequestParameter = ExpressionFunction.DeserializeObject<RequestParameter>(s);
if (parentRequestParameter.Target == this.Request.CurrentRequest.Target)
{
requestParameters.Add(s);
}
}
this.Publish(string.Format(CultureInfo.InvariantCulture, "{0}/{1}", LookupParameter.Request.ToString(), attribute), requestParameters);
}
}
}
else
{
this.Publish(string.Format(CultureInfo.InvariantCulture, "{0}/{1}", this.resourceKey, attribute), read.Resource[attribute]);
}
}
}
finally