Versions Compared

Key

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

...

Note
titleNote!

Cloning is a costly operation in terms of performance, therefore it must be used with care.


 

Info
titleExample - Analysis agent assignment and cloning, case 1


 

Assignment case 1

In this example, you want to alter the UDR in the Analysis agent and send it to Encoder_1, while still sending its original value to Encoder_2. To achieve this, the UDR must be cloned. The following code creates, alters, and routes a cloned UDR on r_2 and leaves the original UDR unchanged.

Code Block
languagetext
themeEclipse
input=udrClone(input);
input.MyNumber=54;
udrRoute(input);

Note that input is a built-in variable in APL, and must be used for all UDRs entering the agent.


Info
titleExample - Analysis agent assignment and cloning, case 2

An alternative solution to the one presented in the previous example is to clone the UDRs in an Analysis agent and then route the UDRs to another Analysis agent in which amendment is performed.

 


Assignment case 2

Configurations in the Analysis_1 agent:

Code Block
languagetext
themeEclipse
udrRoute(input,"r_3",clone);
input.MyNumber=54;
udrRoute(input,"r_2");

The incoming UDR is cloned and the clone is routed on to onto r_3. After that, the original UDR can be altered and routed to r_2.


Scroll ignore
scroll-viewportfalse
scroll-pdftrue
scroll-officefalse
scroll-chmtrue
scroll-docbooktrue
scroll-eclipsehelptrue
scroll-epubtrue
scroll-htmlfalse


Next: