WebWorkFlow

1,402 views
1,252 views

Published on

Our domain-specific language for defining workflows in WebDSL.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,402
On SlideShare
0
From Embeds
0
Number of Embeds
214
Actions
Shares
0
Downloads
14
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

WebWorkFlow

  1. 1. WebWorkFlow An Object-Oriented Workflow Modeling Language Zef Hemel, Ruben Verhaaf, Eelco Visser Delft University of Technology, The Netherlands
  2. 2. WebWorkFlow coordination
  3. 3. BPEL
  4. 4. BPEL Petri nets
  5. 5. BPEL YAWL Petri nets
  6. 6. BPEL YAWL Petri nets ✘ do not describe full applications ✘ separate language, not nicely integrated ✘ ignore user interface ✘ all or nothing
  7. 7. WebWorkFlow 3 design principles
  8. 8. Linguistic integration
  9. 9. abstraction layers
  10. 10. Process Expressions Procedural Workflow WebDSL
  11. 11. concise Process Expressions (less flexible) Procedural Workflow more verbose WebDSL (more flexible)
  12. 12. Full application generation
  13. 13. JBoss Seam Google Java AppEngine Servlet
  14. 14. Scenario
  15. 15. hank
  16. 16. his employees
  17. 17. preparation
  18. 18. meeting
  19. 19. manager write report
  20. 20. write report employee approve comment
  21. 21. write report approve comment manager finalize
  22. 22. sue
  23. 23. WebWorkFlow
  24. 24. concise Process Expressions (less flexible) Workflow Procedures more verbose WebDSL (more flexible)
  25. 25. ... WebDSL Data Model User Interface Access Control Core WebDSL Core Data Model Core User Interface Web Application
  26. 26. Data models User Interface Logic Access control
  27. 27. entity User { username :: String password :: Secret name :: String manager -> User employees -> Set<User> }
  28. 28. define page editUser(u : User) { form { table { row { "Name: " input(u.name) } row { "Manager: " input(u.manager) } row { "Employees: " input(u.employees) } } action("Save", save()) action save() { u.save(); return home(); } } }
  29. 29. define page editUser(u : User) { derive editPage from u for (name, manager, employees) }
  30. 30. access control rules page editUser(u : User) { principal == u.manager }
  31. 31. Data models User Interface Logic Access control
  32. 32. Data models User Interface Logic Access control Workflow
  33. 33. Workflows revolve around objects entity Meeting { employee -> User employeeView :: Text managerView :: Text report :: Text approved :: Bool comment :: Text }
  34. 34. Workflows revolve around objects entity Meeting { employeePrepare employee -> User managerPrepare employeeView :: Text writeReport managerView :: Text approveReport report :: Text commentReport finalizeReport approved :: Bool comment :: Text } and operations (procedures) performed on them
  35. 35. module workflow procedure writeReport(m : Meeting) { who { principal == m.employee.manager } view { derive procedurePage from m for (report) } }
  36. 36. part of a WebDSL module module workflow procedure writeReport(m : Meeting) { who { principal == m.employee.manager } view { derive procedurePage from m for (report) } }
  37. 37. part of a WebDSL module module workflow procedure writeReport(m : Meeting) { who { principal == m.employee.manager } view { derive procedurePage from m for (report) } } access control expression language
  38. 38. part of a WebDSL module module workflow procedure writeReport(m : Meeting) { who { principal == m.employee.manager } view { derive procedurePage from m for (report) } } access control expression language view page language
  39. 39. concise Process Expressions (less flexible) Procedural Workflow more verbose WebDSL (more flexible)
  40. 40. procedure procedureName(o : Entity) { who { who can perform } when { additional condition } view { view page } enabled { action code } disabled { action code } do { action code } done { action code } }
  41. 41. actor who { principal == m.employee }
  42. 42. condition when { now() > m.startDate }
  43. 43. user interface view { derive procedurePage from m for (employeePreparation) }
  44. 44. action do { email(organizeMeetingMail(m)); }
  45. 45. events done { m.writeReport.enable(); } enabled disabled done
  46. 46. concise Process Expressions (less flexible) Workflow Procedures more verbose WebDSL (more flexible)
  47. 47. procedure meetingWorkflow(m : Meeting) { process { (employeePrepare(m) and managerPrepare(m)); repeat { writeReport(m); (approveReport(m) xor commentReport(m)) } until finalizeReport(m) } }
  48. 48. sequence ;
  49. 49. sequence ; parallel and
  50. 50. sequence ; parallel and deferred choice +
  51. 51. sequence ; parallel and parallel xor deferred choice +
  52. 52. sequence ; parallel and parallel xor deferred choice + repeat ... until loops
  53. 53. sequence ; parallel and parallel xor deferred choice + repeat ... until loops conditional if ... else
  54. 54. Transforming Procedures
  55. 55. WebWorkFlow User Access Procedure Process Data Model Interface Control Events Expressions Procedural WebWorkFlow Access Procedure Data Model User Interface Control Events WebDSL Data Model User Interface Access Control Core WebDSL Core Data Model Core User Interface Web Application
  56. 56. concise WebWorkFlow (high-level) User Access Procedure Process Data Model Interface Control Events Expressions Procedural WebWorkFlow Access Procedure Data Model User Interface Control Events compilation by WebDSL normalization Data Model User Interface Access Control Core WebDSL Core Data Model Core User Interface verbose Web Application (low-level)
  57. 57. concise WebWorkFlow (high-level) User Access Procedure Process Data Model Interface Control Events Expressions Procedural WebWorkFlow Access Procedure Data Model User Interface Control Events compilation by WebDSL normalization Data Model User Interface Access Control Core WebDSL Core Data Model Core User Interface verbose Web Application (low-level)
  58. 58. concise WebWorkFlow (high-level) User Access Procedure Process Data Model Interface Control Events Expressions Procedural WebWorkFlow Access Procedure Data Model User Interface Control Events compilation by WebDSL normalization Data Model User Interface Access Control Core WebDSL Core Data Model Core User Interface verbose Web Application (low-level)
  59. 59. state user interface access control
  60. 60. Example procedure writeReport(m : Meeting) { who { principal == m.employee.manager } view { derive procedurePage from m for (report) } done { m.approveReport.enable(); m.commentReport.enable(); } }
  61. 61. procedure writeReport(m : Meeting) { who { principal == m.employee.manager } view { derive procedurePage from m for (report) } done { m.approveReport.enable(); m.commentReport.enable(); } } Procedure (=workflow) state is kept extend entity Meeting { writeReport -> WriteReportProcedureStatus } in the object it operates on
  62. 62. entity WriteReportProcedureStatus : ProcedureStatus { ... } entity ProcedureStatus { isEnabled :: Bool function enable() { isEnabled := true; } function disable() { isEnabled := false; } }
  63. 63. procedure writeReport(m : Meeting) { who { principal == m.employee.manager } view { derive procedurePage from m for (report) } done { m.approveReport.enable(); m.commentReport.enable(); } } define page writeReport(m : Meeting) { derive procedurePage from m for (employeeView) } user interface
  64. 64. procedure writeReport(m : Meeting) { who { principal == m.employee.manager } view { derive procedurePage from m for (report) } done { m.approveReport.enable(); m.commentReport.enable(); } } access control rules rule page writeReport(m : Meeting) { principal == m.employee.manager && m.writeReport.isEnabled } access control
  65. 65. procedure writeReport(m : Meeting) { who { principal == m.employee.manager } view { derive procedurePage from m for (report) } done { m.approveReport.enable(); m.commentReport.enable(); } } extend entity WriteReportProcedureStatus { m -> Meeting function done() { m.approveReport.enable(); m.commentReport.enable(); } } control logic
  66. 66. WebWorkFlow User Access Procedure Process Data Model Interface Control Events Expressions Procedural WebWorkFlow Access Procedure Data Model User Interface Control Events WebDSL Data Model User Interface Access Control Core WebDSL Core Data Model Core User Interface Web Application
  67. 67. WebWorkFlow User Access Procedure Process Data Model Interface Control Events Expressions Procedural WebWorkFlow Access Procedure Data Model User Interface Control Events WebDSL Data Model User Interface Access Control Core WebDSL Core Data Model Core User Interface Web Application
  68. 68. encode control flow
  69. 69. encode control flow in procedure events enabled disabled done
  70. 70. procedure p(o : O) { process { a(o); b(o) } }
  71. 71. procedure p(o : O) { process { a(o); b(o) } } extend procedure a(o : O) { done { o.b.enable(); } }
  72. 72. procedure p(o : O) { process { a(o); b(o) } } extend procedure a(o : O) { done { o.b.enable(); } } ...right?
  73. 73. procedure p(o : O) { process { a(o); b(o); a(o) } }
  74. 74. procedure p(o : O) { process { a(o); b(o); a(o) } } extend procedure a(o : O) { done { ?? } }
  75. 75. procedure p(o : O) { process { a(o)[1]; b(o)[2]; a(o)[3] } } + transition function
  76. 76. procedure p(o : O) { process { a(o)[1]; b(o)[2]; a(o)[3] } } p(o) state next 0 a.enable(this, 1) 1 b.enable(this, 2) 2 a.enable(this, 3) a(o) b(o) 3 done
  77. 77. procedure p(o : O) { process { a(o)[1]; b(o)[2]; a(o)[3] } } p(o) state next 0 a.enable(this, 1) 1 b.enable(this, 2) 2 a.enable(this, 3) a(o) b(o) 3 done
  78. 78. procedure p(o : O) { process { a(o)[1]; b(o)[2]; a(o)[3] } } p(o) state next 0 a.enable(this, 1) [1] 1 b.enable(this, 2) 2 a.enable(this, 3) a(o) b(o) 3 done
  79. 79. procedure p(o : O) { process { a(o)[1]; b(o)[2]; a(o)[3] } } p(o) state next 0 a.enable(this, 1) 1 b.enable(this, 2) 2 a.enable(this, 3) a(o) b(o) 3 done [1]
  80. 80. procedure p(o : O) { process { a(o)[1]; b(o)[2]; a(o)[3] } } p(o) state next 0 a.enable(this, 1) [1] 1 b.enable(this, 2) 2 a.enable(this, 3) a(o) b(o) 3 done
  81. 81. procedure p(o : O) { process { a(o)[1]; b(o)[2]; a(o)[3] } } p(o) state next 0 a.enable(this, 1) [2] 1 b.enable(this, 2) 2 a.enable(this, 3) a(o) b(o) 3 done
  82. 82. procedure p(o : O) { process { a(o)[1]; b(o)[2]; a(o)[3] } } p(o) state next 0 a.enable(this, 1) 1 b.enable(this, 2) 2 a.enable(this, 3) a(o) b(o) 3 done [2]
  83. 83. procedure p(o : O) { process { a(o)[1]; b(o)[2]; a(o)[3] } } p(o) state next 0 a.enable(this, 1) 1 [2] b.enable(this, 2) 2 a.enable(this, 3) a(o) b(o) 3 done
  84. 84. procedure p(o : O) { process { a(o)[1]; b(o)[2]; a(o)[3] } } p(o) state next 0 a.enable(this, 1) [3] 1 b.enable(this, 2) 2 a.enable(this, 3) a(o) b(o) 3 done
  85. 85. procedure p(o : O) { process { a(o)[1]; b(o)[2]; a(o)[3] } } p(o) state next 0 a.enable(this, 1) 1 b.enable(this, 2) 2 a.enable(this, 3) a(o) [3] b(o) 3 done
  86. 86. procedure p(o : O) { process { a(o)[1]; b(o)[2]; a(o)[3] } } p(o) state next 0 a.enable(this, 1) [3] 1 b.enable(this, 2) 2 a.enable(this, 3) a(o) b(o) 3 done
  87. 87. procedure p(o : O) { process { a(o)[1]; b(o)[2]; a(o)[3] } } p(o) state next 0 a.enable(this, 1) 1 b.enable(this, 2) 2 a.enable(this, 3) a(o) b(o) 3 done
  88. 88. next function for sequencing entity SeqProcedureStatus : ... { o -> O function next(state : Int) { if(state == 0) { procedure p(o : O) { o.a.enable(this, 1); process { } a(o)[1]; if(state == 1) { b(o)[2]; o.b.enable(this, 2); a(o)[3] } } if(state == 2) { } o.a.enable(this, 3); } if(state == 3) { processed(); } } }
  89. 89. next function for parallel and entity ParProcedureStatus : ... { o -> O counter :: Int function next(state : Int) { if(state == 0) { o.a.enable(this, 1); o.b.enable(this, 2); procedure par(o : O) { } process { if(state == 1) { a(o)[1] and b(o)[2] counter := counter + 1; if(counter == 2) { } processed(); } } } if(state == 2) { counter := counter + 1; if(counter == 2) { processed(); } } } }
  90. 90. Encoding Patterns
  91. 91. concise Process Expressions (less flexible) Procedural Workflow more verbose WebDSL (more flexible)
  92. 92. concise Process Expressions (less flexible) Procedural Workflow more verbose WebDSL (more flexible)
  93. 93. WebWorkFlow linguistic integration
  94. 94. WebWorkFlow linguistic integration abstraction layers
  95. 95. WebWorkFlow linguistic integration abstraction layers full application generation
  96. 96. WebWorkFlow linguistic integration abstraction layers full application generation compilation by normalization
  97. 97. www.webdsl.org www.strategoxt.org
  98. 98. state tracking
  99. 99. state tracking task pages
  100. 100. state tracking task pages navigation
  101. 101. state tracking task pages navigation task lists
  102. 102. state tracking task pages navigation task lists workflow status
  103. 103. state tracking task pages navigation task lists workflow status access control rules
  104. 104. state tracking task pages navigation task lists workflow status access control rules the rest

×