Cisco Unified Application Environment Developer Forums

« Back to Developers

Etch and OnConstruct

Combination View Flat View Tree View
Threads [ Previous | Next ]
Hi All,
How would I mimic the designers OnConstruct in an Etch based program? In the designer its a trigger, but when creating the etch based program this isn't. Where would be put the code that we want to execute as soon as the program is loaded and running?
thanks
Tim

Hi Timothy,

There is a difference in the way CUAD applications and Etch based applications load onto the CUAE server. In case of a CUAD application, when the application is deployed, if you notice the status, it is shown as "enabled and running". Here, "Enabled" signifies that the application has been loaded in the CUAE server while "Running" means the execution of the application has started and that is where the constructor code gets executed.

In case of an Etch based application, when the application is deployed, the status is shown to be "Enabled and stopped". The status "Enabled" signifies that the application is loaded in the CUAE server but its execution has not yet started due to which we observe the "stopped" status. It is only when the Etch application starts executing that the status is set to running.

Therefore, in order to mimic the OnConstruct designer in an Etch application, implement the corresponding code within the Java or C# constructor that will start executing as soon as the application has started running.


Regards,
Sudhanshu