Person

Person is a data base user registration in SimDM data model. The registration specifies data base login and could define default access type/role of the user (administrator, manager, editor, reader) against the model. Data base user should be registered (has corresponding person instance) in target model to work with its content.

person_list_types

returns list of types acceptable for persons in target model

QUERY_FUNCTION person_list_types: LIST OF STRING


person_create

registers new person 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 whole pbs (ADMIN_TYPE for the person or group where the person is registered)

QUERY_FUNCTION person_create(subject: v_person): v_person

Parameter:
subject input parameter of the person, see v_person
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 person (see v_person)


person_create_by_login

checks if a person with login of the logged in data base user is registered and if not creates it with ADMIN_TYPE access rights using current user login name. All other parameters are set by default.

NOTE: temporary depricated functionality to avoid troubles with access rights

QUERY_FUNCTION person_create_by_login: v_person

Returns attributes of registered person (see v_person)


person_get

gets data of a person 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 person_get(id: INTEGER): v_person

Parameter:
id id of the person instance

Returns actual data of the required person (see v_person)


person_list

lists data of person 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 person_list(ids: LIST OF INTEGER): LIST OF v_person

Parameter:
ids list of interesting person instance id-s

Returns list of actual data of the persons (see v_person)


person_get_by_login

fetches data of persons specified by its login.

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 person_get_by_login(id: STRING): v_person

Parameter:
id data base login of the person

Returns actual data of the required person (see v_person)


person_get_me

fetches data of persons associated with logged in user

QUERY_FUNCTION person_get_me: v_person

Returns actual data of the logged in user (see v_person)


person_select

persons search is not implemented in current realize
QUERY_FUNCTION person_select(
      pbs,
      organization      : INTEGER;
      version           : STRING;
      role              : STRING):  LIST OF v_person
Parameters:
pbs (optional) instance id of parent pbs
organization (optional) instance id of hosting organisation|group
version (optional) version of parent PBS
role (optional) person's type/role

Returns list of found persons (see v_person)


person_update

updates data of person registered before. The person 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 person_update(subject: v_person): v_person

Parameter:
subject updated data of the person definition to be updated in model (see v_person)
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 person definition (see v_person)


person_cancel

cancels person registration that specified by its instance id in the target model. The person is declared as cancelled and could not be used any more in references after that. The instance of the person 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 person_cancel(id: INTEGER): BOOLEAN

Parameter:
id instance id of the person to be cancelled

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

Back to Home page