diff --git a/modules/websubmit/doc/admin/websubmit-admin-guide.webdoc b/modules/websubmit/doc/admin/websubmit-admin-guide.webdoc index 5099b7759..3b2df8625 100644 --- a/modules/websubmit/doc/admin/websubmit-admin-guide.webdoc +++ b/modules/websubmit/doc/admin/websubmit-admin-guide.webdoc @@ -1,2216 +1,2217 @@ +## -*- mode: html; coding: utf-8; -*- ## $Id$ ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## CDS Invenio is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDS Invenio; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
WARNING: OLD WEBSUBMIT ADMIN GUIDE FOLLOWS |
---|
This WebSubmit Admin Guide was written for the previous PHP-based version of the admin tool. The submission concepts and pipeline description remain valid, but the interface snapshot examples would now differ. The guide is to be updated soon. |
This manager tool allows you to administrate all the WebSubmit interface. With it, you will be able to create new actions, new types of documents and edit the existing ones.
The main objects in webSubmit are the "action" (such as "Submit New Record", "Submit New File", "Modify Record"...) and the "type of document" (such as "preprint", "photo"...).
To one given type of document can be attached several actions. An action is the addition of two processes:
- The first one is the data gathering. The manager will allow you to create new web forms corresponding to the fields the user will have to fill in when using webSubmit.
- The second one is the data treatement. Basically, what the program will do with the data gathered during the first phase. The treatment appears in this tool as a sequence of functions. This manager will allow you to add functions to an action, edit the existing functions, and reorder the functions.
using the manager through an example
interface description
actions
document types
This page presents you the typical situations a user could meet using WebSubmit, and for each situation how to use the manager to configure it.
interface description
actions
document types
This page will explain some philosophical issues behind the document submission system.
The relation between a search collection and a submission document type may be prone to certain confusion for CDS Invenio administrators. This comes from the fact that there is no one-to-one direct mapping between them, as is usual elsewhere. The relation is more flexible than that.
A search collection in CDS Invenio is defined through a search query. For example, "all records where field F contains the value V belong to collection C". Several assertions can be deduced from this definition:
1/ A single record can appear in several collections.
2/ There is no limitation to the number of collections in which a record can appear.
3/ Any query can be used to build a collection. The query can also be a complex one using logical operators, hence can rely on the value of several fields.
(In addition, a search collection can be defined via a set of its subcollections in the hierarchy tree. Refer to the WebSearch Admin Guide for that matter.)
The submission system basically creates an XML MARC record and stores it in the database. To which collection this new record belongs depends exclusively on the content of the XML MARC record. This XML MARC record is created by the Make_Record function. So the secret of the matching of a submitted record to a particular collection lies in the configuration of this function. Some examples will clarify this point:
Example 1: Let's consider a "Preprints" collection which is defined by this query: "980__a:PREPRINT". We want to create a submission document type from which all records will go to this "Preprints" collection. For this, the Make_Record function should be configured so that a 980__a field containing "PREPRINT" will always be created.
Example 2: Let's still consider the same "Preprints" collection, and an additional "Theses" collection based on a slightly different query "980__a:THESIS". We want to create a single submission type from which the records will go in the "Preprints" or "Theses" collections depending on a field chosen by the submitter. In this case, the Make_Record function should be configured so that a 980__a field will contain either "PREPRINT" or "THESIS" depending on the value entered by the submitter.
The apparent disconnection between a submission document type and a search collection allows a great flexibility, allowing administrators to create 1 to 1, 1 to n, n to 1 or even 1 to 0 (not very useful!) relations.
on the websubmit admin main page you will find:
- The list of all existing document type in the middle of the page. Click on one line in the list to have access to the main document modification panel
- The right menu panel with the following links inside:
- "webSubmit Admin": This links leads you back to the main page of the manager.
- "New Doctype": Click here if you wish to create a new document type.
- "Remove Doctype": Click here if you want to remove an existing document type.
- "Available Actions": Lists all existing actions
- "Available Javascript Checks": Lists all existing Javascript checking functions.
- "Available Element Description": Lists all existing html form element descriptions.
- "Available Functions": Lists all existing functions in CDS Submit.
- "Organise Main Page": Allows you to manage the appearance and order of the list of document types on CDS Submit User main page.
interface description
actions
document types
WebSubmit can propose several actions on different document types. Each of these document type may or may not implement all possible actions. The main difference between each document type is the metadata which define each of them, and may also be the kind of fulltext files attached to one record.
A document type can be one of "Thesis", "Photos", "Videotapes"... or whatever type of document you may invent. A document type is always defined by its metadata. It may or may not have a fulltext file attached to it.
This tool leaves you free to create the web forms adapted to whatever type of document you want to create (see "Create and Maintain the Web Form") as well as free to determine what treatment you wish to apply to the collected data (see "Create and Maintain the Data Treatment").
add a new type of document
remove a type of document
modify a type of document
implement an action over a type of document
Click on the "New Doctype" link in the webSubmit right menu.
A new document type is defined by 6 fields:
- Creation Date and Modification Dates are generated and modified automatically.
- Document Type ID: This is the acronym for your new document type. We usually use a 3 letters acronym.
- Document Type Name: This is the full name of your new document. This is the text which will appear on the list of available documents and catalogues on webSubmit main page.
- Document Type Description: This is the text which will appear on the document type submission page. This can be pure text or html.
- Doctype to clone: Here you can choose to create your document type as a clone of another existing document type. If so, the new document type will implement all actions implemented by the chosen one. The web forms will be the same, and the functions also, as well as the values of the parameters for these functions. Of course once cloned, you will be able to modify the implemented actions.
remove a type of document
modify a type of document
implement an action over a type of document
Click on the "Remove Doctype" link in the webSubmit admin right menu
Select the document type to delete then click on the "Remove Doctype" button. Remember by doing this, you will delete this document type as well as all the implementation of actions for this document type!
create a type of document
modify a type of document
implement an action over a type of document
Modifying a document type in webSubmit - this will modify its general data description, not the implementations of the actions on this document type. For the later, please see implement an action over a type of document.
From the main page of the manager, click on the title of the document type you want to modify, then click on the "Edit Document Type Details".
Once here, you can modify 2 fields:
Document Type Name: This is the full name of your new document. This is the text which will appear on the list of available documents and catalogues on webSubmit main page. Document Type Description: This is the text which will appear on the right of the screen when the user moves the mouse over the document type title and on the document type submission page. This can be pure text or html.
remove a type of document
create a type of document
implement an action over a type of document
In webSubmit you can create several actions (for example "Submit New Record", "Submit a New File", "Send to a Distribution List", etc. in fact any action you can imagine to perform on a document stored in your database). The creation of an action is very simple and consists in filling in a name, description and associating a directory to this action. The directory parameter indicates where the collected data will be stored when the action is carried on.
Once an action is created, you have to implement it over a document type. Implementing an action means defining the web form which will be displayed to a user, and defining the treatment (set of functions) applied to the data which have been gathered. The implementation of the same action over two document types can be very different. The fields in the web form can be different as well as the functions applied at the end of this action.
create a new action
remove an action
modify an action
implement an action over a type of document
Click on the "Available Actions" link in the websubmit right menu, then on the "Add an Action" button.
A new action is defined by 6 fields:
- Creation Date and Modification Dates are generated and modified automatically.
- Action Code: This is the acronym for your new action. We usually use a 3 letters acronym.
- Action Description: This is a short description of the new action.
- dir: This is the name of the directory in which the submission data will be stored temporarily. If the dir value is "running" as for the "Submit New Record" action (SBI), then the submission data for a Text Document (document acronym "TEXT") will be stored in the /opt/cds-invenio/var/data/submit/storage/running/TEXT/9089760_90540 directory (where 9089760_90540 is what we call the submission number. It is a string automatically generated at the beginning of each submission). Once finished, the submission data will be moved to the /opt/cds-invenio/var/data/submit/storage/done/running/TEXT/ directory by the "Move_to_Done" function.
- statustext: text displayed in the status bar of the browser when the user moves his mouse upon the action button.
remove an action
modify an action
implement an action over a type of document
Removing the implementation of an action over a document type - Please note the removal of the action itself is not allowed with this tool.
From the websubmit admin main page, click on the title of the relevant document type. Then click on the red cross corresponding to the line of the action you want to remove.
create an action
modify an action
implement an action over a type of document
This page is about how to modify the general data about an action - for modifying the implementation of an action over a document type, see implement an action over a type of document
Click on the "View Actions" link in the right menu of the websubmit admin, then on the title of the action you want to modify...
You may modify 3 fields:
- Action Description: This is a short description of the new action.
- dir: This is the name of the directory in which the submission data will be stored temporarily. See the meaning of this parameter in create an action.
- statustext: text displayed in the status bar of the browser when the user moves his mouse upon the action button.
remove an action
create an action
implement an action over a type of document
Implement an action over a document type. Create the web forms and the treatment process.
From the main page of the manager, click on the title of the relevant document type.
Then click on the "Add a New Submission" button.
Just select the name of the action you want to implement. When you select an action, the list of document which already implement this action appears. Then you can select from this list the document from which you want to clone the implementation, or just choose "No Clone" if you want to build this implementation from scratch.
After selecting the correct fields, click on the "Add Submission" button.
You then go back to the document type manager page where you can see that in the bottom array your newly implemented action appears (check the acronym in the first column).
- Clicking on the action acronym will allow you to modify the general data about the action (remember in this case that all the other implementations of this particular action will also be changed).
- The second column indicates whether the button representing this action will appear on the submission page.
- The third column shows you the number of pages composing the web form for this implementation. (see create and maintain the web form).
- The 4th and 5th columns indicate the creation and last modification dates for this implementation.
- In the 6th column, you can find the order in which the button will be displayed on the submission page of this document type.
- The following 4 columns (level, score, stpage, endtxt) deal with the insertion of this action in an action set.
An action set is a succession of actions which should be done in a given order when a user starts.
For example the submission of a document is usually composed of two actions: Submission of Bibliographic Information (SBI) and Fulltext Transfer (FTT) which should be done one after the other.
When the user starts the submission, we want CDS Submit to get him first in SBI and when he finishes SBI to carry him to FTT.
SBI and FTT are in this case in the same action set.
They will both have a level of 1 ("level" is a bad name, it should be "action set number"), SBI will have a score of 1, and FTT a score of 2 (which means it will be started after SBI). If you set the stpage of FTT to 2, the user will be directly carried to the 2nd page of the FTT web form. This value is usually set to 1.
The endtxt field contains the text which will be display to the user at the end of the first action (here it could be "you now have to transfer your files")
A single action like "Modify Bibliographic Information" should have the 3 columns to 0,0 and 1.
- Click on the icon in the 12th column ("Edit Submission Pages") to create or edit the web form.
- Click on the icon in the 13th column ("Edit Functions") to create or edit the function list.
- The "Edit Submission" column allows you to modify the data (level, status text...) for this implementation.
- Finally the last column allows you to delete this implementation.
If you chose to clone the implementation from an existing one, the web form as well as the functions list will already be defined. Else you will have to create them from scratch.
create and maintain the web form
create and maintain the data treatment
Create and define the web form used during an action.
From the main page of the manager, click on the title of the relevant document type. Then click on the icon in the "Edit Submission Pages" column of the relevant line.
A web form can be split over several pages. This is a matter of easiness for the user: he will have an overview of all form fields present on the page without having to scroll it. Moreover, each time the user goes from one page to the other, all entered data are saved. If he wants to stop then come back later (or if the browser crashes!) he will be able to get back to the submission at the exact moment he left it.
Once here:
you can see the ordered list of already existing pages in the web form. In this example there are 4 pages. You can then:
- Move one page from one place to an other, using the small blue arrows under each page number.
- Suppress one page by clicking on the relevant red cross.
- Add a page, by clicking the "ADD A PAGE" button!
- Edit the content of one page by clicking on the page number.
- Go back to the document main page.
Click on a page number, you then arrive to a place where you can edit this form page.
A form page is composed of a list of form elements. Each of these form elements is roughly made of an html template and a text displayed before the form field.
In the first part of the page, you have a preview of what the form will look like to the user:
Then the second table shows you the list of the form elements present on the page:
You can then:
- Move one element from one place to another using the drop-down menus in the first column ("Item No") of the table, or the little blue arrows in the second column.
- Edit the html template of one form element by clicking on the name of the template in the 3rd column ("Name").
- Edit one of the form elements by clicking on the icon in the 10th column.
- delete one form element by clicking on the relevant red cross.
- Add an element to the page by clicking the "ADD ELEMENT TO PAGE" button.
In the html template edition page, you can modify the following values:Important warning! Please remember this is a template! This means it can be used in many different web forms/implementations. When you modify this template the modification will take place in each of the implementations this template has been used.
- Element type: indicates which html form element to create
- Aleph code: Aleph users only! - This indicates in which field of the Aleph document database to retrieve the original value when modifying this information (function Create_Modify_Interface of action MBI).
- Marc Code: MySQL users only! - This indicates in which field of the MySQL document database to retrieve the original value when modifying this information (function Create_Modify_Interface of action MBI).
- Cookies: indicates whether WebSubmit will set a cookie on the value filled in by the user. If yes, next time the user will come to this submission, the value he has entered last time will be filled in automatically. Note: This feature has been REMOVED.
- other fields: The other fields help defining the html form element.
In the form element edition page, you may modify the following values:
- element label: This is the text displayed before the actual form field.
- level: can be one of "mandatory" or "optional". If mandatory, the user won't be able to leave this page before filling this field in.
- short desc: This is the text displayed in the summary window when it is opened.
- Check: Select here the javascript checking function to be applied to the submitted value of this field
- Modify Text: This text will be displayed before the form field when modifying the value (action "Modify Record", function "Create_Modify_Interface")
Click on the "ADD ELEMENT TO PAGE" button. There you will have to decide which html template field to use ("Element Description code"), and also the field mentioned above.
You have access to the list of all existing html templates by clicking on the "View element descriptions" link in the websubmit admin right menu.
By clicking on one of them, you will have access to its description.
If no template corresponds to the one you seek, click on the "ADD NEW ELEMENT DESCRIPTION" button to create one.
The fields you have to enter in the creation form are the one described in the Edit the html template of one form element section.
You also have to choose a name for this new element.
IMPORTANT! The name you choose for your html element is also the name of the file in which webSubmit will save the value entered in this field. This is also the one you will use in your BibConvert configuration. Bibconvert is the program which will convert the data gathered in webSubmit in a formatted XML file for insertion in the documents database.
Tips:Elements of type "select box" which are used as a mandatory field in a form must start with "<option>Select:</option>"
Click on the "View Checks" link in the websubmit admin right menu. You then have access to a list of all the defined javascript functions.
You can then click on the name of the function you want to modify, or click on the "ADD NEW CHECK" button to create a new javascript function.
These functions are inserted in the web page when the user is doing his submission. When he clicks on "next page", this function will be called with the value entered by the user as a parameter. If the function returns false, the page does not change and an error message should be output. If the function returns true, everything is correct, so page can be changed.
create and maintain the data treatment
At the end of a submission, we have to tell webSubmit what to do with the data it has gathered. This is expressed through one or several lists of functions (we call this the "end script").
From the main page of the manager, click on the title of the relevant document type.
Then click on the icon in the "Edit Functions" column of the relevant line.
Here is what you may see then (this is the end script list of functions for a document type named "TEST" and action "FTT" - Fulltext Transfer):
You can see the ordered list of all the functions in the end script. This end script is composed of 2 steps (see the "step" column). The functions composing the first step are called, then there should be action from the user which would trigger step 2 - in the present case the Upload_Files function (last of step 1) allows the user to upload additional files by creating a web form, then when the user finishes, he presses another button created by the function, which ends the process. Functions of step 2 are then called.
Why implement multiple steps? The reason can vary with the task you want to accomplish. For example with the example above (Fulltext Transfer), we use the first step to allow the upload of multiple additional files (dynamic action) which could not be done in the static web form. In the case of the "Modify Bibliographic Information" action, the first step is used to display the fields the user wants to modify, prefilled with the existing values. The reason is once again that the task we want to realise is dynamic.
The "score" column is used to order the functions. The function which has the smallest score will be called first, and the largest score will be called last.
You can then:Please note: To pass one function from one step to another, you have to delete it then add it again in the proper step.
- View and edit the parameters of each function by clicking on the name of the function.
- Move one function up and down, by using the small blue arrows.
- Suppress one function by clicking on the relevant red cross.
- Add a function to the list by clicking the "ADD FUNCTION" button.
- Go back to the document main page ("FINISHED" button).
all about functions
In webSubmit, each action process is divided into two phases: the gathering of data (through a web form) and the treatment of the data.
The treatment is organised in a succession of functions, each of which has its own input and output.
The functions themselves are stored in separate files (one per function) in the/python/invenio/websubmit_functions directory. A file containing a function MUST be named after the function name itself. For example, a function called "Move_to_Done" MUST be stored in a file called Move_to_Done.py. The case is important here.
For a description of what should be inside the file, have a look to the "create a new function" page of this guide.
To each function you can associate one or several parameters, which may have different values according to the document type the function is used for. One parameter may be used for different functions. For example one standard parameter used in several functions is called "edsrn". It contains the name of the file in which the reference of the document is stored.
create a new function
delete a function
edit a function
Click on the "Available Functions" link in the websubmit admin right menu. Then click on the "Add New Function" button.
Enter the name of the new function as well as a text description if you wish.
You will then reach a page where you can add parameters to your new function.
Don't forget to add the function file inside the/python/invenio/websubmit_functions directory and to name the file after the function. Functions must be written in Python. Here is an example implementation of a function:
/python/invenio/websubmit_functions/Get_Report_Number.py:
def Get_Report_Number (parameters,curdir,form): global rn #Path of file containing report number if os.path.exists("%s/%s" % (curdir,parameters['edsrn'])): fp = open("%s/%s" % (curdir,parameters['edsrn']),"r") rn = fp.read() rn = rn.replace("/","_") rn = re.sub("[\n\r ]+","",rn) else: rn = "" return ""
The function parameters are passed to the function through the parameters dictionary.
The curdir parameter contains the current submission directory path.
The form parameter contains the form passed to the current web page for possible reference from inside the function.
edit a function
delete a function
There are currently no way of deleting a function through this interface. Use the direct MySQL command line interface for this.
edit a function
create a function
Edit a function, add parameters to it...
Click on the "Available Functions" link in the websubmit admin right menu.
On this page appears a list of all functions defined into the system. Two columns give you access to some features:
- View function usage Click here to have access to the list of all document types and all actions in which this function is used. Then by clicking on one of the items, you will be given a chance to modify the parameters value for the given document type.
- View/Edit function details There you will be able to modify the function description, as well as add/withdraw parameters for this function.
create a new function
delete a function
This page lists and explains all the functions used in the demo provided with the CDS Invenio package. This list is not exhaustive since you can add any new function you need.
Click on one function name to get its description.
Please note in this page when we refer to [param] this means the value of the parameter 'param' for a given document type.
CaseEDS | |
description | |
This function may be used if the treatment to be done after a submission depends on a field entered by
the user. Typically this is used in an approval interface. If the referee approves then we do this. If he rejects,
then we do other thing. More specifically, the function gets the value from the file named [casevariable] and compares it with the values stored in [casevalues]. If a value matches, the function directly goes to the corresponding step stored in [casesteps]. If no value is matched, it goes to step [casedefault]. |
|
parameters | |
casevariable |
This parameters contains the name of the file in which the function will get the chosen value. Eg: "decision" |
casevalues |
Contains the list of recognized values to match with the chosen value. Should be a comma separated list of words. Eg: "approve,reject" |
casesteps |
Contains the list of steps corresponding to the values matched in [casevalue]. It should be a comma
separated list of numbers Eg: "2,3" In this example, if the value stored in the file named "decision" is "approved", then the function launches step 2 of this action. If it is "reject", then step 3 is launched. |
casedefault |
Contains the step number to go by default if no match is found. Eg: "4" In this example, if the value stored in the file named "decision" is not "approved" nor "reject", then step 4 is launched. |
Create_Modify_Interface | |
description | |
To be used in the MBI-Modify Record action. It displays a web form allowing the user to modify the fields he chose. The fields are prefilled with the existing values extracted from the documents database. This functions takes the values stored in the [fieldnameMBI] file. This file contains a list of field name separated with "+" (it is usually generated from a multiple select form field). Then the function retrieves the corresponding tag name (marc-21) stored in the element definition. Finally it displays the web form and fills it with the existing values found in the documents database. | |
parameters | |
fieldnameMBI | Contains the name of the file in which the function will find the list of fields the user wants to modify. Depends on the web form configuration. |
Create_Recid | |
description | |
This function retrieves a new record id from the records database. This record id will then be used to create the XML record afterwards, or to link with the fulltext files. The created id is stored in a file named "SN". | |
parameters | |
none |
Finish_Submission | |
description | |
This function stops the data treatment process even if further steps exist. This is used for example in the approval action. In the first step, the program determines whether the user approved or rejected the document (see CaseEDS function description). Then depending on the result, it executes step 2 or step 3. If it executes step 2, then it should continue with step 3 if nothing stopped it. The Finish_Submission function plays this role. | |
parameters | |
none |
Get_Info | |
description | |
This function tries to retrieve in the "pending" directory or directly in the documents database, some information
about the document: title, original submitter's email and author(s). If found, this information is stored in 3 global variables: $emailvalue, $titlevalue, $authorvalue to be used in other functions. If not found, an error message is displayed. |
|
parameters | |
authorFile | Name of the file in which the author may be found if the document has not yet been integrated (in this case it is still in the "pending" directory). |
emailFile | Name of the file in which the email of the original submitter may be found if the document has not yet been integrated (in this case it is still in the "pending" directory). |
titleFile | Name of the file in which the title may be found if the document has not yet been integrated (in this case it is still in the "pending" directory). |
Get_Recid | |
description | |
This function searches for the document in the database and stores the recid of this document in the "SN" file and in a global variable "sysno". The function conducts the search based upon the document's report-number (and relies upon the global variable "rn") so the "Get_Report_Number" function should be called before this one. This function replaces the older function "Get_Sysno". |
|
parameters | |
none |
Get_Report_Number | |
description | |
This function gets the value contained in the [edsrn] file and stores it in the reference global variable. | |
parameters | |
edsrn |
Name of the file which stores the reference. This value depends on the web form configuration you did. It should contain the name of the form element used for storing the reference of the document. |
Get_Sysno | |
description | |
This function searches for the document in the database and stores the system number of this document in the "SN" file and in a global variable. "Get_Report_Number" should be called before. Deprecated: Use Get_Recid instead. |
|
parameters | |
none |
Insert_Modify_Record | |
description | |
This function gets the output of bibconvert and uploads it into the MySQL bibliographical database. | |
parameters | |
none |
Insert_Record | |
description | |
This function gets the output of bibFormat and uploads it into the MySQL bibliographical database. | |
parameters | |
none |
Is_Original_Submitter | |
description | |
If the authentication module (login) is active in webSubmit, this function compares the current login with the email of the original submitter. If it is the same (or if the current user has superuser rights), we go on. If it differs, an error message is issued. | |
parameters | |
none |
Is_Referee | |
description | |
This function checks whether the currently logged user is a referee for this document. | |
parameters | |
none |
Mail_Submitter | |
description | |
This function send an email to the submitter to warn him the document he has just submitted has been correctly received. | |
parameters | |
authorfile |
Name of the file containing the authors of the document |
titleFile |
Name of the file containing the title of the document |
emailFile |
Name of the file containing the email of the submitter of the document |
status |
Depending on the value of this parameter, the function adds an additional text to the email. This parameter can be one of: ADDED: The file has been integrated in the database. APPROVAL: The file has been sent for approval to a referee. or can stay empty. |
edsrn |
Name of the file containing the reference of the document |
newrnin |
Name of the file containing the 2nd reference of the document (if any) |
Make_Modify_Record | |
description | |
This function creates the record file formatted for a direct insertion in the documents database. It uses the
BibConvert tool. The main difference between all the Make_..._Record functions are the parameters. As its name says, this particular function should be used for the modification of a record. (MBI- Modify Record action). |
|
parameters | |
modifyTemplate | Name of bibconvert's configuration file used for creating the mysql record. |
sourceTemplate | Name of bibconvert's source file. |
Make_Record | |
description | |
This function creates the record file formatted for a direct insertion in the documents database. It uses the
BibConvert tool. The main difference between all the Make_..._Record functions are the parameters. As its name does not say :), this particular function should be used for the submission of a document. |
|
parameters | |
createTemplate | Name of bibconvert's configuration file used for creating the mysql record. |
sourceTemplate | Name of bibconvert's source file. |
Move_From_Pending | |
description | |
This function retrieves the data of a submission which was temporarily stored in the "pending" directory (waiting for an approval for example), and moves it to the current action directory. | |
parameters | |
none |
Move_to_Done | |
description | |
This function moves the existing submission directory to the /opt/cds-invenio/var/data/submit/storage/done directory. If the Then it tars and gzips the directory. | |
parameters | |
none |
Move_to_Pending | |
description | |
This function moves the existing submission directory to the /opt/cds-invenio/var/data/submit/storage/pending directory. It is used to store temporarily this data until it is approved or... | |
parameters | |
none |
Print_Success | |
description | |
This function simply displays a text on the screen, telling the user the submission went fine. To be used in the "Submit New Record" action. | |
parameters | |
status |
Depending on the value of this parameter, the function adds an additional text to the email. This parameter can be one of: ADDED: The file has been integrated in the database. APPROVAL: The file has been sent for approval to a referee. or can stay empty. |
edsrn |
Name of the file containing the reference of the document |
newrnin |
Name of the file containing the 2nd reference of the document (if any) |
Print_Success_APP | |
description | |
This function simply displays a text on the screen, telling the referee his decision has been taken into account. To be used in the Approve (APP) action. | |
parameters | |
none |
Print_Success_MBI | |
description | |
This function simply displays a text on the screen, telling the user the modification went fine. To be used in the Modify Record (MBI) action. | |
parameters | |
none |
Print_Success_SRV | |
description | |
This function simply displays a text on the screen, telling the user the revision went fine. To be used in the Submit New File (SRV) action. | |
parameters | |
none |
Report_Number_Generation | |
description | |
This function is used to automatically generate a reference number. After generating the reference, the function saves it into the [newrnin] file and sets the global variable containing this reference. |
|
parameters | |
autorngen |
If set to "Y": The reference number is generated. If set to "N": The reference number is read from a file ([newrnin]) If set to "A": The reference number will be the access number of the submission. |
counterpath |
indicates the file in which the program will find the counter for this reference generation. The value of this parameter may contain one of: "<PA>categ</PA>": in this case this string is replaced with the content of the file [altrnin] "<PA>yy</PA>": in this case this string is replaced by the current year (4 digits) if [altyeargen] is set to "AUTO", or by the content of the [altyeargen] file in any other case. (this content should be formatted as a date (dd/mm/yyyy). "<PA>file:name_of_file</PA>": in this case, this string is replaced by the first line of the given file "<PA>file*:name_of_file</PA>": in this case, this string is replaced by all the lines of the given file, separated by a dash ('-') character. |
rnformat |
This is the format used by the program to create the reference. The program computes the value of the
parameter and appends a "-" followed by the current value of the counter increased by 1. The value of this parameter may contain one of: "<PA>categ</PA>": in this case this string is replaced with the content of the file [altrnin] "<PA>yy</PA>": in this case this string is replaced by the current year (4 digits) if [altyeargen] is set to "AUTO", or by the content of the [altyeargen] file in any other case. (this content should be formatted as a date (dd/mm/yyyy). "<PA>file:name_of_file</PA>": in this case, this string is replaced by the first line of the given file "<PA>file*:name_of_file</PA>": in this case, this string is replaced by all the lines of the given file, separated by a dash ('-') character. |
rnin | This parameter contains the name of the file in which the program will find the category if needed. The content of thif file will then replace the string <PA>categ</PA> in the reference format or in the counter path. |
yeargen |
This parameter can be one of: "AUTO": in this case the program takes the current 4 digit year. "<filename>": in this case the program extract the year from the file which name is <filename>. This file should contain a date (dd/mm/yyyy). |
edsrn | Name of the file in which the created reference will be stored. |
Send_Approval_Request | |
description | |
This function sends an email to the referee in order to start the simple approval process. This function is very CERN-specific and should be changed in case of external use. Must be called after the Get_Report_Number function. |
|
parameters | |
addressesDAM |
email addresses of the people who will receive this email (comma separated list). this parameter may contain the <CATEG> string. In which case the variable computed from the [categformatDAM] parameter replaces this string. eg.: "<CATEG>-email@cern.ch" |
categformatDAM |
contains a regular expression used to compute the category of the document given the reference of the document. eg.: if [categformatAFP]="TEST-<CATEG>-.*" and the reference of the document is "TEST-CATEGORY1-2001-001", then the computed category equals "CATEGORY1" |
authorfile | name of the file in which the authors are stored |
titlefile | name of the file in which the title is stored. |
directory | parameter used to create the URL to access the files. |
Send_APP_Mail | |
description | |
Sends an email to warn people that a document has been approved. | |
parameters | |
addressesAPP |
email addresses of the people who will receive this email (comma separated list). this parameter may contain
the <CATEG> string. In which case the variable computed from the [categformatAFP] parameter
replaces this string. eg.: "<CATEG>-email@cern.ch" |
categformatAPP |
contains a regular expression used to compute the category of the document given the reference of the
document. eg.: if [categformatAFP]="TEST-<CATEG>-.*" and the reference of the document is "TEST-CATEGORY1-2001-001", then the computed category equals "CATEGORY1" |
newrnin | Name of the file containing the 2nd reference of the approved document (if any). |
edsrn | Name of the file containing the reference of the approved document. |
Send_Modify_Mail | |
description | |
This function sends an email to warn people a document has been modified and the user his modifications have been taken into account.. | |
parameters | |
addressesMBI | email addresses of the people who will receive this email (comma separated list). |
fieldnameMBI | name of the file containing the modified fields. |
sourceDoc | Long name for the type of document. This name will be displayed in the mail. |
emailfile | name of the file in which the email of the modifier will be found. |
Send_SRV_Mail | |
description | |
This function sends an email to warn people a revision has been carried out. | |
parameters | |
notefile | name of the file in which the note can be found |
emailfile | name of the file containing the submitter's email |
addressesSRV |
email addresses of the people who will receive this email (comma separated list). this parameter may contain the <CATEG> string. In which case the variable computed from the [categformatDAM] parameter replaces this string. eg.: "<CATEG>-email@cern.ch" |
categformatDAM |
contains a regular expression used to compute the category of the document given the reference of the
document. eg.: if [categformatAFP]="TEST-<CATEG>-.*" and the reference of the document is "TEST-CATEGORY1-2001-001", then the computed category equals "CATEGORY1" |
Test_Status | |
description | |
This function checks whether the considered document has been requested for approval and is still waiting for approval. It also checks whether the password stored in file "password" of the submission directory corresponds to the password associated with the document.. | |
parameters | |
none |
Update_Approval_DB | |
description | |
This function updates the approval database when a document has just been approved or rejected. It uses
the [categformatDAM] parameter to compute the category of the document. Must be called after the Get_Report_Number function. |
|
parameters | |
categformatDAM |
It contains the regular expression which allows the retrieval of the category from the reference number. Eg: if [categformatDAM]="TEST-<CATEG>-.*" and the reference is "TEST-CATEG1-2001-001" then the category will be recognized as "CATEG1". |
Upload_Files | |
description | |
This function displays the list of already transfered files (main and additional ones), and also outputs an html form for uploading other files (pictures or fulltexts). | |
parameters | |
maxsize | Maximum allowed size for the transfered files (size in bits) |
minsize | Minimum allowed size for the transfered files (size in bits) |
iconsize | In case the transfered files are pictures (jpg, gif or pdf), the function will automatically try to create icons from them. This parameter indicates the size in pixel of the created icon. |
type | This can be one of "fulltext" or "picture". If the type is set to "picture" then the function will try to create icons (uses the ImageMagick's "convert" tool) |
create a new function
delete a function
edit a function
In webSubmit, you can restrict the use of some actions on a given document type to a list of users. You can use the webAccess manager for this.
Let's say you want to restrict the submission of new TEXT documents to a given user. You should then create a role in webAccess which will authorize the action "submit" over doctype "TEXT" and act "SBI" (Submit new record). You can call this role "submitter_TEXT_SBI" for example. Then link the role to the proper users.
Another example: if you wish to authorize a user to Modify the bibliographic data of PICT documents, you have to create a role which authorize the action "submit" over doctype "PICT" and act "MBI". This role can be called "submitter_PICT_MBI" or whatever you want.
If no role is defined for a given action and a given document type, then all users will be allowed to use it.
This feature allows you to organise the way webSubmit main page will look like. You will be able to group document types inside catalogues and order the catalogues the way you wish.
Click on the "Organisation" link in the websubmit admin right menu.
Once on the "Edit Catalogues page", you will find the currently defined organisation chart in the middle of the page. To the right, one form allows you to create a new catalogue ("Add a Catalogue") and one to add a document type to an existing catalogue ("Add a document type").
- To add a catalogue: Enter the name of your new catalogue in the "Catalogue Name" free text field then choose to which existing catalogue this one will be attached to. If you attach the new one to an already existing catalogue, you can create a sub-catalogue. To actually create it, click on "ADD".
- To add a document type to a catalogue: Choose in the list of existing "Document type names" the one you want to add to the chart. Then choose to which catalogue the document type will be associated. Click on "ADD" to finalise this action.
- To withdraw a document type or a catalogue from the chart: Click on the red cross next to the item you want to withdraw. If you withdraw a catalogue all document types attached to it will be withdrawn also (of course the actual document types in webSubmit won't be destroyed!).
- To move a document type or a catalogue in the chart: Use the small up and down arrows next to the document type/catalogue title.
Create a New Document Type
document types
WebSubmit stores the data gathered during a submission in a directory. In this directory each file corresponds to a field saved during the submission.
BibConvert is used to create a formatted file which will be easy to upload in the bibliographical database from this directory.
This BibConvert program is called from the Make_Record and Make_Modify_Record functions from the end script system of webSubmit.
The BibConvert configuration files used by webSubmit are in the/bibconvert/config directory.
For more info about bibconvert, please see the dedicated guide.
Yes, it is. Edit the config.wml file in CDS Invenio distribution, find the "ADMINEMAIL" definition and set it to your email address. You will then receive all the warning emails issued by the manager.Q2. Where are all the files stored in this system?
Q3. How is the documents archive organised?the counter files are here: /opt/cds-invenio/var/data/submit/counters. There are used by the Report_Number_Generation function. all running and completed submissions are stored here: /opt/cds-invenio/var/data/submit/storage. all the document files attached to records are stored here: /opt/cds-invenio/var/data/files. all python functions used by webSubmit are stored here: /python/invenio/websubmit_functions
First of all, the documents files attached to records are stored here: /opt/cds-invenio/var/data/files.
The Upload_Files webSubmit function is used to link a document with a record.
All documents get an id from the system and are stored in the "bibdoc" table in the database. The link between a document and a record is stored using the "bibdoc_bibrec" table.
The document id is used to determine where the files are stored. For example the files of document #14 will be stored here: /opt/cds-invenio/var/data/files/g0/14
The subdirectory g0 is used to split the documents accross the filesystem. The CFG_FILE_DIR_SIZE variable from config.wml determines how many documents will be stored under one subdirectory.
Several files may be stored under the same document directory: they are the different formats and versions of the same document. Versions are indicated by a string of the form ";1.0" concatenated to the name of the file.
notes