Course 4 October 19 2021 Adrian Iftene Adiftene@info.uaic

Transcription

Course 4 – October 19 2021Adrian Ifteneadiftene@info.uaic.ro1

Plan your second meeting with the person whocoordinates the research practice!Deadline: 8th week!2

Recapitulation course 4 Modeling (EMF, IBM Rational Rose Modeler) Business Process Modeling Notation IntroductionElementsExamplesFrameworksAspect Oriented Programming Introduction Terminology Frameworks AspectJ (for Eclipse and Netbeans)3

Modeling The Value of Modeling EMF IBM Rational Rose Modeler4

Who? What is modeling? Why model?5

EMF Ecore6

7

BPMN - graphical representation for specifyingbusiness processes in a business processmodelingBPMN was developed by Business ProcessManagement Initiative (BPMI), and is currentlymaintained by the OMG (http://www.bpmn.org/)The objective of BPMN is to support businessprocess management for both technical users andbusiness users The current version of BPMN is 2.0.2(http://www.omg.org/spec/BPMN/2.0.2/)8

BPMN is based on a flowcharting technique verysimilar to activity diagrams from UMLThe primary goal of BPMN is to provide astandard notation that is readily understandableby all business stakeholders: business analysts - who create and refine the processes technical developers - responsible for implementing business managers - who monitor and manage theprocesses Business Process Execution Language (BPEL) execution languages9

10

11

Event - something that happens Catching - they might catch an incoming message to Start process Throwing - they might throw a message at the End of the process12

Activity - describes the kind of work whichmust be done Task - a single unit of work Sub-process - Used to hide or revealadditional levels of business processdetail Transaction - A form of sub-processin which all contained activities mustbe treated as a whole13

All contained activities must all be completed to meetan objective, and if any one of them fails they must allbe compensated (undone)14

A Gateway is represented with a diamond shapeand will determine forking and merging of pathsdepending on the conditions expressed15

A Sequence Flow shows in which order the activities willbe performedA Message Flow tells us what messages flow acrossorganizational boundariesAn Association is used to associate an Artifact or text toa Flow Object16

Swimlanes are a visual mechanism of organizing andcategorizing activities Pool - Represents major participants in a process (contains oneor more lanes (like a real swimming pool)) A pool can be open(showing internal detail) or collapsed (hiding internal detail) Lane - Used to organize and categories activities within a poolaccording to function or role. A lane contains the Flow Objects,Connecting Objects and Artifacts.17

18

Artifacts allow developers to bringsome more information into themodel/diagram Data Objects show the reader which data isrequired or produced in an activity An Annotation is used to give the reader ofthe model/diagram an understandableimpression A Group is used to group differentactivities but does not affect the flow in thediagram19

20

21

22

Private (internal) business processes – are internal to aspecific organization and are called workflow or BPMprocessesAbstract (public) processes - represent theinteractions between a private business process andanother process or participantCollaboration (global) processes - A collaborationprocess depicts the interactions between two or morebusiness entities.23

24

25

26

27

Visio BPMN modeler Microsoft Visio Professional 2010, 2013 (e-academy) Intalio Java, Eclipse Jadex Java, Eclipse JBPM Java, Apache Ant28

29

30

31

32

33

34

35

AOP is a programming paradigm which isolates secondary orsupporting functions from the main program’s business logicAOP increases modularity by allowing the separation of crosscutting concernsAOP includes programming techniques and tools that supportthe modularization of concerns at the level of the source code36

Aspects emerged out of object-oriented programmingand computational reflectionAspects relate closely to subjects, mixings, delegationSince at least the 1970s, developers have been usingforms of interception and dispatch-patchingDesigners have considered alternative ways to achieveseparation of code, such as C#'s partial types, butsuch approaches lack a quantification mechanism thatallows reaching several join points of the code withone declarative statement37

AOP as such has a numberof antecedents: the VisitorDesign Pattern, CLOS MOP(Common Lisp ObjectSystem - MetaobjectProtocol)AspectJ developed byGregor Kiczales andcolleagues at Xerox PARC(2001)38

Hyper/J and Concern Manipulation Environment offeredby IBM's research team in 2001 (which have not seenwide usage)EmacsLisp changelog added AOP related code in version19.2839

Cross-cutting concerns - aspects of a program whichaffect other concernsAdvice - additional codePointcut - point where additional code is executedAspect - the combination of the pointcut and theadvice40

Even though most classes in an OO model willperform a single, specific function, they often sharecommon, secondary requirements with otherclassesFor example, we may want to add logging toclasses within the data-access layer and also toclasses in the UI layer whenever a thread enters orexits a method. Even though each class has a verydifferent primary functionality, the code needed toperform the secondary functionality is oftenidentical.41

This is the additional code that you want to applyto your existing modelIn our previous example, this is the logging codethat we want to apply whenever the thread entersor exits a method.42

This is the term given to the point of execution in theapplication at which cross-cutting concern needs to be appliedIn our previous example, a pointcut is reached when thethread enters a method, and another pointcut is reached whenthe thread exits the method43

The combination of thepointcut and the adviceIn the example above, weadd a logging aspect to ourapplication by defining apointcut and giving thecorrect advice.44

Utility for aspect-oriented languages designed to takeinstructions specified by aspects and generate thefinal implementation codeTakes information from raw class and aspects andcreates new class woven classThe weaver integrates aspects into the locationsspecified by the software as a pre-compilation step45

AspectJ - the most mature and fully featuredframeworkJBoss AOP - is a 100% Pure Java usuable in anyprogramming environmentAspectwerkz (AW) - one of the quickest and most fullyfeatured AOP frameworks availableNanning - a simple yet scalable aspect-orientedframework for Java (Nanning is also nice "little" townin Guanxi province in southern China)46

Eclipse IDE AJDT (http://www.eclipse.org/ajdt/)Create “New” “AspectJ Project” (AspectJ Development Tools)47

48

aspectpointcutadvice49

AspectJ Plugin for NetBeans es/PluginDetailPage.jsp?pluginid 22964Using the AspectJ Plug-In Module for NetBeans 6.0 :http://www.jroller.com/ramlog/entry/using the aspectj plug in150

51

Use BPMN to create a business model, and use it ina new project component related to your projectthemeUse AOP or MOP in your implementation52

BPMN: http://www.bpmn.org/BPMS Process Mapping BPM: http://interfacing.com/Visio BPMN modeler utorial.pdfBusiness process case -process-case-studies/Intalio: http://www.intalio.com/downloadsJadex packages: iki/bin/view/Download/Available PackagesJadex Installation: iki/bin/view/BPMN Tutorial/02 InstallationJadex: How to install the plugin? Getting StartedjBPM: http://jboss.org/jbpm53

AOP: ,http://en.wikipedia.org/wiki/Aspect-oriented programmingAspectJ: http://www.eclipse.org/aspectj/AspectJ Downloads: werkz (AW): http://aspectwerkz.codehaus.org/Nanning: http://nanning.codehaus.org/jBoss AOP: http://www.jboss.org/jbossaopSpring AOP m/2009/05/18/springaop-tutorial-i/AJDT: AspectJ Development Tools: http://www.eclipse.org/ajdt/AOP in Netbeans:http://www.jroller.com/ramlog/entry/using the aspectj plug PluginDetailPage.jsp?pluginid 22964Framework for AOP in C#: http://rail.dei.uc.pt/54

Recapitulation course 4 Modeling (EMF, IBM Rational Rose Modeler) Business Process Modeling Notation Introduction Elements Examples