...
- Right-click PushFile, point to Configure Transformation and select Mapper Project to open Fiorano Mapper editor.
- Following the steps mentioned in "Configuring Transformation between FileWriter and RESTStub" section, connect application/octet-stream constant source node to Media Type destination node (refer Step#5).
Figure 32: MediaType with constant value 'application/octet-stream'
In Output Structures panel, right-click upload and click User XSL to edit User XSL.
Figure 33: Adding User XSL to 'upload' resource
- In the User xsl XSL for upload dialog box, insert the text "upload" within a tag, and then click OK. The text is being added for the component to identify the resource being invoked.
Figure 34: Adding XSL for 'upload' element
In the - In Output Structures panel, click ANY, add a constant to Funclet View and rename it as 'upload', and then connect upload constant source node to ANY destination node.
Upload element needs to be present for component to identify the resource being invoked.
Figure 35: Element ANY with constant value 'upload'
panel, right-click Request and click User XSL to edit User XSL.
Figure 35: Adding User XSL to 'Request' resource - Comment the Resource parameters as shown in the image below.
Figure 36: Commenting the Resource parameters - Click Save icon (or File ??Save) to save the transformation configuration and close the Mapper Project editor.
...
- Add Feeder and Display components from Micro Service Palette under Util category to Fiorano Orchestrator.
- Connect the components in the following manner:
- Feeder output port to FileReader input port. Rename the route to 'ScanFiles'
- RESTConsumer output port to Display input port. Rename the route to 'ExtractJSON'.
Figure 3637: Connecting Feeder and Display to FileReader and RESTConsumer respectively
...
Note |
---|
By default, REST component sends an XML response with an embedded JSON content. Perform the following actions if you want to extract only the JSON content, or else skip this section and move directly to Running the Example section. |
- Right-click ExtractJSON route, point to Configure Transformation and select Mapper Project to open Fiorano Mapper editor.
- In the Mapper Project, perform the following actions in Output Structures panel:
- Click the Add icon on the upper-right part of the page and select XML option.
- In the Load Output XML Structure dialog box, add the following text in XML Content editor:<output>output</output>
- Click DTD icon to generate DTD element. The message appears in Generated DTD section. Click Finish.
Figure 3738: Configuring to generate JSON message
- Connect ANY element present in Input Structures panel to output element that appears in Output Structures panel.
Figure 3839: Connecting ANY element to output
- In the Menu, go to Tools and select XSLT Properties. In XSLT Properties dialog box, select 'text' from Output Method drop-down.
Figure 3940: Configuring XSLT Properties - Click Save icon (or File >Save) to save the transformation configuration and close the Mapper Project editor
...
- Click Check Resource and Connectivity icon (or press ALT+SHIFT+C) to check resource and connectivity.
- Click Run Event Process icon (ALT+SHIFT+R) to run the event process. Two components: Feeder and Display appear.
- In the Feeder component, click the Send button.
Figure 4041: Sending message from Feeder
- Confirmation message appears in the following format in Display1: { "FilePath" : "<TARGET_FILE_PATH>" }
Figure 4142: Receiving message in Display
Anchor | ||||
---|---|---|---|---|
|
- Download the event processes REST_Service_Example and REST_Client_Example 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, RESTConsumer, FileReader, and FileWriter components, refer RESTStub, RESTConsumer, FileReader and FileWriter sections.
Overview
Content Tools
ThemeBuilder