...
Code Block |
---|
public class CoreIdentityTemplateDataContract { /// <summary></summary> [DataMember] public string DisplayName { get; set; } /// <summary></summary> [DataMember] public string Type { get; set; } /// <summary></summary> [DataMember] public DateTime ValidFrom { get; set; } /// <summary></summary> [DataMember] public DateTime? ValidTo { get; set; } /// <summary></summary> [DataMember] public string ForeignId { get; set; } /// <summary></summary> [DataMember] public Dictionary<string, object> Attributes { get; set; } /// <summary></summary> [DataMember] public CoreIdentityEmploymentTemplateDataContract[] Employments { get; set; } /// <summary></summary> [DataMember] public DateTime? EffectiveEntranceDate { get; set; } /// <summary></summary> [DataMember] public DateTime? EffectiveLeaveDate { get; set; } /// <summary></summary> [DataMember] public DateTime? LowestEmploymentDate { get; set; } /// <summary></summary> [DataMember] public DateTime? HighestEmploymentDate { get; set; } /// <summary></summary> [DataMember] public string DiVor { get; set; } /// <summary></summary> [DataMember] public string LanguageName { get; set; } /// <summary></summary> [DataMember] public string LanguageShortName { get; set; } /// <summary></summary> [DataMember] public uint? ManagerId { get; set; } /// <summary>This is a dummy property, it is used because WCF does not handle the knowntype-attributes without it see:https://social.msdn.microsoft.com/Forums/vstudio/en-US/27dfcf47-b2dd-4ef8-a49c-3113bf4e9497/known-type-wcf-dictionarystringobject-int?forum=wcf</summary> [DataMember] public object UsedForKnownTypeSerializationObject { get; set; } } public class CoreIdentityEmploymentTemplateDataContract { /// <summary></summary> [DataMember] public string Function { get; set; } /// <summary></summary> [DataMember] public string FunctionShortName { get; set; } /// <summary></summary> [DataMember] public uint? EmploymentNumber { get; set; } /// <summary></summary> [DataMember] public DateTime ValidFrom { get; set; } /// <summary></summary> [DataMember] public DateTime? ValidTo { get; set; } /// <summary></summary> [DataMember] public double Percentage { get; set; } /// <summary></summary> [DataMember] public string EmploymentType { get; set; } /// <summary></summary> [DataMember] public bool MainEmployment { get; set; } /// <summary></summary> [DataMember] public string ForeignId { get; set; } /// <summary></summary> [DataMember] public uint OuId { get; set; } /// <summary></summary> [DataMember] public string OuName { get; set; } /// <summary></summary> [DataMember] public string OuShortName { get; set; } /// <summary></summary> [DataMember] public string OuForeignKey { get; set; } /// <summary></summary> [DataMember] public string PositionName { get; set; } /// <summary></summary> [DataMember] public string PositionShortName { get; set; } /// <summary></summary> [DataMember] public string PositionForeignKey { get; set; } /// <summary></summary> [DataMember] public Dictionary<string, object> Attributes { get; set; } } |
Serialization
To be able to use it in the ConvertObjectToXml activity because of how the workflow engine handles complex objects it needs to be converted to plain JSON again.
This can be achieved in Javascript with:
Code Block |
---|
JSON.parse(JSON.stringify(YourTemplateContract)) |