Versions Compared

Key

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

...

  1. Under the DB category in the Microservice Palette, drag the DB component to the Fiorano Orchestrator.

     

  2. Double-click the component to open the Configuration Property Sheet (CPS). 

  3. In the Managed Connection Factory panel, click Database Configuration ellipsis button to configure the DB Connection. Provide the credentials for the DB from which the table needs to be accessed.

    Tip

    Refer to the Database Configuration section for more information about the properties that needs to be configured.


     
     

  4. Click OK and click the Test button present in the Managed Connection Factory panel to confirm a successful connection with the message "Connection created successfully". Click Next to move to the Interaction Configurations panel.

    Note

    Ensure that DB jars are added to the System Library as instructed in the Prerequisites section above. If not added, there may be issues with the connection.

  5. In the Interaction Configurations panel, click SQL Configuration ellipsis button to configure Insert SQL statement and provide with the Query Name: insert.

    Tip

    Refer to the Simple Insert Statement section to insert values to a table.




  6. Click Finish to complete SQL Configuration.
    Image Removed
    Image Added

  7. Click Finish in the Interaction Configurations panel to complete the DB Configuration.

...

Click Next and then Finish in the third screen, wizard (3 of 3) , to close the CPS and to save the configuration. The input and output ports gets generated.

...

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


     
  2. In the Mapper Project, connect values with the same names present in both panels: Input Structures and Output Structures:
    1. Name
    2. ID
      Designation
    Image Added
    Image Removed
     
  3. Click the Save icon (or File > Save) to save the transformation configuration and close the Mapper Project editor.
  4. Similarly, for route2, go to the Mapper Project window and connect the values:
    1. id
    2. UpdateCount
       
    Image RemovedImage Added

  5. Save the mapping configuration as explained above.

    Info

    Now the dotted lines in the route are transformed to bold lines implying that the route transformation has been done.

...

Note

Keep the REST-POST_Server Event Process running.

Configuring RESTConsumer

The RESTConsumer component serves as a client to access exposed services within the Fiorano Environment. To configure the RESTConsumer component and communicate with the RESTStub which has an exposed RESTservice, perform the actions below in the REST-POST_Client application:

...

  1. Add Feeder and Display components from the Util category in the Microservice Palette into the REST-POST_Client orchestrator.
  2. Connect the ports of the RESTConsumer to the Feeder and Display components in the following manner:
    1. Output Port of the Feeder component to the Input Port of the RESTConsumer component.
    2. Output Port of the RESTConsumer component to the Input Port of the Display component.
       


  3. Double-click the Feeder component and click the Connected Port Schemas button in the Message Type Configuration panel. Select the last child node ('resource_POST_Request' in this example) in the Connected ports window to import the RESTConsumer schema into the feeder and click OK.



  4. The Select Root Element text box and the schema editor get populated with the RESTConsumer schema. Click Next.
    Image Removed
    Image Added

  5. In the Message Details Configuration panel, click Generate Sample to open the XSD Sample Generation Dialog box. Enter '1' in the max text field under No. of Repeatable elements to be generated to reduce the number of samples generated to just one, and click OK.



  6. Click the Finish or Save and Close button to complete the Feeder configuration.

...

  1. Click the Check Resource and Connectivity  icon (or press ALT+SHIFT+C) to check the resource and connectivity.
  2. Click the Run Event Process  icon (ALT+SHIFT+R) to run the event process. The Feeder and Display windows get opened.
  3. Provide the required column values (in this example,

    DEPTNO: 144, DNAME: KEN and LOC: US)

    ename: Name1 and eid: 101) ) in the Feeder window and click Send.

    Image Removed


    Expand
    titleExpand for sample input
    Code Block
    <ns1:Request xmlns:ns1="http://www.fiorano.com/services/rest">
       <ResourceParameters>
          <resource/>
       </ResourceParameters>
       <Representations>
          <Representation MediaType="application/xml">
             <Element>
                <ns2:SQL_CFG_1 xmlns:ns2="http://www.fiorano.com/fesb/activity/DB1/Request" id="-2937691682571537408">
                   <ns2:insert>
                      <ns2:ename>Name1</ns2:ename>
                      <ns2:eid>-101</ns2:eid>
                   </ns2:insert>
                </ns2:SQL_CFG_1>
             </Element>
          </Representation>
       </Representations>
    </ns1:Request>

    Image Added
     

  4. If the Insert query is successful, 'UpdateCount' is displayed as '1' in the Display window.
     Image Removed
    Image Added
Note
titleValidation

In order to verify, GET method can be used in DB.

Code Block
titleGET method to retrieve existing data in the DB table
SELECT "public"."emp"."ename", "public"."emp"."eid" FROM "public"."emp"   

Click Execute in the DB Test Interation Specifications Panel; the detailed added to the DB appears.

Image Added

Anchor
_Toc382505829
_Toc382505829
Reference

Adaptavist ThemeBuilder EngineAtlassian Confluence