Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

UDRs entering an Analysis agent are referred to as  input  types, while UDRs leaving the agent are referred to as  output  types. The input types must be specified, while the output types are calculated from the input types and the APL code.


Info
titleExample - Input and Output types

Suppose there is a workflow with one Analysis agent, one input route streaming two different input types (typeA and typeB), and two output routes. The two output routes take two different UDR types - the first equaling one of the input types (typeA), and the second is a new UDR type (typeC) which is created out of information fetched from the other input type (typeB).


Image Added

The APL code:

Code Block
languagetext
themeEclipse
if (instanceOf(input, typeA)) {
  udrRoute((typeA)input,"r_2");
}
else {
  typeC newUDR = udrCreate(typeC);
  newUDR.field = ((typeB)input).field;
  // Additional field assignments...
  udrRoute(newUDR, ,"r_3");
}

The first udrRoute statement explicitly typecasts to the typeA type, while there is no typecasting at all for the second udrRoute statement. This is because the input variable does not have a known type (it can be either typeA or typeB), while newUDRis known by the compiler to be of typeC.

Without any typecasting, the output type on r_2 would have been reported as an undefined UDR, drudr, and the workflow would not have been valid.