Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Open Server Explorer window (Window > Show View > Fiorano > Server Explorer), right-click Event Process Repository and select Add Event Process and create a new Event Process with name 'RESTStub_Example'.
     
  2. In the Service Palette, under Web category, drag the RESTStub component to the Fiorano Orchestrator.


    Figure 1: Adding RESTStub component to Orchestrator
     
  3. Double-click the component to open the Configuration Property Sheet (CPS).
    First  
  4. The first screen in the CPS, that is, wizard (1 of 3) is used to define the service using a user interface for WADL. User can create a WADL manually by defining different aspects of the service or can load an existing WADL and edit the configurations.
    In the first screen, perform the following actions and click Next:
    1. Provide Service Name as 'HelloWorld' with which the event process functionality is exposed as RESTful service.
    2. Go to resource under Resources node. Under Resource Configuration tab, replace the default value of Path 'resourcePath' with 'sayHello' to give a logical meaning to the scenario.

      Info

      The default method being GET, more methods can be added by right-clicking resource. Request can be configured and more response elements can be added from the context menu of the method. Refer Method Configuration to know more about this.

       

      Image Modified
      Figure 2: Service Name and resource configuration
       

  5. Click Next in the second screen: wizard (2 of 3) where SSL Configuration, HTTP Authentication Configuration and Additional Configuration can be done (no change required for this example).

    Image Modified
    Figure 3: Clicking Next button to move to the final screen
     
  6. Click Finish in the third screen, that is, wizard (3 of 3) to close the CPS and to save the configuration. The input and output ports gets generatedget generated.

    Info

    Default Connection Configuration works for this example; however, pls check FES Connection Configuration to know more about advanced configuration and its functionalities.


    Image Modified
    Figure 4: Clicking the Finish button to save configuration
     

  7. Drag the Output port to connect it to Input port. Route will be created with default name 'route1'

    Image Modified
    Figure 5: Connecting input port to output port

...

  1. Right-click route1, point to Configure Transformation and select Mapper Project to open Fiorano Mapper editor.

    Image Modified
    Figure 6: Opening Mapper Project window
     
  2. In the Output Structures panel in Mapper Project, click ANY element to make it appear in Funclet View.

    Image Modified
    Figure 7: Clicking ANY element
     
  3. Click the Funclet View tab and select 'String Functions' from Function Palette (Advanced Functions drop-down in Figure 3).

    Image Modified
    Figure 8: Selecting String Functions from Function palette
     
  4. Drag and drop Constant function to Funclet easel. Connect the Source node of Constant and the Destination node of ANY (drag from the grey color box in the constant).


    Figure 9: Connecting Constant function to ANY element
     
  5. Double-click the Constant present in the easel. In the String Constant dialog box, replace the default text 'Constant' with 'HelloWorld'. The name 'Constant' will be replaced with 'HelloWorld'.


    Figure 10: Changing the Constant name
     
  6. Click Save icon (or File ? Save) to save the transformation configuration and close the Mapper Project editor.

...

  1. Click Check Resource and Connectivity icon (or press ALT+SHIFT+C) to check resource and connectivity.
  2. Click Run Event Process icon (ALT+SHIFT+R) to run the event process.
     
  3. Right-click the RESTStub component and click View WADL option.


    Figure 11: Navigating to view WADL
     
  4. WADL appears on your browser.

    Note

    IP address will be different from the one in the figure below.

    Image Modified
    Figure 12: WADL displayed in the browser
     

  5. To access the service, type the following URL in a new tab and press ENTER to prompt a response from the HelloWorld service:

    Code Block
    http://
    localhost:1880
    <IPaddress>1880/restgateway/services/HelloWorld/sayHello
    Info

    Provide the same IP address as seen in the URL in the above figure.


    Image Modified
    Figure 13: Response from HelloWorld service

Anchor
_Toc382505829
_Toc382505829
Reference

  • Download RESTStub_Example event process and import it to the Event Process Repository in the Server Explorer in eStudio to understand the configuration used in this example and to execute the working sample.
  • Please note that the component options used in this example are minimum, which helps you to get an overview of the application. To explore the other options present in the RESTStub component, refer: <link/location>
  • Links for further reference
    • Links to the core subject about which the example is provided
    • Links to related topics
    • Other similar examples
  • .
Adaptavist ThemeBuilder EngineAtlassian Confluence