Liquit.Applications.Launch
  • 19 Feb 2021
  • 1 Minute To Read
  • Print
  • Share
  • Dark
    Light

Liquit.Applications.Launch

  • Print
  • Share
  • Dark
    Light

The Liquit.Applications.Launch function is used to launch applications from the Liquit Workspace API. All applicable applications return a callback reporting on the status of the application, this can be either the application has been launched successfully, if it has failed to launch or a status update of the progress. The update of the progress comes especially in handy when running installations or distributions.

The callback propery state can be as follows:

Name Description Value
success Application has launched successfully String
failure Application has failed to start see details property for more information about the error. String
inprogress Application is being installed. Check progress property to see how far along the installation is. String

The details property will only be available when a application has failed to launch, this property will report on the exact reason on why an application failed to launch.

The progress property will only be available when a application is in progress, it will report the progress in percentage (0-100).



// Launch application by ID with callback returning progress information.
Liquit.Applications.Launch(id, null, function (e) {

	console.log(e);

	// *** e.state ***
	// Can be one of the following values:
	//
	// * 'success': Application has been successfully launched.
	// * 'inprogress': Application is being installed. Check progress property to see how far along the installation is.
	// * 'failure': Application has failed to start see details property for more information about the error.
	//
	// *** e.progress ***
	// Gives an estimated percentage of the installation progress.
	//
	// *** e.details ***
	// Gives additional information about the failture to launch the application.
	// This is structured with a 'code' field and a 'message' field describing the error.
	//

	// Application started
	if (e.state == 'success')
		alert('application started');

	// Failed to start application.
	else if (e.state == 'failure')
		alert('application failed to start: ' + e.details.code + ': ' + e.details.message);

});

Was This Article Helpful?