Organization DSL

From OS.bee documentation
Revision as of 21:09, 26 July 2017 by Cmollik (Talk | contribs) (position=)

Jump to: navigation, search

Introduction

OrganizationDSL is used to define the organizations and their positions. The roles which are defined in Authorization DSL could be assigned to the positions here.

OrganizationDSL

The OrganizationDSL is working at runtime. It used to define the organizations, their positions and assign the roles to them. There will be no exported file generated after editing the model. Each user should have its own position, and the roles defined in Authorization DSL could be assigned to the positions. The authorization of user will be done according to the authorization rules of roles at runtime.

The main semantic elements of the OrganizationDSL are:

  • “package” - the root element that contains all the other elements. A model can contain multiple packages.
  • “organization” - define organization and its positions in the fact, e.g. president, VP, manager. . .
  • “superiorPos” - define which position is the superior position of the current position.
  • “position” - define the position details, including superior position and role.
  • “role” - assign the roles which are defined in Authorization DSL to the positions.

Syntax

package definition

Syntax:

package <package name>  {
    organization <organization name> . . . [{...}]
    ...
}

The package definition of OrganizationDSL is just like most of the DSL models, you just need to define the package name and in eclipse like other java project press ctrl+shift+o, all necessary models or java classes will be imported automatically. After that, you can define the organizations and positions. One or more organizations can be defined in the same package.

Example:

package org.eclipse.osbp.foodmart.authorizations {
	import org.eclipse.osbp.foodmart.authorizations.* 
	. . .
	organization FoodMart . . . {. . .}
	. . .
}

organization

This is the main part of this model. Either position or sub-organization could be defined in the main organization.

Syntax:

organization <mainOrganization name 1>  Title <organization title 1> [{
position <mainPosition name> {. . .}
[position <position name> superiorPos <superiorPosition name 1> {. . .}]
	. . .
[organization <organization name 2>  Title <organization title 2>   
  superiorPos <superiorPosition name 2> [{ . . . }]]
. . .
}]

Example:

organization FoodMart Title "Organization" {
position President {. . .}
	position VP_Country_Manager superiorPos President {. . .}
. . .
organization Store_Manager_Org Title "Stores" superiorPos  VP_Country_Manager {. . .}
. . .
}

In this example, main organization FoodMart with title “Organization” is defined. Many positions and organizations can be defined in this main organization. The main position of this organization is President; another position VP_Country_Manager uses this main position as its superior position. A sub organization Store_Manager_Org with title “Stores” is also defined in this main organization, which uses VP_Country_Manager as its superior position.

position=

You can define the position and its role here.

Syntax:

position <position name> [superiorPos <position name>] {
		[role <role name>]
		. . .
}
  • If the position is not a main position of an organization, its superior position must be defined.
  • Superior position must be defined before it is used.
  • One position can be defined without role, and also can be defined with one or more roles.

Example:

organization Store_Manager_Org Title "Stores" superiorPos VP_Country_Manager  {
position Store_Manager {
		role Sales
}

	position Store_Shift_Supervisor superiorPos Store_Manager {
		role Sales
}

position Store_Temporary_Checker superiorPos Store_Shift_Supervisor {
}
. . .
}

In this example, the position Store_Manager is the main position of the sub organization Store_Manager_Org, so it is defined without a superior position; its superior position is defined by the definition of organization Store_Manager_Org, which means, position VP_Country_Manager is the superior position of position Store_Manager. Another position Store_Shift_Supervisor is also defined in this organization, and position Store_Manager is its superior position. role Sales is assigned to both of the position. The third position Store_Temporary_Checker is under position Store_Shift_Supervisor, it is defined without a role.

organization . . . superiorPos . . .

The sub organization could be defined in this part.

Syntax:

organization <organization name 1>  Title <organization title 1>   
superiorPos <superiorPosition name 1> [{ 
	position <mainPosition name> {. . .}
	position <position name> superiorPos <superiorPosition name 2> {. . .}
	. . .
[organization <organization name 2>  Title <organization title 2>   
  superiorPos <superiorPosition name 3> [{ . . . }]]
. . .

}]
  • Sub organization must be defined with a superior position.
  • Otherwise, the syntax of sub organization is totally as same as main organization.

Example:

organization Store_Manager_Org Title "Stores" superiorPos VP_Country_Manager  {
position Store_Manager {
		role Sales
}

	position Store_Assistant_Manager superiorPos Store_Manager {
		role Sales
	}
. . .
organization Store_Temporary_Stocker_Org Title "Stocker"  superiorPos Store_Assistant_Manager { 
		position Store_Temporary_Stocker {
			role Sales
	}

		position Store_Permanent_Butcher
		superiorPos Store_Temporary_Stocker {
			role Sales
	}
}
}

We use the same example, sub organization Store_Manager_Org: position Store_Assistant_Manager is defined under main position Store_Manager. A new organization Store_Temporary_Stocker_Org is defined under position Store_Assistant_Manager; it has 2 position: main position is Store_Temporary_Stocker, which default has the same superior position as this organization, in this case, it is Store_Assistant_Manager; another position is Store_Permanent_Butcher and its superior position is Store_Temporary_Stocker; role Sales is assigned to both of the position.

The whole organigram can be shown in os.bee applications like the following picture:



OrganizationDSL 01.png

Copyright Notice

All rights are reserved by Compex Systemhaus GmbH. In particular, duplications, translations, microfilming, saving and processing in electronic systems are protected by copyright. Use of this manual is only authorized with the permission of Compex Systemhaus GmbH. Infringements of the law shall be punished in accordance with civil and penal laws. We have taken utmost care in putting together texts and images. Nevertheless, the possibility of errors cannot be completely ruled out. The Figures and information in this manual are only given as approximations unless expressly indicated as binding. Amendments to the manual due to amendments to the standard software remain reserved. Please note that the latest amendments to the manual can be accessed through our helpdesk at any time. The contractually agreed regulations of the licensing and maintenance of the standard software shall apply with regard to liability for any errors in the documentation. Guarantees, particularly guarantees of quality or durability can only be assumed for the manual insofar as its quality or durability are expressly stipulated as guaranteed. If you would like to make a suggestion, the Compex Team would be very pleased to hear from you.

(c) 2016-2024 Compex Systemhaus GmbH