Assigned Approval

Assigned Approval is a relationship between some generic approval and a node of SimDM tree issued some responsible person.

assigned_approval_list_types

returns list of all possible types of the approval assignments for the specified node

QUERY_FUNCTION assigned_approval_list_types(id: INTEGER; ms_type: STRING): LIST OF STRING

Parameter:
id (optional) assigning node or task instance id
ms_type 'NODE' or 'TASK' to distinguish id

assigned_approval_create

assigns some approval to a node according to input

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

QUERY_FUNCTION assigned_approval_create(subj: v_assigned_approval): v_assigned_approval

Parameter:
subj input for the assignment, see v_assigned_approval
the following attributes are mandatory:
  • subject.assignment - approval instance id
  • subject.domain - specification of assigned node/task, see specified_master_item
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 assigned approval (see v_assigned_approval)


assigned_approval_get

gets data of a approval assignment specified by its instance id

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

QUERY_FUNCTION assigned_approval_get(id: INTEGER): v_assigned_approval

Parameter:
id id of the assigned approval instance

Returns actual data of the required assigned approval (see v_assigned_approval)


assigned_approval_list

lists data of assignments specified by list of their instance id-s. Normally source of the the list is v_node returned by node_get

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

QUERY_FUNCTION assigned_approval_list(ids: LIST OF INTEGER): LIST OF v_assigned_approval

Parameter:
ids list of interesting assigned approval instance id-s

Returns list of actual data of the required assigned approvals (see v_assigned_approval)


assigned_approval_select

assigned approvals search is not implemented in current realize
QUERY_FUNCTION assigned_approval_select(
      node,
      approval,
      creator           : INTEGER;
      before,
      after             : STRING;
      approval_type,
      assignment_type   : STRING)  :  LIST OF v_assigned_approval
Parameters:
node (optional) instance id of parent node
approval (optional) instance id of approval definition
creator (optional) instance id of simdm person who introduced the assignments
before (optional) later date/time of the assignment in format "YYYY/MM/DD hh:mm:ss"
after (optional) earlier date/time of the assignment in format "YYYY/MM/DD hh:mm:ss"
approval_type (optional) type of approval definition
assignment_type (optional) type of approval assignment

Returns list of found assigned properties (see v_assigned_approval)


assigned_approval_update

updates data of assigned approval. The assignment is specified by its instance id

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

QUERY_FUNCTION assigned_approval_update(subject: v_assigned_approval): v_assigned_approval

Parameter:
subject updated data of the assignment to be updated in model (see v_assigned_approval).

The following attributes are ignored:

  • subject.domain - is leaved in parent node
  • 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 assigned approval (see v_assigned_approval)


assigned_approval_delete

removes assignment specified by its instance id from the current state of pbs

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

QUERY_FUNCTION assigned_approval_delete(id: INTEGER): v_assigned_approval

Parameter:
id instance id of the assignment to be removed

Returns TRUE

Back to Home page