protected override void Execute(CodeActivityContext context) { var workflowContext = context.GetExtension <IWorkflowContext>(); if (!string.IsNullOrEmpty(JsonString.Get <string>(context)) && !string.IsNullOrEmpty(JsonPath.Get <string>(context))) { JObject jsonObject = JObject.Parse(JsonString.Get <string>(context)); JToken token = jsonObject.SelectToken(JsonPath.Get <string>(context)); if (token != null) { string value = (string)token; Result_Text.Set(context, value); Guid id = new Guid(); if (Guid.TryParse(value, out id)) { this.Result_Guid.Set(context, value); } DateTime dateTime = new DateTime(); if (DateTime.TryParse(value, out dateTime)) { this.Result_DateTime.Set(context, dateTime); } decimal decimalValue = new decimal(); if (decimal.TryParse(value, out decimalValue)) { this.Result_Decimal.Set(context, decimalValue); try { this.Result_Money.Set(context, new Money(decimalValue)); } catch { } } double doubleValue = new double(); if (double.TryParse(value, out doubleValue)) { this.Result_Double.Set(context, doubleValue); } int intValue = 0; if (int.TryParse(value, out intValue)) { this.Result_WholeNumber.Set(context, intValue); } } } }