Edit WebSubmit Function

Main Menu

Enter Function Details:

Register_Approval_Request Function Details:
   
Function Name: Register_Approval_Request
Function Description:
Function Documentation:
This function is used at the time of a "request for approval" submission
in order to register the request in the WebSubmit "Approvals" DB
(sbmAPPROVAL).
At the time of approval request, the document could be in one of
several different approval "states" and depending upon that state,
the action taken by this function differs. The states are as
follows:
      * Approval for the document has never been requested.
         -> In this case, a new row for the document is inserted into the
            approvals table with the "waiting" state.
      * Approval of the document has previously been requested and it is
        still in the "waiting" state.
         -> In this case, the date of last request for the document is
            updated in the approvals table.
      * Approval of the document has previously been requested, but the
        document was rejected.
         -> In this case, the function will halt the submission with a
            message informing the user that approval of the document was
            already rejected.
      * Approval of the document has previously been requested and it has
        been approved.
         -> In this case, the function will halt the submission with a
            message informing the user that the document has already
            been approved and that no further action is necessary.
      * Approval of the document has previously been requested, but the
        request withdrawn.
         -> In this case, the function will update the "approval status"
            of the document to "waiting" and will return a message
            informing the user that although the approval request was
            previously withdrawn, it has been requested again.

@param categ_file_appreq: (string) - some document types are
       separated into different categories, each of which has its own
       referee(s).
       In such document types, it's necessary to know the document-
       type's category in order to choose the referee.
       This parameter provides a means by which the category information
       can be extracted from a file in the current submission's working
       directory. It should therefore be a filename.

@param categ_rnseek_appreq: (string) - some document types are
       separated into different categories, each of which has its own
       referee(s).
       In such document types, it's necessary to know the document-
       type's category in order to choose the referee.
       This parameter provides a means by which the category information
       can be extracted from the document's reference number.
       It is infact a string that will be compiled into a regexp and
       an attempt will be made to match it agains the document's reference
       number starting from the left-most position.
       The only pre-requisite is that the segment in which the category is
       sought should be indicated with .
       Thus, an example might be as follows:
          ATL(-COM)?--.+
       This would allow "PHYS" in the following reference number to be
       recognised as the category:
          ATL-COM-PHYS-2008-001

@param note_file_appreq: (string) - the name of the file from which
       any "notes" to be added into the approval request's "note" field in
       the database are to be read. (File must be in the current submission's
       working directory.)

@return: (string) - a message for the user.

@Exceptions raised: + InvenioWebSubmitFunctionStop when the submission
                      should be halted.
                    + InvenioWebSubmitFunctionError when an unexpected
                      error has been encountered and execution cannot
                      continue.
 

Parameters for Function Register_Approval_Request:

Parameter  
None

Add Parameter to Function Register_Approval_Request:
Add Parameter: Select a parameter to add to function:    -Or-  Enter a new parameter: