240 likes | 418 Views
Activity Modeling and Workflow. CS6961 – Lecture 13 Nathan Dykman. Activity Modeling. In UML 2.0, one can monitor flow of activities and information by using Activity models Some domains are very interested in this kind of information and how it’s organized
E N D
Activity Modeling and Workflow CS6961 – Lecture 13 Nathan Dykman
Activity Modeling • In UML 2.0, one can monitor flow of activities and information by using Activity models • Some domains are very interested in this kind of information and how it’s organized • Activity Models are often very good at showing workflow CS 6961 - Lecture 13
Sample Model I Activity Decision Point Fork/Join Activity with Sub-activity model CS 6961 - Lecture 13
Sample Model I • Can anybody tell me what’s might be missing on the last model? CS 6961 - Lecture 13
Basic Activity Modeling • Shows the flow of activities, including a start and finish. • Not all activities need a finish (more on this later) • These kinds of diagrams are very useful in documenting complex flows or decisions. • Or, if you want to go old school, they make for good flowcharts • A few stereotypes on activities and we are set. CS 6961 - Lecture 13
Activity and Object Flow • You can show that objects flow into and out of activities • This is a good way of showing information/artifacts that are required by a process. • These objects are indeed instances of classes CS 6961 - Lecture 13
Sample Model II Object CS 6961 - Lecture 13
Activities and Partitions • A partition allows activities to be grouped together • In UML 1.x, these partitions were called swimlanes • These show that a set of activities are related to each other. • See the following example CS 6961 - Lecture 13
Taken from UML User’s Guide, Second Edition CS 6961 - Lecture 13
Advanced Activity Modeling • The other commonly used technique is the modeling of expansion regions. • These show that an activity is performed over each item of set of information (or objects) that is produced by an activity • This is sometimes useful • But can add a lot of confusion, so be cautious. CS 6961 - Lecture 13
Expansion Region CS 6961 - Lecture 13
Advanced Activity Modeling • There are also ways to show signals in activities • These model things that can happen at any time in the workflow. • You can have send and receive signal actions in any activity model. CS 6961 - Lecture 13
Send and Receive Example CS 6961 - Lecture 13
Activity Parameters • You can have a set of pins that show various parameters to an activity • This gives you more detail on what exactly must go in or out of an activity. • See example next slide. CS 6961 - Lecture 13
Parameter Examples CS 6961 - Lecture 13
Activity Modeling • Workflow in UML can be very complex • In fact, there is enough information in a complex activity model to link it with a class library, and that diagram can be executed. • There are actions, activities, etc. that can mimic object calls, creates, returns, etc. • This is a very specialized use of activity models • But it has it some proponents • In most cases, this level of complexity is not needed. CS 6961 - Lecture 13
Activity Models and Web Services • While it has gained a lot of traction, there is an interesting use of UML activity ideas in the Web Service space • It’s called the Business Execution Process Language (BEPL) for Web Services • There are tools from IBM, Oracle, some open source. Some support for BEPL in Biztalk 2004 CS 6961 - Lecture 13
BEPL for Web Services • The idea is to provide an execution specification that calls various web services and passes information between them • The standard is based on the UML Activity Model • With some additions, changes, etc. • BEPL has an XML syntax, but some people provide graphical designers or UML translation tools. CS 6961 - Lecture 13
Activity Models and Workflow • Of course, those in the workflow space use UML activity models as well • Again, a specialized area, but one were there is some considerable interest • Federal Governments • Complex process management in manufacturing • And so on. • There are some interesting workflow/BPM tools, but they are in early stages. CS 6961 - Lecture 13
UML: Serving Two Masters • This complexity in UML comes from those in the UML community that use UML in a much different way that others • These people have a real interest in using UML as a platform for execution or executable specification • Complex real time tools, etc. • Some have called for a separation, leading to a simpler, leaner UML CS 6961 - Lecture 13
UML: Serving Two Masters • I do think there is a good case for breaking UML into more manageable pieces • I think the push to add in Action Semantics and complex execution models led to UML becoming too complicated. • However, I don’t know if this means that any models in UML will go away, but will just be simpler internally. • Some fringe ones might, of course. CS 6961 - Lecture 13
UML: Don’t need it, don’t use it • However, the reason that this isn’t a fatal flaw is that this complexity can be largely ignored by UML users • This impacts the tool users and vendors. • The tricky part is providing better guidance to tool vendors, on how to make a “basic”, but good UML tool. CS 6961 - Lecture 13
Next Time • Moving on to the State Model • Maybe some exercises/practice modeling too. CS 6961 - Lecture 13