Versions Compared

Key

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

...

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

  2. 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).
    Image Removed
    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
     
  3. 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
  4. 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
    .
    Image Removed
    Figure 35: Element ANY with constant value 'upload'
     
     panel, right-click Request and click User XSL to edit User XSL.

    Image Added
    Figure 35: Adding User XSL to 'Request' resource

  5. Comment the Resource parameters as shown in the image below.

    Image Added
    Figure 36: Commenting the Resource parameters

  6. Click Save icon (or File ??Save) to save the transformation configuration and close the Mapper Project editor.

...

  1. Add Feeder and Display components from Micro Service Palette under Util category to Fiorano Orchestrator.
  2. Connect the components in the following manner:
    1. Feeder output port to FileReader input port. Rename the route to 'ScanFiles'
    2. 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.

 

  1. Right-click ExtractJSON route, point to Configure Transformation and select Mapper Project to open Fiorano Mapper editor.
  2. In the Mapper Project, perform the following actions in Output Structures panel:
    1. Click the Add icon on the upper-right part of the page and select XML option.
    2. In the Load Output XML Structure dialog box, add the following text in XML Content editor:<output>output</output>
    3. Click DTD icon to generate DTD element. The message appears in Generated DTD section. Click Finish.

    Figure 3738: Configuring to generate JSON message
     
  3. Connect ANY element present in Input Structures panel to output element that appears in Output Structures panel.


    Figure 3839: Connecting ANY element to output
     
  4. 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 
  5. 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. Two components: Feeder and Display appear.
  3. In the Feeder component, click the Send button.


    Figure 4041: Sending message from Feeder
     
  4. Confirmation message appears in the following format in Display1: { "FilePath" : "<TARGET_FILE_PATH>" }


    Figure 4142: Receiving message in Display

Anchor
_Toc385260005
_Toc385260005
Reference

Adaptavist ThemeBuilder EngineAtlassian Confluence