PBS functionality

PBS represents a version of the tree structure (initially from Product Breakdown Structure). It is a set of root nodes with children + some meta data + reference to previous version of the tree.


pbs_list_types

returns list of all possible types of pbs

QUERY_FUNCTION pbs_list_types: LIST OF STRING


pbs_create

initializes pbs in target model (could be executed once in target model life cycle), the first instance of pbs (current, open for editing version) is created. Implicitly created by the first person with login equal to login of logged in user.

QUERY_FUNCTION pbs_create(subject: v_pbs): v_pbs;

Parameters:
subject input parameters of initialized pbs, see v_pbs
There are ignored values of the following attributes
  • subject.item.instance_id
  • subject.item.introduced (replaced with time stamp)
  • subject.item.created (the baseline is associated with logged in user)
  • subject.nodus.ancestor (unset)
  • subject.nodus.version (unset)
  • subject.nodus.nodes (unset)
  • subject.nodus.item.instance_id

Returns actual attributes of the newly created pbs (see v_pbs)


pbs_get

gets pbs meta data specified by its version tag

QUERY_FUNCTION pbs_get(version: STRING): v_pbs

Parameters:
version string with version tag of the interesting pbs it could be empty - current or latest pbs state would be retuned

Returns meta data or specified pbs (see v_pbs)


pbs_get_whole_tree

gets whole tree of specified pbs

QUERY_FUNCTION pbs_get_whole_tree(version: STRING): t_nodus

Parameters:
version string with version tag of the interesting pbs it could be empty - current or latest pbs state would be retuned

Returns whole tree of specified pbs (see t_nodus)


pbs_fix_version

stores (fixes) state of current pbs state as a version and optionally creates successor of the version to be available for updates. Logged in user shall be associated with a person granted with administrative privileges over whole pbs (ADMIN_TYPE for person or group where the person is registered)

QUERY_FUNCTION pbs_fix_version( version : STRING; create_current : BOOLEAN) : v_pbs

Parameters:
version string to name the stored version, it can be empty and system generates automatic tag for the version; the parameter could be used to specify existing version what shall be used to extend into current state of the pbs available for updates
create_current TRUE to generate successor of the fixed version - so named "current state" of pbs available for editing and updating FALSE to finalize pbs - there no any current state available for editing

Returns fixed version data (see v_pbs)


pbs_extract

extracts specified pbs version (or current state) including child nodes in whole depth from target model with or without its history

QUERY_FUNCTION pbs_extract(
   version        : STRING;
   with_history   : BOOLEAN;
   user_comment,
   target_model,
   PDI_file       : STRING): STRING
Parameters:
version name of stored version, it can be empty to extract current state of the pbs to export
with_history TRUE to include into extraction all prev. versions
user_comment comment from user who call to the function to be stored for the pbs
target_model qualified name of the target model in form "rep_name.mod_name"
PDI_file name for output file with PDI information of the pbs

Returns qualified name of target model


pbs_extract_ext

the same as pbs_extract with extended output

QUERY_FUNCTION pbs_extract_ext(
   version        : STRING;
   with_history   : BOOLEAN;
   user_comment,
   target_model,
   PDI_file       : STRING):  extract_result
Parameters:
version name of stored version, it can be empty to extract current state of the pbs to export
with_history TRUE to include into extraction all prev. versions
user_comment comment from user who call to the function to be stored for the pbs
target_model qualified name of the target model in form "rep_name.mod_name"
PDI_file name for output file with PDI information of the pbs

Returns structure extract_result with the following attributes


pbs_export

converts specified master model population into AP209 and pack it into a file ready to be downloaded by client

QUERY_FUNCTION pbs_export(
   source_model,
   downloading_file,
   convertor_log     : STRING): STRING
Parameters:
source_model qualified name of SimDM master model to be converted/exported, like "my_repository.my_model"
downloading_file file name to be downloaded then
convertor_log file name for a log of the converting

Returns qualified name of target AP209 model


pbs_update

updates data of current state of pbs. It is not possible to update versions. Logged in user shall be granted in scope of the target Logged in user shall be associated with a person granted with writing privileges over whole pbs (EDITOR_TYPE or ADMIN_TYPE for the person or group where the person is registered)

QUERY_FUNCTION pbs_update(subject: v_pbs): v_pbs

Parameters:
subject input (see v_pbs) to specify subject of the update (subject.nodus.item.instance_id) and updated data.
Value of subject.nodus.ancestor is ignored (left the original)

Returns structure of updated current state of pbs (see v_pbs)


pbs_info

collects and returns some generic info over specified version of pbs or its current state
No any special access rights is required to call the query

QUERY_FUNCTION pbs_info( version : STRING; current_only : BOOLEAN): LIST OF info_line

Parameters:
version name of pbs version to get information, it can be empty to inform latest version of the pbs
current_only reserved

Returns collected information in a list of name/value strings (see info_line) with the following information


pbs_check

checks whole pbs validity

QUERY_FUNCTION pbs_check: LIST OF STRING

Returns validation log in free form


pbs_get_edm_users

returns list of logins registered in target EDM database the same as system_login_list

QUERY_FUNCTION pbs_get_edm_users: LIST OF STRING

Returns list of logins registered in target EDM database


pbs_merge

imports root nodes from specified SimDM model into the target population making them root nodes of the current PBS state

QUERY_FUNCTION pbs_merge(
   source_model   : STRING;
   source_item_id : INTEGER;
   target_version,
   user_comment,
   fork_date      : STRING):  v_comment
Parameters:
source_model fully specified source model in format: [repository_name].[model_name]
source_item_id optional id of pbs or node in target population if source_item_id is pbs - all its child nodes are subject to merge into target model, if source_item_id is node - the node (with all its children) are subject to merge by default (0) current or final state of source pbs is merged
target_version optional version tag of the target PBS, by default merge is done into current state of PBS
user_comment text of user comment to be added to target pbs as the merge log
fork_date optional time stamp in TIMESTAMP_FORMAT that keep date time of the sources export from target model the date is required to resolve merge conflicts

Returns user comment (see v_comment)


pbs_search

provides textual search over the target model

QUERY_FUNCTION pbs_search(
   pattern           : STRING;
   roles             : SET OF STRING;
   case_sensitive,
   exact_match       : BOOLEAN;
   domain            : INTEGER;
   domains           : LIST OF STRING;
   latest_version    : BOOLEAN;
   before,
   after             : STRING;
   creators          : LIST OF INTEGER;
   types             : LIST OF STRING;
   page,
   start_from        : INTEGER): LIST OF v_pbs_item
Parameters:
pattern (optional) text value search pattern (argument of LIKE function), specified some string attribute of the items to search
for example: "Lion", "*date", "XPX*"
by default: "*"
roles (optional)text value roles, from the following:
  • 'EXTERNAL_FILE.LINK'
  • 'FILE_SOURCE.PRODUCED_BY'
  • 'FILE_SOURCE.INTERFACE'
  • 'UPLOADED_FILE.OS'
  • 'UPLOADED_FILE.ORIGINAL_NAME'
  • 'UPLOADED_FILE.ORIGINAL_FORMAT'
  • 'PBS_ITEM.NAME', or any pbs_item derived
  • 'PBS_ITEM.DESCRIPTION', or any pbs_item derived
  • 'NODUS.VERSION_TAG', or 'PBS.' or 'NODE.'
  • 'PBS.PARENTS',
  • 'NODE.ID',
  • 'BASELINE.EXPORTED_TO',
  • 'PERSON.LOGIN',
  • 'PROPERTY.UNITS',
  • 'PROPERTY.DEFAULT_VALUE',
  • 'ASSIGNED_PROPERTY.VALUES',
  • 'FILE_SPEC.EXTENSION', or 'EDM_COMPATIBLE_FILE.' or 'CAX_SPEC.' or 'VALIDATION_RESULTS.'
  • 'EDM_COMPATIBLE_FILE.EXPRESS_SCHEMA',
  • 'EDM_COMPATIBLE_FILE.PRODUCED_MODEL'
case_sensitive (optional) FALSE to ignore case of the text pattern
exact_match (optional) TRUE to escape wild card symbols in the text pattern
domain (optional) search domain (some node_collection), if specified the return result is filtered in respect of the data - they shall belong to the collection or its children
domains (optional) types (like 'ANALYSIS', 'DESIGN'...) of the domains for items to search (ignored if domain is set)
latest_version (optional) TRUE to filter search results only within latest versions of nodes
before (optional) time stamp - upper limit (less or equal) of last changed in interesting items
after (optional) time stamp lower limit (greater or equal) of last changed in interesting items
creators (optional) list of EDM db id-s of the interesting items creators/editors
types (optional) interesting item types in string format, see v_item.item_type ('DESIGN', 'ANALYSIS')
page max number of hits to return
start_from return found result starting from the index

Returns list of found items (see v_pbs_item)


pbs_assignments_select

returns assignments of the specified pbs items, the assignments are filtered by access rights and input parameters

QUERY_FUNCTION pbs_assignments_select(
   pbs_items         : LIST OF INTEGER;
   domain            : INTEGER;
   domains           : LIST OF STRING;
   latest_version    : BOOLEAN;
   before,
   after             : STRING;
   creators          : LIST OF INTEGER;
   page,
   start_from        : INTEGER): LIST OF v_assigned_item
Parameters:
pbs_items list of pbs items which assignments are interesting it could mixed list of persons, organizations, approvals, methods, properties
domain (optional) domain of the searched assignments: if set all assignments out of the domain are ignored
domains (optional) types of domains of the searched assignments: if set assignments are searched in domain of the listed types NOTE: the filter is used only in case of unset domain
latest_version (optional) TRUE to filter collects assignments only within latest versions of their domains
before (optional) time stamp - upper limit (less or equal) of last changed in interesting items, could be unset in this case searched assignments do not have upper limit of time stamp
after (optional) time stamp - lower limit (greater or equal) of last changed in interesting items, could be unset and the limitation is ignored in the case
creators (optional) list of EDM db id-s for the interesting assignments creators, could be unset and the limitation is ignored in the case
page (optional) max number of hits
start_from (optional) return found result starting from the index

Returns found assignments (see v_assigned_item)


pbs_get_my_access

checks access level of logged in user over the target pbs

QUERY_FUNCTION pbs_get_my_access: STRING

Returns one of the following:

pbs_get_notifications

returns all notifications after specified date

QUERY_FUNCTION pbs_get_notifications(after: STRING): LIST OF v_notifications

Parameters:
after date in format "YYYY/MM/DD hh:mm:ss" to specify time of the notifications

Returns found notifications (see v_notifications)


Back to Home page