...
A UDR of the type MultiForwardingUDR
which has a target filename that is not identical to its precedent is saved in a new output file.
...
After a target filename that is not identical to its precedent is saved, you cannot use the first filename again. For example: Saving filename B after saving filename A, prevents you from using A again. Instead, you should first save all the A filenames, then all the B filenames, and so forth.
Non-existing directories will be created if the Create Non-Existing Directories check box under the Filename Template tab is checked. If not checked, a runtime error will occur if a previously unknown directory exists in the FNTUDR of an incoming MultiForwardingUDR
. Every configuration option referring to bytearray input is ignored when MultiForwardingUDR
s are expected.
Info |
---|
This example shows the APL code used in an Analysis agent connected to a forwarding agent expecting input of type MultiForwardingUDR s. Code Block |
---|
| import ultra.FNT;
MultiForwardingUDR createMultiForwardingUDR
(string dir, string file, bytearray fileContent){
//Create the FNTUDR
FNTUDR fntudr = udrCreate(FNTUDR);
fntAddString(fntudr, dir);
fntAddDirDelimiter(fntudr);//Add a directory
fntAddString(fntudr, file);//Add a file
MultiForwardingUDR multiForwardingUDR =
udrCreate(MultiForwardingUDR);
multiForwardingUDR.fntSpecification = fntudr;
multiForwardingUDR.content = fileContent;
return multiForwardingUDR;
}
consume {
bytearray file1Content;
strToBA (file1Content, "file nr 1 content");
bytearray file2Content;
strToBA (file2Content, "file nr 2 content");
//Send MultiForwardingUDRs to the forwarding agent
udrRoute(createMultiForwardingUDR
("dir1", "file1", file1Content));
udrRoute(createMultiForwardingUDR
("dir2", "file2", file2Content));
} |
The Analysis agent mentioned previous in the example will send two MultiForwardingUDR s to the forwarding agent. Two files with different contents will be placed in two separate sub folders in the root directory. The Create Non-Existing Directories check box under the Filename Template tab in the configuration of the forwarding agent must be checked if the directories do not previously exist. |
...