BMSD 2015 slides (revised)
-
Upload
antonio-garcia-dominguez -
Category
Software
-
view
326 -
download
0
Transcript of BMSD 2015 slides (revised)
Intro Proposal Results Conclusions
Domain-Specific Language for GeneratingAdministrative Process Applications
Antonio García-Domínguez, Ismael Jerez-Ibáñez andInmaculada Medina-Bulo
July 8th, 2015
A. García-Domínguez et al. Domain-Specific Language for Generating Administrative Process Applications 1 / 12
Intro Proposal Results Conclusions
Motivation
SituationUniv. of Cadiz (Spain), IT webdev+support group (5-8 people)Need to handle demand for many “small” internal appsSimilar needs: data collection and simple processes
RestrictionsVaried backgrounds: recently standardized on Python/DjangoLimited time/budget for training/consultingDevelopers are moved frequently between apps
A. García-Domínguez et al. Domain-Specific Language for Generating Administrative Process Applications 2 / 12
Intro Proposal Results Conclusions
Existing approaches
Full-fledged BPM systems (e.g. Bonita)
Pros: standards-based (BPMN), general-purposeCons: complexity, dependency on engine, seemingly “minor”customizations are costly
Domain-based code generators (e.g. EMF Forms / Apache Isis)
Pros: simpler, easier to customizeCons: do not take into account the underlying process
A. García-Domínguez et al. Domain-Specific Language for Generating Administrative Process Applications 3 / 12
Intro Proposal Results Conclusions
Proposed approach: process category-specific DSL
Modelling requirements1 Manage both domain and process2 Provide role-based access control per process state3 Support decision- and date-based transitions4 Support process isolation between users with same roles
Technical requirements1 Allow generator-specific annotations2 Manageable with regular editors and VCSs
A. García-Domínguez et al. Domain-Specific Language for Generating Administrative Process Applications 4 / 12
Intro Proposal Results Conclusions
Example: examination process
site School;
options { . . . }
role student;role teacher;
process exam {entity Ans3 { . . . }
section personal { . . . }section test { . . . }section evaluation { . . . }
state initial { . . . }state part1 { . . . }state part2 { . . . }state evaluation { . . . }state closed { . . . }
}
Steps1 Student starts process2 Exam is in 2 parts3 Part 2 opens after date4 Evaluation by teacher5 Exam closed, read-only
ImplementationParser + editor: XtextCode generator: EpsilonTarget framework: Django
A. García-Domínguez et al. Domain-Specific Language for Generating Administrative Process Applications 5 / 12
Intro Proposal Results Conclusions
Example: examination process
site School;
options { . . . }
role student;role teacher;
process exam {entity Ans3 { . . . }
section personal { . . . }section test { . . . }section evaluation { . . . }
state initial { . . . }state part1 { . . . }state part2 { . . . }state evaluation { . . . }state closed { . . . }
}
options {django_base_template
= "template/base.html";django_extra_apps
= "template = https://.../";}
Site-wide generation optionsKey-value pairsKeys not restricted by grammarAllows generators to provideextra functionality
A. García-Domínguez et al. Domain-Specific Language for Generating Administrative Process Applications 5 / 12
Intro Proposal Results Conclusions
Example: examination process
site School;
options { . . . }
role student;role teacher;
process exam {entity Ans3 { . . . }
section personal { . . . }section test { . . . }section evaluation { . . . }
state initial { . . . }state part1 { . . . }state part2 { . . . }state evaluation { . . . }state closed { . . . }
}
entity Ans3 { string answer; }
Data entitiesObjects that can be reusedacross process instancesCan be site-wide orprocess-specificExample: possible answers forquestion 3
A. García-Domínguez et al. Domain-Specific Language for Generating Administrative Process Applications 5 / 12
Intro Proposal Results Conclusions
Example: examination process
site School;
options { . . . }
role student;role teacher;
process exam {entity Ans3 { . . . }
section personal { . . . }section test { . . . }section evaluation { . . . }
state initial { . . . }state part1 { . . . }state part2 { . . . }state evaluation { . . . }state closed { . . . }
}
section personal {fullName studentname;identityDocument(label="National ID:") nid;email(label="Email") mail;
}
SectionsDivide the form for access control orpresentation.
FieldsTypes are domain-specific,beyond those of the framework“fullName”: forename, last name
A. García-Domínguez et al. Domain-Specific Language for Generating Administrative Process Applications 5 / 12
Intro Proposal Results Conclusions
Example: examination process
site School;
options { . . . }
role student;role teacher;
process exam {entity Ans3 { . . . }
section personal { . . . }section test { . . . }section evaluation { . . . }
state initial { . . . }state part1 { . . . }state part2 { . . . }state evaluation { . . . }state closed { . . . }
}
section test {group part1 {
string(blank="True") q1;choice(values=". . . ",blank="True") q2;choice(table="Ans3",blank="True") q3;
}group part2 { . . . }. . .
}
GroupsContain one or more fields.Optionally, can be repeated(e.g. order line items).Also useful for access control.
A. García-Domínguez et al. Domain-Specific Language for Generating Administrative Process Applications 5 / 12
Intro Proposal Results Conclusions
Example: examination process
site School;
options { . . . }
role student;role teacher;
process exam {entity Ans3 { . . . }
section personal { . . . }section test { . . . }section evaluation { . . . }
state initial { . . . }state part1 { . . . }state part2 { . . . }state evaluation { . . . }state closed { . . . }
}
state initial {permissions student { editable personal; }transition(decision_by="student",start_date="2015/03/01−14:00:00",end_date="2015/03/07−14:00:00",max="1") part1;
}
Initial stateImplicit state while unstartedWho can start the process,when and how many times?Here, students could start theprocess once from March 1st toMarch 7th at the part1 state
A. García-Domínguez et al. Domain-Specific Language for Generating Administrative Process Applications 5 / 12
Intro Proposal Results Conclusions
Example: examination process
site School;
options { . . . }
role student;role teacher;
process exam {entity Ans3 { . . . }
section personal { . . . }section test { . . . }section evaluation { . . . }
state initial { . . . }state part1 { . . . }state part2 { . . . }state evaluation { . . . }state closed { . . . }
}
state part1 {permissions teacher { viewable all; }permissions student from initial→part1 {
editable personal, test.part1;}transition(start_date=". . . ") part2;
}
Permissions per state + roleView or edit form dataDelete process instance
Optional: required transitionsRestrict to participants of a specifictransition in that instance.
A. García-Domínguez et al. Domain-Specific Language for Generating Administrative Process Applications 5 / 12
Intro Proposal Results Conclusions
Generated website: main page
A. García-Domínguez et al. Domain-Specific Language for Generating Administrative Process Applications 6 / 12
Intro Proposal Results Conclusions
Generated website: full form
A. García-Domínguez et al. Domain-Specific Language for Generating Administrative Process Applications 7 / 12
Intro Proposal Results Conclusions
Generated website: generated code
MetricsDSL-based description: 66 lines longProduced:
1000+ lines of Python code400+ lines of HTML templates264 lines of docs/support scripts
FeaturesGenerates models, views and controllersGenerates process-oriented UI as starting pointPartial form saving (drafts)Integrates useful Django features (admin panel, dataversioning, chained selectors, i18n...)
A. García-Domínguez et al. Domain-Specific Language for Generating Administrative Process Applications 8 / 12
Intro Proposal Results Conclusions
Current status
AvailabilityIn-house with IT staff and local contractorsCurrently used to prototype four internal apps:
Budget plan trackingDegree improvement plan trackingJob postings managementStrategic plan definition/tracking
MaturityMetamodel mostly stabilized, but not frozen yetEditor is being refined with OCL constraintsGenerator verified through automated functional testingCollaborating with users on defining “protected regions”
A. García-Domínguez et al. Domain-Specific Language for Generating Administrative Process Applications 9 / 12
Intro Proposal Results Conclusions
Conclusions
ProposalSmall IT group working on repetitive web appsGeneral purpose BPM engines too complex, form-basedframeworks do not consider the processesProposed middle ground: a process category-specific DSL
Results obtainedDSL (parser + editor) implemented through XtextCode generation with Epsilon targeting DjangoBeing used currently to develop four in-house apps
A. García-Domínguez et al. Domain-Specific Language for Generating Administrative Process Applications 10 / 12
Intro Proposal Results Conclusions
Future work
Improvements on DSL
State preconditions/postconditionsNested groups
Improvements on toolingExtend current Xtend validation with OCLCreate more generators (Symfony2, BPMN?)Graphical visualizations of the processCreate graphical editor (backed by DSL instead of XMI)
ValidationRefinements based on user feedbackPlanned open source release in summer/fall 2015Future studies on productivity/usability
A. García-Domínguez et al. Domain-Specific Language for Generating Administrative Process Applications 11 / 12
Intro Proposal Results Conclusions
End of the presentation
Thank you for your attention
@antoniogado, @antoniogado_es
A. García-Domínguez et al. Domain-Specific Language for Generating Administrative Process Applications 12 / 12
Abstract syntax — Application
Application Element
Options Role
name : EString
Site
name : EString
Option
name : EStringvalues : EString
Entity
name : EString
Process
name : EString
[0..*] elements
[0..*] elements
[0..*] properties
A. García-Domínguez et al. Domain-Specific Language for Generating Administrative Process Applications 12 / 12
Abstract syntax — Process
State
name : EString
Relation
relname : EString
ProcessElementProcess
name : EString
Entity
name : EString
Section
name : EString
[0..*] elements
A. García-Domínguez et al. Domain-Specific Language for Generating Administrative Process Applications 12 / 12
Abstract syntax — Sections/Entities
Field
type : EString
Group
SectionElement
name : EString
Relation
relname : EString
EntityElement
Option
name : EString
values : EString
Section
name : EString
Entity
name : EString
[0..*] elements
[0..*] options[0..*] reloptions[0..*] options
[0..*] elements [0..*] elements
A. García-Domínguez et al. Domain-Specific Language for Generating Administrative Process Applications 12 / 12
Abstract syntax — States
Permission
type : EString
PermissionAllPermissionWithTarget
State
name : EString
StateElement Transition
Points to section,group or field.
RolePermissionsDef RequiredTransition
[0..*] elements
[0..1] name
[0..*] permissions [0..*] transitions
[0..1] from
[0..1] to
A. García-Domínguez et al. Domain-Specific Language for Generating Administrative Process Applications 12 / 12
Abstract syntax — Relations
Relation
relname : EString
RelationReferenceTarget
RelationTarget
RelTailRef
RelTailRef2
ProcessOrEntity
SectionOrEntity
Group
LiteralClass
value : EString
[0..*] targets
[0..1] tail
[0..1] tail
[0..1] target
[0..1] element
[0..1] element
A. García-Domínguez et al. Domain-Specific Language for Generating Administrative Process Applications 12 / 12
Example: examination process
site School;
options { . . . }
role student;role teacher;
process exam {entity Ans3 { . . . }
section personal { . . . }section test { . . . }section evaluation { . . . }
state initial { . . . }state part1 { . . . }state part2 { . . . }state evaluation { . . . }state closed { . . . }
}
state closed {permissions teacher { viewable all; }permissions student { viewable evaluation; }permissions student from initial→part1 {
viewable all;}
}
Final state(s)
States with no outgoingtransitions
A. García-Domínguez et al. Domain-Specific Language for Generating Administrative Process Applications 12 / 12