Loading...
 
Skip to main content

Transition Engine

Gezza: Isn't this just enhancing Group Transitions and Category Transitions ?


This page is work-in-progress draft breeding ideas on a flexible, powerful transition (workflow) engine for Tiki objects such as tracker items, wiki pages, groups, articles, etc
It is related to Approval Workflow

Brief overview:

- statues - available through categories but need enhancement
- transitions - available but need enhancement
- actions - new?
- conditions - new?
- events - new
- permission control - enhancement of existing permission system
- control of screen item appearance (action buttons, fields) - it is not CSS related

Details:

  • statuses TIKI_CATEGORIES - details later

  • transitions TIKI_TRANSITIONS - details later

  • actions - TIKI_TRANSITION_ACTIONS? these should trigger shift between 2 statues (categories). Actions have permissions assigned (see later)

  • conditions - TIKI_TRANSITION_CONDITIONS, TIKI_TRANSITION_CONDITION_REL should be evaluated BEFORE a transition takes place. Based on the outcome of the validation (TRUE/FALSE) the transition shift should be either DENIED or ALLOWED. There can be several conditions that must be evaluated in a predefined sequence

  • events - TIKI_TRANSITION_EVENTS, TIKI_TRANSITION_EVENT_REL should happen AFTER a transition happened. There can be several event that should happen in a predefined sequence

  • permission control - TIKI_TRANSITION_PERM_REL, USERS_ROLES permissions can be assigned to categories but this is not enough. There should be a ROLE concept and a REL table that links a the TIKI_TRANSITIONS.TRANSITIONID to a ROLE_ID and an OBJECT_ID (where object _id is the id of a tracker, a page, etc) Roles can be than assigned to GROUPS and users can be assigned to the GROUPS as well (this is how user gets the permission to execute a transition). Should be evaluated by a stored procedure.

  • visual control - TIKI_VISUAL_PROFILES, TIKI_VISUAL_PROFILE_ITEMS defines what screen items (action buttons, fields) are visible for the end user in a certain status (category). This is evaluated by a stored procedure runtime based on the permission assigned to a user to execute a certain action. A visual profile is linked to a status (= a category).

Objects (tables, stored procedures/functions)

Name Type Collation NULL Default Constraints Comment
transitionId int(11) No PK
preserve int(1)
name varchar(50) utf8_general_ci NOT NULL
type varchar(20) utf8_general_ci FK NOT NULL, constrainted to a typeId
from varchar(255) utf8_general_ci No FK -> TIKI_CATEGORIES.categId should be INT, NOT NULL, FK
to varchar(255) utf8_general_ci No FK -> TIKI_CATEGORIES.categId should be INT, NOT NULL, FK
guards text utf8_general_ci guards should be in a rel table
actionId int(11) No FK -> TIKI_TRANSITIONS_ACTIONS.ID Action that triggers the transition
commit int(1) No 0 0,1 Commit allowed or not (data protection from db side)
Name Type Collation Null Default Constraints Comments
Name Type Collation Null Default Constraints Comments
Id int(11) N PK from sequence
Name varchar2 N Unique unique name
Description varchar2 Y
Name Type Collation Null Default Constraints Comments
transitionId int(11) N FK -> TIKI_TRANSITION.transitionId transition instance to which the event belongs
eventId int(11) N FK -> TIKI_TRANSITION_EVENTS.Id event to be executed
serial int(4) N 1 serial in which order the events take place
Name Type Collation Null Default Constraints Comments
transitionId int(11) N FK -> TIKI_TRANSITION.transitionId transition instance to which the event belongs
eventId int(11) N FK -> TIKI_TRANSITION_EVENTS.Id event to be executed
serial int(4) N 1 serial in which order the events take place


Show PHP error messages