Versions Compared

Key

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

...

  1. Add a new Event Process with name 'REST_Service_Example'.
  2. Drag the RESTStub component from Web category in the Micro Service Palette to the Fiorano Orchestrator.
    Image Removed
    Image Added
    Figure 1: Adding RESTStub component to REST_Service_Example orchestrator
     
  3. Double-click the RESTStub component to open Configuration Property Sheet (CPS).
  4. In the Configuration dialog box, perform the following actions:
    1. Add Service Name: 'restdemo', right-click resource under Resources and click Remove Resource to remove default resource.


      Figure 2: Removing default resource from RESTStub
       
    2. Under Create/Edit WADL section, Right-click Resources and click Add Resource to add new resource.


      Figure 3: Adding new resource
       
    3. Type 'upload' in ID and path fields that appear under Resources Configuration tab. New resource with name 'upload' gets added under Resources.


      Figure 4: Providing resource name 'upload'
       
    4. Right-click upload, point to Add Method and click POST.


      Figure 5: Adding Method 'POST'
       
    5. Click POST option that appears under upload resource and click Add icon under Representations section present in the Request Configuration tab.
    6. Under Representation tab, select 'application/octet-stream' from the Media Type drop-down.


      Figure 6: Adding Representation with Media Type as application/octet-stream
       
    7. Right-click POST node, select Add Response and select 'application/json' from Media Type drop-down


      Figure 7: Adding Representation for RESPONSE - 'application/json'
       
  5. Click Next twice to skip security-related configuration (SSl Configuration) and Connection Configuration, and click Finish to save RESTStub configuration.

...

  1. Add the FileWriter component from File category in the Micro Service Palette to the Fiorano Orchestrator.
    Image Removed
    Image Added
    Figure 8: Adding FileWriter component in REST_Service_Example event process
     
  2. Double-click the FileWriter component to open Configuration Property Sheet (CPS).
  3. In the Interaction Configuration dialog box, click the Attributes tab to configure the attributes.
  4. Select the Is input Binary ?' checkbox to write the data as bytes and click the FileWriter Configuration Ellipsis button.


    Figure 9: Selecting Binary Input
     
  5. In the FileWriterConfig dialog box, provide the following values and clock OK:
    1. File Name: The name of the file to which the input data has to be written. If the file with this name does not exist, a new file is created
    2. Target Directory: Provide the location to save the file.
    3. Working Directory: Location to save the file during intermediate processing.
    4. Error Directory: Location to save the file in case the processing does not get successful.


      Figure 10: Providing File Name and storage locations
       
  6. Click Finish to save the FileWriter configuration.

...

  1. Add a new Event Process with name 'REST_Client_Example'.
  2. Add the RESTConsumer component from Web category in the Micro Service Palette to the Fiorano Orchestrator.
    Image Removed
    Image Added
    Figure 23: Adding RESTConsumer component to REST_Client_example orchestrator
     
  3. Switch to REST_Server_Example event process, right-click RESTStub component which is running, and click Copy WADL URL to copy the WADL URL.


    Figure 24: Copying WADL URL
     
  4. Switch back to REST_Client_Example event process and double-click RESTConsumer component to open the CPS.
  5. In the Configuration dialog box, perform the following actions:
    1. Select the Load WADL checkbox
    2. Select the From URL option.
    3. Paste the copied WADL URL copied in Step#2.
    4. Click the Load WADL button.

    Figure 25: Pasting and loading WADL URL
     
  6. In the Configuration tab under Create/Edit WADL section, values as configured in RESTStub component gets populated.


    Figure 26: Resources populated after configuration
     
  7. Click Next twice to skip SSL and Connection configurations as done in RESTStub component, and click Finish to save RESTConsumer configuration.

...

  1. Add the FileReader component from File category in the Micro Service Palette to the Fiorano Orchestrator.
    Image Removed
    Image Added
    Figure 27: Adding FileReader component to REST_Client_Example event process
     
  2. Double-click the FileReader component to open Configuration Property Sheet (CPS).
  3. In the Interaction Configuration dialog box, select the 'Is input Binary ?' checkbox to write the data as bytes and click the FileReader Configuration Ellipsis button.


    Figure 28: Selecting Binary File
     
  4. In the FileReaderConfig dialog box, provide the following values and click OK:
    1. File Name: The name of the file to be read. A pattern of file names can also be provided using wildcard character * (asterisk symbol).
      Example: *.* includes all the files and *.jpg includes the files with .jpg extension.
    2. Source Directory: The directory which holds the file(s) to be read. All the files in this directory whose names match the pattern specified for the File name property will be processed.

      Info

      Working Directory and Error Directory are optional. Select the Use Working Directory check box to use working directory.


    3. Figure 29: Providing File Name and storage location
       

  5. Click Next and clear Enable Scheduling check box to allow Feeder component to provide input.


    Figure 30: Disabling Scheduler Configurations
     
  6. Click Finish to save the FileReader configuration.

...

Adaptavist ThemeBuilder EngineAtlassian Confluence