When LiveCycle is deployed in a cluster of several nodes, determining which node processed a particular short-lived or long-lived orchestration invocation is hard. System administrators also need a reliable way to verify that load-balancing is working, meaning that all nodes in the load-balanced cluster are getting client requests. The best solution is to do this in situ, which means collecting the name and IP address of the node as part of the orchestration itself.
The approach can be this:
– use scripting to obtain JVM and OS information
– pass the collected information to process variables or build an XML data structure
– merge this data into a form
// Initialize an InetAddress object
InetAddress localaddr = InetAddress.getLocalHost();
// Get DNS name of the Server Node
String strDNSName = localaddr.getCanonicalHostName();
// Set the value of a process variable using patExecContext
The value of the process variable DNS_Name can then be populated into a form field used in the orchestration, or applied as a watermark to a document assembled or converted.
The attached BeanShell script collects a lot more server information (node IP address, JVM heap usage, JDK being used etc), builds an XML structure from this and then sets another process variable of datatype ‘xml’. This can then be used as data for a corresponding XDP form template (when downloading, save as form.xdp). Based on your scenario, this can be rendered using Forms ES and streamed back to the calling application or browser or saved to the server filesystem.