...
- Under the DB category in the Microservice Palette, drag the DB component to the Fiorano Orchestrator.
Double-click the component to open the Configuration Property Sheet (CPS).
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.
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.
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.
Click Finish to complete SQL Configuration.
- Click Finish in the Interaction Configurations panel to complete the DB Configuration.
...
- Type: Basic
- Username and Password: as provided in FPS Jetty profile.
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.
...
- Right-click route1, point to Configure Transformation and select the Mapper Project option to open the Fiorano Mapper editor.
- In the Mapper Project, connect values with the same names present in both panels: Input Structures and Output Structures:
- Name
- ID
Designation
- Click the Save icon (or File > Save) to save the transformation configuration and close the Mapper Project editor.
- Similarly, for route2, go to the Mapper Project window and connect the values:
- id
- UpdateCount
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:
...
- Add Feeder and Display components from the Util category in the Microservice Palette into the REST-POST_Client orchestrator.
- Connect the ports of the RESTConsumer to the Feeder and Display components in the following manner:
- Output Port of the Feeder component to the Input Port of the RESTConsumer component.
- Output Port of the RESTConsumer component to the Input Port of the Display component.
- 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.
- The Select Root Element text box and the schema editor get populated with the RESTConsumer schema. Click Next.
- 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.
- Click the Finish or Save and Close button to complete the Feeder configuration.
...
- Click the Check Resource and Connectivity icon (or press ALT+SHIFT+C) to check the resource and connectivity.
- Click the Run Event Process icon (ALT+SHIFT+R) to run the event process. The Feeder and Display windows get opened.
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.
Expand title Expand 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>
- If the Insert query is successful, 'UpdateCount' is displayed as '1' in the Display window.
Note | |||||
---|---|---|---|---|---|
| |||||
In order to verify, GET method can be used in DB.
Click Execute in the DB Test Interation Specifications Panel; the detailed added to the DB appears. |
Anchor | ||||
---|---|---|---|---|
|
- Download REST POST Client and Server Example event processes and import it to the Event Process Repository in the Server Explorer within 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 basic to aquire have an overview of the application. To explore other options present in the RESTStub and the RESTConsumer components, refer to the sections: RESTStub and RESTConsumer.