OpenACS Relationship

acs_rels is a powerful mechanism in [OpenACS]/]po[ to express a relationship between two objects. There seem to be no (more) detailed documentation about the group system on [OpenACS] (please contact us if you should be aware of any documentation to include), so this page tries to explain the basics.



Conceptual Base

The [OpenACS] relationship mechanism seems to be based on the Object Role Modelling modelling method. However, it also seems to bear similarites with roles in Description Logics even though the inference component is missing.


Simple Relationships


Even though conceptually somehow dirty, rels can be used as a convenient way to create N x M mapping table between objects. To create a relationship, just call the PL/SQL function acs_rel__new() with suitable parameters. In particular, please choose a valid "rel_type" from the acs_rel_types table.

If no existing rel_type should suit your needs, you can create interactively new rel_types using OpenACS maintenance tables at the URL http://<your_server>/admin/rel-types/.

Structure of the acs_rels database table:

    Column     |          Type          | Modifiers
 rel_id        | integer                | not null
 rel_type      | character varying(100) | not null
 object_id_one | integer                | not null
 object_id_two | integer                | not null

Sub-Types of acs_rel in ]po[


The following sub-types of acs_rel are used in ]po[. The arguments in parenthesis specify a constraint on the object types of the two legs of the relationship (object_id_one and object_id_two).


  • relationship (acs_object, acs_object) - Generic relationship
  • [composition_rel] (group, group) - Group - sub-group relationship forming the group hierarchy
  • [membership_rel] (group, person) - Defines if a person is member of a group.
  • [admin-rel] (group, person) - Defines persons with administration rights on a specific group (not used in ]po[).
  • [user_portrait_rel] (user, content_item) - Defines one or more portraints for a user.
  • [im_biz_object_member] (acs_object, person) - Defines a ]po[ users's membership of a business object.
  • [im_conf_item_project_rel] (im_project, im_conf_item) - Defines relationships between ITSM configuration items (=inventory) and their projects.
  • [im_release_item] (im_project, acs_object) - Defines a list of [release items] associated to a (release-) project.
  • [user_blob_response_rel] (user, content_item)
  • im_ticket_ticket_rel (im_project, im_ticket) - Relationship between an original helpdesk ticket and a derived ticket.
  • [im_company_employee_rel] (im_company, person) - A rel between a company and a person emplyed by the company. This is used as a sub-relationship of im_biz_object_member, particular in the contacts package. Disjoint with im_key_account_rel.
  • [im_key_account_rel] (im_company, person) - A rel between a company an a person (from the ]po[ "internal" company) handling the company. Disjoint with im_company_employee_rel.

For more information on the data model please seee the [relationships data-model overview].



  Contact Us
  Project Open Business Solutions S.L.

Calle Aprestadora 19, 12o-2a

08902 Hospitalet de Llobregat (Barcelona)


 Tel Europe: +34 609 953 751
 Tel US: +1 415 200 2465