In addition to the visual interface of the orchestrator, Fiorano provides a command line interface to launch and perform other operations on an entire Event Process and/or particular components within an Event Process (those configured with a manual launch type).
The command line interface for launching Event Processes is based on Ant tasks and is available in the installation directory at
Windows
- Naviate to %FIORANO_HOME% /esb/tools/cli
- Run cli.bat file
- Type command ant <targetname>
Linux
- Naviate to $FIORANO_HOME/esb/tools/cli
- Run cli.sh file (this wil run the default target in the build file, that is, launchApps)
- The user can also specify the target by using ./cli.sh <targetname>
The figure below displays the tree listing in typical windows installation of the platform
Figure 1: Tree Type Listing
- Depending on the operating system you are using, the cli.bat or cli.sh file sets up the environment to interact with the exposed Fiorano API. Ant commands can be executed from the cli.bat (or cli.sh, as appropriate) files to issue requests to the Fiorano Enterprise Server.
- The build file for ant tasks is build.xml. This contains the list of ant tasks provided by Fiorano by default to interact with the exposed API.
- The build.properties file is the properties file for the build.xml file containing the ant tasks.
List of Ant Tasks provided by command Line Interface
Following are the list of ant tasks available in Command Line Interface tool
- importApps - imports the list of applications that are specified for property IMPORT_APPLICATION_LIST in build.properties file. The directory from which the applications to be imported can be specified with APPLICATION_IMPORT_DIR. if the property OVERWRITE is true, it will overwrite the existing application.
- importwithlibs - by using this target one can import the application with services that are required by application. The application Zip file name can be specified with APPLICATION_ZIP in build.properties file.
- exportApps - exports the list of applications that are apecified for property EXPORT_APPLICATION_LIST in build.properties, provided the application exists in Fiorano Application repository. The directory to which the applications to be exported can be specified with APPLICATION_EXPORT_DIR.
- exportAppsWithLibs - by using this target one can export the list of applications specified for property EXPORT_APPLICATION_LIST in properties file along with services that are used in application. The property APPLICATION_EXPORT_DIR_LIB can be used to give the path of Export directory.
- importServices - Import Business Components from IMPORT_SERVICES_LIST
If the property OVERWRITE_IMPORT_SERVICE is true while importing the service, it will overwrite the existing service.
- exportServices - Export Business Components from EXPORT_SERVICES_LIST.
- launchApps - Launch all the applications specified in LAUNCH_APPLICATION_LIST
- stopApps - Stop all the applications specified in STOP_APPLICATION_LIST
- replace - Replaces properties in Event process, the properties file to be specified as value of PROPERTIES_FILE in build.properties file.
- stopServices - Stops the list of services that are specified for property STOP_SERVICES_LIST in build.properties file . The services to be stopped belong to the Application specified by the property STOP_SERVICES_OF_APPLICATION. Only one application name can be specified with the property STOP_SERVICES_OF_APPLICATION.
- stopAllServices - Stops all Services of the list of applications that are specified by the property STOP_ALLSERVICES_OFAPPLICATION_LIST in build.properties file.
- startServices - Starts the list of services that are specified for property START_SERVICES_LIST. The services to be started belong to the Application specified by the property START_SERVICES_OF_APPLICATION. Only one application name can be specified with the property START_SERVICES_OF_APPLICATION. The application whose services are to be started should be running.
- startAllServices - Start all Services of the list of applications that are specified by the property START_ALLSERVICES_OFAPPLICATION_LIST in build.properties file. All the applications whose services are to be started should be running.
Launching an Event Process from Command Line
To launch an event process, navigate the build.properties file to edit the value of properties required by the target launchApps.
LAUNCH_APPLICATION_LIST=<Comma Separated Event Processes>
For example: LAUNCH_APPLICATION_LIST=SimpleChat, SimpleDemo
Figure 5.11.2 illustrates a snippet from a build.xml file.
Figure 2: Build.xml Snippet
Now from the command prompt, the command: ant launchApps launchs all the event processes specified in LAUNCH_APPLICATION_LIST.
All the properties accessed in this command is available in the build.properties file.
- In build.properties, change the value of LAUNCH_APPLICATION_LIST to the name of the event process to be started. All other values are provided for a default connection to an enterprise server on the local machine and can be changed as required. Then simply call the ant task on the command line as shown below.
Figure 3: Build Properties
- If the build is successful that means the command has been issued to the Enterprise Server successfully and the Application is launched.
- It is also possible to loop over these basic ant tasks provided by Fiorano.
Launching Components from Command Line
Components whose Launch type is set to Manual may be launched from the command line. The interface for launching such components is available in the installation directory at
%FIORANO_HOME% /esb/tools/scriptgen
The following screen displays the tree listing in a typical windows installation.
Figure 4: Launching Components from Command Line
- Depending on the Operating system you are using, the cli.bat or cli.sh file sets up the environment to interact with the exposed Fiorano API. Ant commands can be executed from the cli.bat (or cli.sh, as appropriate) files to issue requests to the Fiorano Enterprise Server.
- The build file for ant tasks is build.xml. It contains the list of ant tasks provided by Fiorano by default to initiate the manual launch of particular components.
- The properties file for the build.xml is build.properties.
- The component_properties folder includes the manual launch scripts, although they can be stored anywhere.
Executing Components Manually
To launch a component from an external source, a script defining the properties for that component is required. To get a manual launch script for a component configured to be executed in manual mode.
- Select the component and right-click on it. A menu list appears.
Select Execution and choose the Save Manual Launch Script option.
Figure 5: Save Manual Launch Script- Invoke the command line interface using scriptgen.bat and build the scriptgen by calling ant which has the default ant target launch
Figure 6: The Command Line Interface
- Click on the ellipsis to point to the manual launch script which was saved and then click the Load button.
Figure 7: Component Configuration Screen
- The properties from the launch script are loaded. Enter the username and password in the Username and Password fields and click the Ok button.
Figure 8: Launch Configuration Dialog box - This issues the command to the Enterprise Server to launch the component configured manually and the component is launched.