Table Looping Grid Gone Wild with Nesting

My colleague created this map, and now I'm testing it and finding it isn't working when all values C01-C10 are not present.

When C01-C06 are there, and C07-C10 are missing, nothing gets put into the DocumentText set of key-value pairs.

The first thing mapped to the Table Looping functoid is the parent element of the C01 element (not shown in picture above), and that element is named MESSAGE_HEADER (you can see it in the XSLT below).  MESSAGE_HEADER is not a repeating element, maybe that is part of the issue. 

The data looks something like this.

            <C01>MODEL^LAPTOP</C01>

I explain this just so you know what the pattern of the functoids are.  The red functoid is the "String Find" and it looks for the ^ character. When found, it's supposed to be setting the "gate" to the gated Table Looping functoid. The two Scripting functoids simply do a text split, and return the text before and after the ^ sign.

Here's a quick look at the top of the long XSLT:

If I look for "KeyValueOfstringstring" in the XSLT, it's way down under the if statement for the C10 element, which is nested under the if statement of the C09 element, under C08, under C07, etc... all the way back to the above.

I see the same pattern on another part of the map which uses a Looping Functoid that is not gated.  In that case, all the elements are always present, so no one every saw the issue there.

Thanks,
Neal Walters
http://MyLifeIsMyMessage.net - BizTalk Blog

August 31st, 2015 11:11am

Looks like the gates are cascading... Not sure if he is doing the same pattern with the logins but that would explain it.
No need to go further if this gate fails and it is the end of the list.

I think gated columns are not what he thinks they are.

So what happens is in the table looping if a gate fails that is the end of the table looping. If it is successful it continues to check the next one. That is why you get the cascade of verification. Thinking of the logic and looking at the table looping I bet that is why you see it that like that.

Free Windows Admin Tool Kit Click here and download it now
August 31st, 2015 12:20pm

Seem like nesting is a better word that cascading.  So what can we do to fix map? 
It seems to be a matter of the XSLT builder interprets what is on the GUI map-grid, vs. the way we humans interpret it.

Why doesn't it build independent code for each element, C01-C10.

Instead it builds the entire <DocumentText> element under C10, which is under C09, which is under C08, etc... 

Neal


August 31st, 2015 12:46pm

After looking further there may be some other logic happening here because when I took an existing table looping and debugged it normally then with the gated flag set, I did not get this type or output. So the conditional existence is probably having an affect on the resulting XSL that gets generated.

Without looking at the actual map, I think he may have just had an error in the map somewhere that was causing the additional conditions to nest the results.

Free Windows Admin Tool Kit Click here and download it now
August 31st, 2015 1:22pm

Seem like nesting is a better word that cascading.  So what can we do to fix map? 
It seems to be a matter of the XSLT builder interprets what is on the GUI map-grid, vs. the way we humans interpret it.

Why doesn't it build independent code for each element, C01-C10.

Instead it builds the entire <DocumentText> element under C10, which is under C09, which is under C08, etc... 

Neal


August 31st, 2015 4:42pm

Seem like nesting is a better word that cascading.  So what can we do to fix map? 
It seems to be a matter of the XSLT builder interprets what is on the GUI map-grid, vs. the way we humans interpret it.

Why doesn't it build independent code for each element, C01-C10.

Instead it builds the entire <DocumentText> element under C10, which is under C09, which is under C08, etc... 

Neal


Free Windows Admin Tool Kit Click here and download it now
August 31st, 2015 4:42pm

My colleague fixed it like this.  It's actually a lot simpler than the one above.  I haven't had a chance to discus with him yet.

Scripting Functoid example:

public string SplitString1a(bool param1, string param2)
{
  if (param1 == true)
  {
   string[] words  =  param2.Split('^');
   return words.GetValue(0).ToString();
  }
  else
  {
  return "";
  }
}





September 1st, 2015 9:19am

My colleague fixed it like this.  It's actually a lot simpler than the one above.  I haven't had a chance to discus with him yet.

Scripting Functoid example:

public string SplitString1a(bool param1, string param2)
{
  if (param1 == true)
  {
   string[] words  =  param2.Split('^');
   return words.GetValue(0).ToString();
  }
  else
  {
  return "";
  }
}





  • Marked as answer by Neal Walters Tuesday, September 01, 2015 1:16 PM
  • Edited by Neal Walters Tuesday, September 01, 2015 1:16 PM
Free Windows Admin Tool Kit Click here and download it now
September 1st, 2015 1:15pm

My colleague fixed it like this.  It's actually a lot simpler than the one above.  I haven't had a chance to discus with him yet.

Scripting Functoid example:

public string SplitString1a(bool param1, string param2)
{
  if (param1 == true)
  {
   string[] words  =  param2.Split('^');
   return words.GetValue(0).ToString();
  }
  else
  {
  return "";
  }
}





  • Marked as answer by Neal Walters Tuesday, September 01, 2015 1:16 PM
  • Edited by Neal Walters Tuesday, September 01, 2015 1:16 PM
September 1st, 2015 1:15pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics