Assigned Organization

Assigned Organization is a relationship between organization (group of SimDM users/persons) and a node (and whole its branch) of SimDM tree. The assignment could be used to specify owner of the node/branch and to establish access rights of the organization members to the node/branch. Access rights are defined by the assignment type/role (if set) or by default - type/role of the organization/group (if set) or in the last case by individual types/roles of its members.

assigned_organization_list_types

returns list of all acceptable types/roles of an organization assignments for the specified node

QUERY_FUNCTION assigned_organization_list_types(id: INTEGER): LIST OF STRING

Parameter:
id (optional) assigning node instance id

assigned_organization_create

assigns organization (group of persons) to node in current state of pbs according to specified input

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

QUERY_FUNCTION assigned_organization_create(subj: v_assigned_organization): v_assigned_organization

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

Returns actual attributes of the newly created assignment (see v_assigned_organization)


assigned_organization_get

gets data of a organization 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_organization_get(id: INTEGER): v_assigned_organization

Parameter:
id id of the assigned organization instance

Returns actual data of the required assignment (see v_assigned_organization)


assigned_organization_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_organization_list(ids: LIST OF INTEGER): LIST OF v_assigned_organization

Parameter:
ids list of interesting assignments instance id-s

Returns list of actual data of the required assignments (see v_assigned_organization)


assigned_organization_select

assignments search is not implemented in current realize
QUERY_FUNCTION assigned_organization_select(
      node,
      organization,
      creator           : INTEGER;
      before,
      after             : STRING;
      organization_type,
      assignment_type   : STRING)  :  LIST OF v_assigned_organization
Parameters:
node (optional) instance id of parent node
organization (optional) instance id of organization 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"
organization_type (optional) type/role of organization definition
assignment_type (optional) type/role of organization assignment

Returns list of found assignments (see v_assigned_organization)


assigned_organization_update

updates data of assigned organization. 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 the node of the assignment (ADMIN_TYPE for the person or group where the person is registered)

QUERY_FUNCTION assigned_organization_update(subject: v_assigned_organization): v_assigned_organization

Parameter:
subject updated data of the assignment to be updated in model (see v_assigned_organization).
Target instance is specified by subject.item.instance_id

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 organization (see v_assigned_organization)


assigned_organization_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_organization_delete(id: INTEGER): v_assigned_organization

Parameter:
id instance id of the assignment to be removed

Returns TRUE

Back to Home page