Approval

Approval is a definition of a generic personal confirmation (any - either positive or negative) of anything. The approval could be then assigned to a node or task.

approval_list_types

returns list of types acceptable for approvals in target PBS

QUERY_FUNCTION approval_list_types: LIST OF STRING


approval_create

creates new approval definition in current state of pbs according to provided input

To call the query logged in user shall be associated with a person granted with administrative privileges over whole pbs (ADMIN_TYPE for the person or group where the person is registered)

QUERY_FUNCTION approval_create(subject: v_approval): v_approval

Parameter:
subject input parameter of the approval, see v_approval
some attributes of the input are ignored, like the following:
  • subject.item.instance_id - generated
  • subject.item.cancelled - set to FALSE
  • subject.item.creator - set to logged in user
  • subject.item.last_changed - set to date/time of the call
  • subject.item.last_editor - set to logged in user
  • subject.item.comments - unset
  • subject.item.events - is populated with a creation event

Returns actual attributes of the newly registered approval (see v_approval)


approval_get

gets data of a approval definition specified by its instance id

To call the query logged in user shall be associated with a person granted with reader privileges over whole pbs (READER_TYPE, EDITOR_TYPE, ADMIN_TYPE for the person or group where the person is registered)

QUERY_FUNCTION approval_get(id: INTEGER): v_approval

Parameter:
id id of the approval instance

Returns actual data of the required approval (see v_approval)


approval_list

lists data of approval definitions specified by list of their instance id. Normally source of the the list is v_pbs returned by pbs_get

To call the query logged in user shall be associated with a person granted with reader privileges over whole pbs (READER_TYPE, EDITOR_TYPE, ADMIN_TYPE for the person or group where the person is registered)

QUERY_FUNCTION approval_list(ids: LIST OF INTEGER): LIST OF v_approval

Parameter:
ids list of interesting properties instance id-s

Returns list of actual data of the required properties (see v_approval)


approval_select

properties search is not implemented in current realize
QUERY_FUNCTION approval_select(
      pbs,
      creator           : INTEGER;
      version,
      kind              : STRING)  :  LIST OF v_approval
Parameters:
pbs (optional) instance id of parent pbs
creator (optional) instance id of person who introduced the approval
version (optional) version of PBS where the approval was introduced
kind (optional) approval type

Returns list of found properties (see v_approval)


approval_update

updates data of approval defined before. The approval is specified by its instance id

To call the query logged in user shall be associated with a person granted with administrative privileges over whole pbs (ADMIN_TYPE for the person or group where the person is registered)

QUERY_FUNCTION approval_update(subject: v_approval): v_approval

Parameter:
subject updated data of the approval definition to be updated in model (see v_approval)
Target instance specified by subject.item.instance_id

The following attributes are ignored:

  • subject.item.introduced - is leaved as before
  • subject.item.creator - is leaved as before
  • subject.item.last_changed - set to current date/time
  • subject.item.last_editor - set to calling user
  • subject.item.comments - is leaved as before
  • subject.item.event - is added with update event

Returns actual data of the updated approval definition (see v_approval)


approval_cancel

cancels approval definition specified by its instance id in the target pbs. The approval is declared as cancelled and could not be used any more in references after that. The instance of the approval can be even removed from the model if it was not used in any relationships

To call the query logged in user shall be associated with a person granted with administrative privileges over whole pbs (ADMIN_TYPE for the person or group where the person is registered)

QUERY_FUNCTION approval_cancel(id: INTEGER): BOOLEAN

Parameter:
id instance id of the approval to be cancelled

Returns TRUE if the instance deleted (was not used), FALSE if just cancelled

Back to Home page