ESB
13.2 13.1 13.0 12.2 12.1 12.0 11.0
13.2 13.1 13.0 12.2 12.1 12.0 11.0

Building and Deploying Service

Contents

After the creation of Microservice component following actions can be taken:

Post Creation Action

Description

None

Generate the source code and do nothing else

Build

Generate the source and build the sources

Build and Deploy

Generate the source, build the source and register with Fiorano Enterprise Server

Building the Microservice

To build the component created, execute the command ant in the component directory. This compiles the source files, builds the required archives and creates a file export.zip containing all the files /details required for the components. export.zip can be imported using FSSM or Studio, for details regarding importing of a business component refer the Deploying in Enterprise Server section.

Deploying the Microservice

Deploying the component means registering the component on a Fiorano Enterprise Server. Any component created before it can be used in developing event process(s) has to be registered with the Fiorano Enterprise Server.

Deployment can be done in the command prompt or eStudio as explained in the following sections.

In the Offline perspective of Fiorano eStudio, deploying just brings the new service to the Micro Service Palette and the Microservice Repository.

Command Prompt

To deploy the developed component,  perform any one of the following ways.

Interactive mode

Open command prompt from the new component directory and follow the below steps:

  1. Execute the following command:

    register.bat
    

    Before executing the above command, make sure that JAVA_HOME is set to JDK Home location at $Fiorano_Home$/fiorano_vars.bat.

    register.sh
    
  2. Type "1" and press Enter.

    registerbat.png
    Figure 1: Interactive deployment mode options

    Other options are meant to perform the following:

    Option

    Description

    2

    To reregister

    3

    Deploy to eStudio in the Offline perspective

    4

    To unregister

    Exit

    Exit from the interactive mode

Non-interactive mode

Open command prompt from the new component directory and execute the following command:

ant register 

A success message appears saying "BUILD SUCCESSFUL" after registering the required elements required for the build deployment.

buildsu.png
Figure 2: Build success message

In case it throws any error related to the library files, execute the following command:

ant -lib <Fiorao_HomePath>\antscripts\lib register

cmdexe.png
Figure 3: Deploying using ant -lib command

The details of the enterprise server on which the component should be deployed are specified in the build.properties file

image2015-8-18 13:19:2.png
Figure 4: Build.properties file content showing details of the enterprise server on which the component has to be deployed

eStudio

Before starting with the below steps, ensure that you have imported the service(s)/project(s) to the workspace.

Prerequisite

To set Ant Home, perform the following actions in eStudio:

  1. Navigate through Window > Preferences > Ant > Runtime and click the Ant Home button.

  2. Click antscripts folder present in the Fiorano_Home directory

  ant.png
Figure 5: Setting Ant Home

Failing to perform this activity leads to Build failure; the error description gets displayed in the Console view that appears on failure.

cnsl.png
Figure 6: Error in Console view in case Ant home is not set before running the build


Steps

To deploy the developed component, perform the following actions:

  1. Open Ant view using any one of the following ways:

    1. Navigating through Window > Show View > Other > Ant > Ant

    2. Click Show View as a Fast View  image2015-10-13 18:0:19.png  icon and navigate through Other > Ant > Ant.

  2. In the Ant view, right-click and select Add Buildfiles option.

    image2015-10-13 19:31:9.png  
    Figure 7: Adding Build files from Ant view
     

  3. In the Buildfile Selection pop-up, select build.xml node and click OK to add the Build XML files to the Ant view

    uildselec.png
    Figure 8: Selecting Build.xml node
     

  4. Expand the node with the new service name that appears and do the following depending on the perspective given below:

    • Offline Event Process Development Perspective (perform any one action from the two below)

      • Double-click deployToStudio node

      • Click deployToStudio node and click the Run the Selected Target image2015-10-13 18:50:31.png  icon.

    • Online Event Process Development Perspective (perform any one action from the two below)

      • Double-click register node

      • Click register node and click the Run the Selected Target  image2015-10-13 18:50:59.png  icon.

    image2015-10-13 18:41:22.png


    Figure 9: Options to Deploy and Register the new component for the Offline and Online perspectives respectively

    A console panel appears, displaying a series of messages to indicate generation of various files. The message saying "BUILD SUCCESSFUL" confirms the deployment of the service.

    buildok.png


    Figure 10: Messages including the "Build Successful" message appearing in the Console view

Viewing the Microservice

Check the presence of new microservice in eStudio in the Microservice Repository panel and Micro Service Palette panel.

Reload the services by clicking the Refresh image2015-8-12 14:11:30.png button present in the Micro Service Palette to see the newly added services. New services appear in the Micro Service Palette as well as Microservice Repository.

image2015-12-3 14:36:40.png
Figure 11: New microservice appearing under the Microservice Repository and Micro Service Palette

Unregister and Reregister

Command Prompt

Unregister

 To unregister a custom component that is already registered with the enterprise server, execute the following command from the command line in the component directory.

 ant unregister 
Reregister

To redeploy a component that is already registered with enterprise server in case any changes are made to the component, execute the following command from the command line in the component directory.

ant reregister

The interactive mode as explained in the Building and Deploying Service | id (12.2)BuildingandDeployingService CommandPrompt section above can also be used:

  • Use the number "4" to unregister

  • Use the number "2" to reregister

eStudio

Unregister

To unregister a custom component that is already registered with the enterprise server, perform any one of the following in Console view:

  • Double-click unregister node

  • Click unregister node and click the Run the Selected Target  image2015-10-13 18:51:11.png  icon.

Reregister

To redeploy a component that is already registered with enterprise server in case any changes are made to the component, perform any one of the following in Console view:

  • Double-click register node

  • Click register node and click the Run the Selected Target  image2015-10-13 18:51:25.png  icon.

image2015-10-13 18:54:51.png
Figure 12: Unregister/Reregister options for a deployed component