Concerns: Vision/Vision Management Site/Vision Database
User: User Management Site
Version: 20.08 +
From Futurama version 20.08 it is possible to execute tasks within the Vision Management Site. Now it is possible to execute queries directly from the Management Site. For this functionality the pages 'Task definition' and 'Task execution' are added to the 'Management' menu. Within the Task definition page, it is possible to add different tasks and grant specific Functional Groups access to these tasks. The persons with this functional group can view these tasks within the Task execution page and execute the task. A full description of the different pages can be found below.
Within the Task definition page, it is possible to define different tasks. At the moment only Select queries adn Update queries are supported. Within the update query task it is possible to execute insert, update or delete queries. Notice that the sub menu 'Task definition' can only be used by users of the Management Site that have the rights to look into the files of all the ProductGroups.
A task has the following properties:
The ID is automatically assigned.
Here you can enter the name of the task. This name is shown on the task execution page.
The task is entered here. It is only possible to define queries.
A description of the task is entered here. When this task is selected on the Task execution page, this description will be shown to the user. Here you can enter a description of the task and how the results should be interpreted.
The Functional Group that has access to this task is entered here. On the Task execution page, a user can only view and execute a task that belongs to his functional group(s).
The type of the task can be selected here. At the moment only the types SelectQuery and UpdateQuery are supported. Within the type UpdateQuery it is possible to define queries that alter the database, such as insert, update and delete queries.
Here the timeout of the task can be defined in seconds. The default value is 30 seconds. 0 means no timeout is used.
Within the Task execution page, it is possible to execute a pre-defined task. On this page all tasks are shown that are linked to the Functional Group of a user. On this page it is possible to select a task from the list of tasks. The name and description of the selected task is shown, and it is possible to execute this task. After executing the task, the Task information will be hidden, and the results will be shown. For update queries an confirmation question is shown, before executing the task, to make sure the correct task is executed, because these tasks will potentially alter the database.
Next to going to the Task execution page and selecting the task, it is also possible to immediately execute a task. This can be done by adding the ID of the task to the URL. When you want to execute the task with ID 1, you can go to the page "Secure/Tasks/TaskExecution.aspx?ID=1", and the results of the task with ID 1 will be shown immediately.
When executing a SelectQuery, the results are shown on the page, with a maximum of 100 rows. If the query result contains more than 100 rows, a message above the result will be shown that only the first 100 rows are shown.
As mentioned above, it is only possible to define select queries as tasks. Below a few examples of possible queries are shown.
Get the number of stored dataitems
Another task that can be defined is a task to get the total number of dataitems that are created. For example, if these dataitems are stored pension plans and you would like to know how many plans are already created. This query will be as follow:
SELECT Count (Id) FROM Vision.DataItems where DataSetID = 1
Get the number of logins
Within an application it is possible to store a custom event to Vision. With this it is possible to create an event with every login. With this information you can get the number of persons that are logged in the application within a specific time period. For example, the number of persons that are logged in per year. This query will be as follow:
select count (distinct personid) as number_per_year, datename(yyyy, Date) as year from Vision.Events e, vision.apps a where e.AppID = a.ID
and a.ID = 1
group by datename(yyyy, Date)
order by datename(yyyy, Date)
If you have any questions about this subject or if you want to provide us feedback please send us an e-mail.