TC8.5 - Managing resources via Resource Manager: upload, modify, search, publish, put in execution on a scheduler, share, rank

×

Warning message

  • You can't delete this newsletter because it has not been sent to all its subscribers.
  • You can't delete this newsletter because it has not been sent to all its subscribers.

Test Case Title

TC8.5 - Managing resources via Resource Manager: upload, modify, search, publish, put in execution on a scheduler, share, rank

Goal

  • Manage all the different Snap4City own resources
  • upload, search, publish, share the different resources
  • Put in execution on a scheduler some type of own resources, monitoring their activities
  • Make access on all the different Snap4City published resources
  • Search, download, rank a resource
  • Manage resource ownership (only for the RootAdmin snap4city user role)
  • Manage resource scheduling (only for the RootAdmin snap4city user role)

Prerequisites

Using a PC or Mobile with a web browser.

The following functionalities are available only for specific Snap4city users with specific privileges.

Expected successful result

Managing resources via Resource Manager: upload, modify, search, publish, put in execution on a scheduler, share, rank.

Steps

 

 

Please note that some of the following links could be accessible only for registered users.

Users roles for which this test case is available: All users’ roles (Manager, AreaManager, ToolAdmin, RootAdmin) but with different permissions.

User used to describe the Examples: ‘snap4city’ (role: AreaManager), ‘finaluser1’ (role: Manager)

List of the different types of Resources that can be managed via Resource Manager:

Examples/functionalities list:

  • Example 1: View, search, download and rank public resources (accessible for All roles)
  • Example 2: View, search, download, rank own and public resources (accessible for the roles: AreaManager, ToolAdmin, RootAdmin)
  • Example 3: View, search, download, rank all resources (accessible for ToolAdmin and RootAdmin)
  • Example 4: Upload/modify/publish and share own resources (accessible for the roles: AreaManager, ToolAdmin, RootAdmin)
  • Example 5: Upload/modify/publish and share all resources (accessible for the roles:  ToolAdmin, RootAdmin)
  • Example 6: Put own resources in execution on a scheduler (accessible for the roles: AreaManager, ToolAdmin, RootAdmin)
  • Example 7: Put ALL resources in execution on a scheduler (accessible for the roles: ToolAdmin, RootAdmin)

 


Example 0: Login on the snap4city platform

Users roles for which this test case is available: All

User used to describe this Examples: ‘snap4city’ (role: AreaManager)

  • Go to the snap4city home page 
  • Make the login
  • I can see the snap4city home page
  • Now you can select one of the functionalities on the left panel
    • Note that the list of the functionalities depends on the user role (and on the related permissions).


Fig: snap4city home page for Manager and public users.


Example 1: View, search, download and rank public resources

Users roles for which this test case is available: All

User used to describe this Examples: ‘finaluser1’ (role: Manager)

Resource types on which this activity can be done: All

  • Make the login on the snap4city portal (follow the steps described in EXAMPLE 0)
  • Click on the ‘Resource Manager: Process Loader’ menu
  • In this web page the list of the public Resources is present. It is possible to make searches on them, view the Resource details, vote and download the resources.

Fig: snap4city home page for Manager and public users.

  • The resource search can be done in two different modalities:
    • Simple textual search

Fig: Resource textual search.

  • Filtered search. It is possible to use the multiple filters, so a user can select (in the following order):
    • Nature (the Nature of the data managed but the process, e.g.: ‘Services’)
    • Sub-Nature: (a more detailed Resource description, e.g.  all)
    • License (the license of use associated to the Resource, e.g.  all)
    • Resource_type (type of resources managed. Possible types: ETL, AMMA, DevDash (Developer Dashboards), ResDash (Resource Dashboards), Microservices, Mobile Apps, NodeRed Application, Nodered Library, Jar, R)
    • Format (e.g. all)


Fig:  Resource filtered search and rank.

  • It is possible to rank each resource and see the Resource details

 


Fig: Resource Details.


Example 2: View, search, download, rank own and public resources

Users roles for which this test case is available: AreaManager, ToolAdmin, RootAdmin

User used to describe this Examples: ‘snap4city’ (role: AreaManager)

Resource types on which this activity can be done: All

 

This Example is similar to EXAMPLE 1, the only difference is that the users with one of the roles: AreaManager, ToolAdmin, RootAdmin can retrieve also their private resources and not only the public ones.

  •  own resources
  •  own and Private resources
  •  own and Published resources
  •  public resource (published by other snap4city users)

 


Fig:  Area Manager viewed Resources.

 


Example 3: View, search, download, rank all resources

Users roles for which this test case is available: ToolAdmin, RootAdmin

User used to describe this Examples: ‘panesi’ (role: ToolAdmin)

Resource types on which this activity can be done: All

 

This Example is similar to EXAMPLEs 1 and 2, the only difference is that the users with the role ToolAdmin or RootAdmin can retrieve All the resources and not only the public ones.


Fig:  ToolAdmin/RootAdmin viewed Resources.

Morever this two kinds of users ca also view the information related to the users:

  • The filter ‘Username’ in the search is added
  • When they click on the button ’View Details’ of each Resource, the username (the author of the resource selected) it will also visible

 


Fig:  ToolAdmin/RootAdmin Resource Details (also Username).

 


Example 4: Upload/modify/publish and share own resources (accessible for roles: AreaManager, ToolAdmin, RootAdmin)

Users roles for which this test case is available: AreaManager, ToolAdmin, RootAdmin

User used to describe this Examples: ‘snap4city’ (role: AreaManager)

Resource types on which this activity can be done: All

  • Make the login on the snap4city portal (follow the steps described in EXAMPLE 0)
  • Click on the ‘Resource Manager: Process Loader > Resources’ menu to view all own resources and the related metadata. In this page each user can see the details and can: A) Upload; B) modify; C) publish its own resources.

Case A) Upload a new resource

  • Click on the Button (‘Upload New Resource’) button


Fig: Upload button.

As described Above, many different types of resources can be managed. We put here same samples.

CASE A) create a Microservice

  • A pop up will open: fill the fields and press the ‘Confirm’ button. For example, if you want to create a Microservice:
    • App Type: Microservice
    • Description: Retrieve last tweets related to a channel
    • Nature: Services
    • Sub-Nature: Social Media
    • Micro Service Title: twitter-last-channel
    • Help: Retrieve last tweets related to a channel
    • url: https://disit.org/rttv/query/TwLastChannel.php
    • parameter: channel
    • Method: GET
    • Authentication: No


Fig: Upload new resource form (Microservice).

  • After the ‘Confirm’, the resource its available as private resource (visible only to its owner and to the the ToolAdmin or RootAdmin, in this case the owner is the ‘snap4city’ user) on the table (list).


Fig: Manage a resource.

Case B) Modify own resources

  • To modify the metadata related to each own resource, click on the ‘EDIT’ button in the column ‘Metadata’ of the resource and fill/modify all the metadata. In the viewed example ‘twitter-last-channel’ MicroService:


Fig: Edit a Resource (Microservice).

Case C) Publish (share) own resources:

Note that to publish a Resource you have to fill the Licence field, see case B (that have to be changed for example from ‘Private’ to ‘https://creativecommons.org/licenses/by/4.0’)

  • If the resource is private and you want to share it will all the snap4city users (publish it on the web): Click on the button ‘NO’, column ‘Published’
    • As result the resource is visible in the menu ‘View Resources’ for All the snap4city users (EXAMPLE 2)
  • If the resource is private and you want to share it will all the sna4city users (unpublish it): Click on the button ‘NO’, column ‘Published’
    • As result the resource is visible in the menu ‘View Resources’ ONLY for All the snap4city users the author and for the users with the role ‘ToolAdmin’ or ‘RootAdmin’

Note that it is possible to create following types of micreoservices:

  • Method: GET without authorization (as that described above)
  • Method: GET with authorization (as that described above)
  • Method: POST with authorization (as that in the following figure)
  • Method: POST without authorization (as that in the following figure)


Fig.  – Different Microservices creation.

CASE B) create an ETL

  • Click the ‘Upload New Resource’ button, a pop-up appears 
  • Choose the ETL resource type and fill the fields:
    • Description: ‘Helsinki youth substudies (data input format XLS)’
    • Nature: ‘Services’
    • SubNature: ‘youth_substudies’
    • Choose the ETL file from the file system


Fig.  – Upload a new ETL on the Resource Manager.

 
CASE C) create an IoTAPP:

  • Click the ‘Upload New Resource’ button, a pop-up appears 
  • Choose the IoTApp resource type and fill the fields:
    • Description: ‘Snap4city Nodered Application’
    • Nature: ‘TransferServiceAndRenting’
    • SubNature: ‘Car_park’
    • Choose the ETL file from the file system


Fig. c – Upload a new IoT App on the Resource Manager.

 


Example 5: Upload/modify/publish and share All resources (accessible for roles: ToolAdmin, RootAdmin)
This Example is like EXAMPLE 4, the only difference is that the users with the role ToolAdmin or RootAdmin can manage All the resources and not only the own resources.

 


Example 6: Put own resources in execution on a scheduler (accessible for roles: AreaManager, ToolAdmin, RootAdmin)
Users roles for which this test case is available: AreaManager, ToolAdmin, RootAdmin
User used to describe this Examples: ‘snap4city’ (role: AreaManager)
Resource type on which this activity can be done: ETL and DataAnalytics (Example described with ETL)

  • Make the login on the snap4city portal (follow the steps described in EXAMPLE 0)
  • To schedule your ETL you must:
    1. Create a Process Model associated to the ETL
    2. Create a New Instance of the process Model (related to your ETL) and schedule the instance

1) How to Create a Process Model associated to the ETL:

 


Fig. d – Upload a new Resource on the Resource Manager.

  • Search for the ETL you want to schedule:
    • search for example the ‘Electric vehicle charging’, using the filter in the right top of the web page
    • select a Resource (for example: ‘Electric vehicle charging’)
    • click on the ‘NEW’ button (in the ‘Process Model’ column of the table) and put the metadata. For the ‘Electric vehicle charging’ ETL, it is possible to put:
      • ‘Process Parameters’ tab:
        • Name= ’Electric vehicle charging’
        • Description = ‘info on Electric vehicle charging in Florence’
        • Group = ‘Services’
      • ‘Trigger’ tab:
        • Name= ’Electric vehicle charging_trigger’
        • Description = ‘description…’
        • Group = ‘Services_trigger
      • ‘Advanced Parameters’ tab:
        • Needed if it is necessary to execute two different process instances in series (typically is void).


Fig. e – Upload a new Resource on the Resource Manager.

 


Fig. f: New Process Model: Parameters


Fig. g: New Process Model: Advanced parameters


Fig: New Process Model: Trigger

 

2) How to create a New Instance of the process Model (related to your ETL) and schedule it:

To put in execution a Process, at least one Process Instance (associated to the Process Model created in the previous Paragraph) must be created. The instance can then be executed in a scheduler. To do this, follow the steps:

  • Click on the ‘Process Model’ menu and search for a specific Process Model (e.g. the Process Model associated to the ‘Electric vehicle charging’ Resource).

 

Fig. h: Process Models and new Instances.

 

    • Click on the ‘NEW’ Process Instance button (column ‘New Instance’ of the table) put the necessary metadata and create it (Click the ‘Confirm’ button).


Fig. i: Create a new Instance of a Process Model (related for example to an ETL).

  • Click on the ‘VIEW’ button (‘Show Instances’ column of the table) to verify its presence


Fig. l: Verify the instance creation.

  • Now the process is in execution and you can find it in the list (tab ‘Processes in Execution’)

 


Fig. m: Processes in Execution list.

  • Once your process is in execution, you can monitor its status:
    • From the ‘Process in execution List page’, it possible (see the figure above):
      • Do actions on its execution:
        • See the executions log



Fig. n: Processes in Execution details.

  •      Start the (or restart) the process execution
  •      Stop the process execution
  •       Delete the process execution
  • See the process execution from the scheduler (called DISCES) view: click on the link ‘Test Scheduler Node’ and the following view appears

 


Fig. o: Processes details.

  • It is possible to monitor the job from the home page:
    • Click on the Filter button (at the bottom of the page)
    • Make textual searches on each column

 

Fig. p: Processes in Execution search.

Note that "Status" value of a newly created job is set to "CREATED" and it is changed each time the user starts or stops running a job from the commands on the right side of the line. The content of the "status" column is continually updated by means of a function that every two minutes sends to the various schedulers in which requests processes are entered to know the execution state and depending on the response received, the value is updated accordingly.
 
The values ​​that the Status can assume are: 

  • CREATED: is the value that defaults to a process right after it was created, before it is updated for the first time
  • NORMAL: The process is running correctly.
  • NONE: Trigger associated to the process still not exist (per example the execution time interval is ended)
  • BLOCKED: The execution of the process was blocked by the user.
  • PAUSED: The execution of the process has been paused.
  • ERROR SERVER COMMUNICATION: The request was successfully sent, but internal issues for the scheduler server could not be received.
  • NOT FOUND: The application sent a request to the scheduler for that process, but did not find any corresponding process to the information sent.

RUNNING: The process assumes this value immediately after a start execution request has been sent.
 


Example 7: Put ALL resources in execution on a scheduler (accessible for the roles: ToolAdmin, RootAdmin)

Users roles for which this test case is available: ToolAdmin, RootAdmin

Resource type on which this activity can be done: ETL and DataAnalytics

This Example is like EXAMPLE 6, the only difference is that the users with the role ToolAdmin or RootAdmin can put in execution and monitor All the resources and not only the own resources.