EMF Workflow Model

1,984 views

Published on

EclipseCon 2009 short talk

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,984
On SlideShare
0
From Embeds
0
Number of Embeds
183
Actions
Shares
0
Downloads
84
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide































































  • EMF Workflow Model

    1. 1. EMF Workflow Bryan Hunt bhunt@mac.com Twitter hashtag: #emfworkflow Thursday, March 5, 2009
    2. 2. EMF Workflow EMF meta-model for constructing an executable workflow ❖ Design Model ❖ Runtime Model ❖ Support ❖ Generated editor ❖ Eclipse launcher for running a workflow ❖ Thursday, March 5, 2009
    3. 3. Workflow Design Model WorkflowComponent * WorkflowCompositeComponent WorkflowUnitOfWork Thursday, March 5, 2009
    4. 4. Workflow Design Model WorkflowComponent * WorkflowCompositeComponent WorkflowUnitOfWork Thursday, March 5, 2009
    5. 5. Workflow Design Model WorkflowComponent * [ordered] WorkflowCompositeComponent WorkflowUnitOfWork Thursday, March 5, 2009
    6. 6. Workflow Design Model WorkflowComponent 1 * [ordered] 2 3 4 5 6 7 WorkflowCompositeComponent WorkflowUnitOfWork Thursday, March 5, 2009
    7. 7. Workflow Design Model WorkflowCompositeComponent Thursday, March 5, 2009
    8. 8. Workflow Design Model WorkflowCompositeComponent WorkflowCompositeOrchestrationStrategy 1 Thursday, March 5, 2009
    9. 9. Workflow Design Model WorkflowSerialOrchestrationStrategy WorkflowCompositeComponent WorkflowCompositeOrchestrationStrategy 1 Thursday, March 5, 2009
    10. 10. Workflow Design Model WorkflowSerialOrchestrationStrategy WorkflowCompositeComponent WorkflowCompositeOrchestrationStrategy 1 WorkflowParallelOrchestrationStrategy Thursday, March 5, 2009
    11. 11. Workflow Design Model WorkflowSerialOrchestrationStrategy WorkflowParallelOrchestrationStrategy Thursday, March 5, 2009
    12. 12. Workflow Design Model WorkflowSerialOrchestrationStrategy 1 2 3 4 5 6 7 WorkflowParallelOrchestrationStrategy Thursday, March 5, 2009
    13. 13. Workflow Design Model WorkflowSerialOrchestrationStrategy 1 2 3 4 5 6 7 WorkflowParallelOrchestrationStrategy Thursday, March 5, 2009
    14. 14. Workflow Design Model WorkflowSerialOrchestrationStrategy 1 2 3 4 5 6 7 WorkflowParallelOrchestrationStrategy Thursday, March 5, 2009
    15. 15. Workflow Design Model 1 2 3 4 5 6 7 Thursday, March 5, 2009
    16. 16. Workflow Design Model 1 2 3 4 5 6 7 Thursday, March 5, 2009
    17. 17. Workflow Design Model 2 3 1 2 3 4 5 6 7 6 7 5 Thursday, March 5, 2009
    18. 18. Workflow Design Model 2 3 6 7 5 Thursday, March 5, 2009
    19. 19. Workflow Design Model WorkflowComponent 2 3 6 7 5 Thursday, March 5, 2009
    20. 20. Workflow Design Model ✔ WorkflowComponent 2 ✔ 3 ✔✖ 6 7 5 Thursday, March 5, 2009
    21. 21. Workflow Design Model ✔ WorkflowComponent 2 ✔ 1 3 WorkflowComponentOrchestrationStrategy ✔✖ 6 7 5 Thursday, March 5, 2009
    22. 22. Workflow Design Model ✔ WorkflowComponent 2 ✔ 1 3 WorkflowComponentOrchestrationStrategy ✔✖ 6 7 WorkflowConditionalComponentOrchestrationStrategy 5 Thursday, March 5, 2009
    23. 23. Workflow Design Model ✔ WorkflowComponent 2 ✔ 1 3 WorkflowComponentOrchestrationStrategy ✔✖ 6 7 WorkflowConditionalComponentOrchestrationStrategy * 5 WorkflowExecutionPredicate Thursday, March 5, 2009
    24. 24. Workflow Design Model ✔ WorkflowComponent 2 ✔ 1 3 WorkflowComponentOrchestrationStrategy ✔✖ 6 7 WorkflowConditionalComponentOrchestrationStrategy * 5 WorkflowExecutionPredicate WorkflowRerunPredicate Thursday, March 5, 2009
    25. 25. Workflow Design Model ✔ WorkflowComponent 2 ✔ 1 3 WorkflowComponentOrchestrationStrategy ✔ 6 7 WorkflowConditionalComponentOrchestrationStrategy * 5 WorkflowExecutionPredicate WorkflowRerunPredicate Thursday, March 5, 2009
    26. 26. Workflow Design Model ✔ WorkflowComponent 2 ✔ 1 3 WorkflowComponentOrchestrationStrategy ✔ 6 7 WorkflowConditionalComponentOrchestrationStrategy * 5 WorkflowExecutionPredicate WorkflowRerunPredicate Thursday, March 5, 2009
    27. 27. Workflow Design Model ✔ WorkflowComponent 2 ✔ 1 3 WorkflowComponentOrchestrationStrategy ✔ ✔ 6 7 WorkflowConditionalComponentOrchestrationStrategy * ✔ 5 WorkflowExecutionPredicate WorkflowRerunPredicate Thursday, March 5, 2009
    28. 28. Workflow Design Model 2 3 6 7 5 Thursday, March 5, 2009
    29. 29. Workflow Design Model Input WorkflowComponent * 2 3 WorkflowCompositeComponent WorkflowUnitOfWork 6 7 5 Thursday, March 5, 2009
    30. 30. Workflow Design Model Input WorkflowComponent * 2 3 WorkflowCompositeComponent WorkflowUnitOfWork 6 7 * WorkflowParameter 5 Thursday, March 5, 2009
    31. 31. Workflow Design Model Input WorkflowComponent * 2 Output 3 WorkflowCompositeComponent WorkflowUnitOfWork 6 7 * WorkflowParameter 5 Thursday, March 5, 2009
    32. 32. Workflow Design Model Input WorkflowComponent * 2 Output 3 WorkflowCompositeComponent WorkflowUnitOfWork 6 7 * * WorkflowParameter WorkflowParameterConnection 5 Thursday, March 5, 2009
    33. 33. Workflow Design Model Input WorkflowComponent * 2 Output 3 WorkflowCompositeComponent WorkflowUnitOfWork 6 7 * * * WorkflowParameter WorkflowParameterConnection 5 Thursday, March 5, 2009
    34. 34. Workflow Runtime Model Input ✔ 2 Output ✔ 3 ✔✖ 6 7 5 Thursday, March 5, 2009
    35. 35. Workflow Runtime Model Input ✔ Output ✔ ✔✖ Thursday, March 5, 2009
    36. 36. Workflow Runtime Model Input ✔ Output ✔ EObject WorkflowParameter * WorkflowContext ✔✖ WorkflowState WorkflowComponent * Thursday, March 5, 2009
    37. 37. EMF Workflow Engine EObject WorkflowParameter * WorkflowContext 1 WorkflowState WorkflowComponent * WorkflowEngine 1 WorkflowComponent * WorkflowCompositeComponent WorkflowUnitOfWork Thursday, March 5, 2009
    38. 38. Hello World Example x concat(x, y) z y Thursday, March 5, 2009
    39. 39. Hello World Example x concat(x, y) z y Hello concat(x, y) Hello world world Thursday, March 5, 2009
    40. 40. Hello World Example WorkflowUnitOfWork Thursday, March 5, 2009
    41. 41. Hello World Example WorkflowUnitOfWork Concat Thursday, March 5, 2009
    42. 42. Hello World Example WorkflowUnitOfWork * Concat WorkflowParameter Thursday, March 5, 2009
    43. 43. Hello World Example WorkflowUnitOfWork * Concat WorkflowParameter inputMessage inputAppendMessage outputMessage Thursday, March 5, 2009
    44. 44. Hello World Example WorkflowUnitOfWork * Concat WorkflowParameter inputMessage inputAppendMessage outputMessage @Override public WorkflowState run(WorkflowContext context) throws WorkflowRuntimeException { StringBuilder message = new StringBuilder(); message.append(getInputMessage().getValue(context)); if(message.length() > 0) message.append(' '); message.append(getInputAppendMessage().getValue(context)); getOutputMessage().setValue(context, message.toString()); System.out.println(message.toString()); return StateFactory.eINSTANCE.createWorkflowSuccessState(); } Thursday, March 5, 2009
    45. 45. Hello World Example WorkflowCompositeComponent Thursday, March 5, 2009
    46. 46. Hello World Example stageA : Concat WorkflowCompositeComponent Thursday, March 5, 2009
    47. 47. Hello World Example WorkflowComponentOrchestrationStrategy stageA : Concat WorkflowCompositeComponent Thursday, March 5, 2009
    48. 48. Hello World Example inputMessageA : WorkflowComponentOrchestrationStrategy WorkflowParameter stageA : Concat WorkflowCompositeComponent Thursday, March 5, 2009
    49. 49. Hello World Example inputMessageA : WorkflowComponentOrchestrationStrategy WorkflowParameter stageA : inputAppendMessageA : Concat WorkflowParameter WorkflowCompositeComponent Thursday, March 5, 2009
    50. 50. Hello World Example inputMessageA : WorkflowComponentOrchestrationStrategy WorkflowParameter stageA : inputAppendMessageA : Concat WorkflowParameter outputMessageA : WorkflowParameter WorkflowCompositeComponent Thursday, March 5, 2009
    51. 51. Hello World Example inputMessageA : WorkflowComponentOrchestrationStrategy WorkflowParameter stageA : inputAppendMessageA : Concat WorkflowParameter outputMessageA : WorkflowParameter WorkflowCompositeComponent inputMessageB : WorkflowParameter stageB : inputAppendMessageB : Concat WorkflowParameter outputMessageB : WorkflowComponentOrchestrationStrategy WorkflowParameter Thursday, March 5, 2009
    52. 52. Hello World Example inputMessageA : WorkflowComponentOrchestrationStrategy WorkflowParameter stageA : inputAppendMessageA : Concat WorkflowParameter outputMessageA : WorkflowParameter WorkflowCompositeComponent WorkflowParameterConnection inputMessageB : WorkflowParameter stageB : inputAppendMessageB : Concat WorkflowParameter outputMessageB : WorkflowComponentOrchestrationStrategy WorkflowParameter Thursday, March 5, 2009
    53. 53. Hello World Example inputMessageA : WorkflowComponentOrchestrationStrategy WorkflowParameter stageA : inputAppendMessageA : Concat WorkflowParameter outputMessageA : WorkflowSerialOrchestrationStrategy WorkflowParameter WorkflowCompositeComponent WorkflowParameterConnection inputMessageB : WorkflowParameter stageB : inputAppendMessageB : Concat WorkflowParameter outputMessageB : WorkflowComponentOrchestrationStrategy WorkflowParameter Thursday, March 5, 2009
    54. 54. Hello World Example inputMessageA : WorkflowComponentOrchestrationStrategy WorkflowParameter stageA : inputAppendMessageA : Concat WorkflowParameter outputMessageA : WorkflowSerialOrchestrationStrategy WorkflowParameter WorkflowCompositeComponent WorkflowParameterConnection inputMessageB : WorkflowStateResolutionStrategy WorkflowParameter stageB : inputAppendMessageB : Concat WorkflowParameter outputMessageB : WorkflowComponentOrchestrationStrategy WorkflowParameter Thursday, March 5, 2009
    55. 55. Hello World Example Hello : inputMessageA : WorkflowParameter SimpleAnyType worlflow : inputAppendMessageA : WorkflowParameter SimpleAnyType outputMessageA : SimpleAnyType WorkflowParameter WorkflowContext inputMessageB : SimpleAnyType WorkflowParameter world : inputAppendMessageB : WorkflowParameter SimpleAnyType outputMessageB : SimpleAnyType WorkflowParameter Thursday, March 5, 2009
    56. 56. Hello World Example A B Thursday, March 5, 2009
    57. 57. Hello World Example workflow Hello A B Thursday, March 5, 2009
    58. 58. Hello World Example workflow Hello A Hello workflow B Thursday, March 5, 2009
    59. 59. Hello World Example workflow Hello A Hello workflow B Thursday, March 5, 2009
    60. 60. Hello World Example workflow Hello A world Hello workflow B Thursday, March 5, 2009
    61. 61. Hello World Example workflow Hello A world Hello workflow B Hello workflow world Thursday, March 5, 2009
    62. 62. Resources CVS ❖ ❖ dev.eclipse.org/cvsroot/modeling/org.eclipse.emf/org.eclipse.mwe ❖ /plugins : workflow model ❖ org.eclipse.mwe.ewm.* ❖ /examples : hello world example ❖ org.eclipse.mwe.ewm.examples Screencast: http://idisk.mac.com/bhunt-Public/WorkflowTutorial.mov ❖ Thursday, March 5, 2009
    63. 63. Thank You Thursday, March 5, 2009

    ×