Citrix Automation Guidelines
Automation design rules
Robotic automations in mixed mode Citrix projects are required to adhere to specific design rules. You must develop using rules that specify an application from the same context where it will launch. For example, an adapter created for the Citrix environment must also exist within the Citrix context.
Initiating automation events
The initiating event for the automation dictates where that context will reside. For instance, say there is a client that has a company-wide human resources application that must communicate with a departmental Citrix expense reporting application. You must develop the procedure automation in Robot Studio within the same context as the application control or adapter that initiates the automation logic. For example, if a user launches some action from the local expense reporting application, the automation that catches the event thrown must be in the same context. If an event were to begin within the Citrix deployed human resources application, the automation that caught the event must also be in the Citrix context. The object explorer in the image below shows a Citrix context that contains an automation.
In the following image, a textbox button click is used to start the automation. The properties of the textbox can communicate with the textbox from the local NotePad adapter. While the Citrix context adapter must launch the Citrix automation, automation methods and the setting of properties can still happen between contexts.
Limiting factors in executing Citrix automations
Within procedural robotic automations, the Entry points and Execute methods can communicate within different contexts. The leading limitation developers encounter when creating Citrix automations is to remember that data cannot pass result information from the Execute block when the calling automation and the automation called are in different contexts. Developers must create a global variable to pass the resulting data. The image below depicts how a local automation without different contexts can utilize the result directly from an Execute block.
When using a Citrix context in conjunction with a local automation, results cannot be passed from the Citrix context out of that automation. Within a Citrix context, there is no current mechanism that can signal to the system when an automation has finished processing. Any results from the Citrix automation must first be saved into a global variable, as shown below. The local automation can then use that variable to continue to process the objects.
The image below shows an automation in a Citrix context that saves a property value into a global value before calling the Exit block.
In the local automation, this Citrix automation is called using an Execute block. The results saved in the Global container are connected to the Execute block so that processing within the local context can continue.
Note: You cannot pass anything from the results of an execute block in the Citrix context. Attempting to pass a value from a Citrix context Execute block will result in the automation ending the process.