I'm struggling with assigning the responsibilities in BPMN. In the process I'm designing, I have a task that can have different performers, depending on the instance details (software, hardware...).
Should I use an exclusive gateway and copy the task with different responsibles or is there an other way to make clear that there can be different responsibles?
In BPMN, you can't graphically model that multiple roles are responsible for one task. The reason behind this is simple; if the distinction between the roles is important enough to be graphically modeled, shouldn't you also model the condition that determines which role takes over the task, as well as the difference between the tasks?
The model below does this for a simplified IT support process:
On the other hand, you could argue that the difference between tasks and roles is not important enough to justify the added complexity in the graphical model:
Then, you could specify the distinction in the textual description of the task and/or in the configuration of the task in the execution environment (e.g. BPX engine).
You could also use a sub process element to 'hide' the details in a child process.
Note that some BPMN modeling software providers use vendor-specific BPMN extension elements (like Signavio's additional participant element) for modeling multi-participant task execution. However, these elements are typically useful in more complex responsibility assignment scenarios and not in the simple scenario we discuss here.
Related
I think procedural, object oriented and event driven paradigms are the main paradigm in the software development .And how do I build a relationship among them.
what are the relationships among procedural, object oriented and event driven paradigms?
it is hard to clarify what are the relationship among them.
Procedural and Event Driven describe the general workflow of the application or decision making logic where as Object Oriented describes more the structure of the decision making logic
Procedural describes a sequential workflow of logic, in general there are many steps that must be performed in a sequence, there may be criteria between each step that might be dependent on the outcome from previous steps, however the sequence of logic is pre-determined and hard coded into the application.
In procedural programming the State of the system is generally passed directly between the steps so it does not need to exist in a context outside of the executing logic and there is less need to formally manage the shape or structure of this State.
Prodedural logic complements Functional programming architectures but can be used in many contexts.
Procedural logic suits scenarios where interaction with external systems is instantaneous or not required or if it is OK for your logic to halt processing until the external system responds.
Procedural logic may raise events for external event driven logic to respond to, that doesn't make it event driven.
From a testing point of view, to properly test a pure Procedural Programming application will require the whole application to be completed. You could also test each step in the process by directly evaluating the state or result of each step but in pure PP the state is not maintained in a context that we can easily access outside of the logic, so the only way to test is to run each process to completion to review the results.
This means that the external state is generally less of a concern for testing PP logic.
End-To-End testing is greatly simplified because there are less permutations of outcomes to consider.
Event Driven describes a workflow where the system raises event messages, or responds to events raised from other systems. The application logic is executed in direct response to these events, in explicit contrast to Procedural Programming the timing of the events is considered not controllable and due to this many events may need to be serviced concurrently, this is in direct contract the procedural programming where each step needs to run to completion to be ready for the next step in the chain can be executed.
This means that in Event Driven logic it is more important to check the state of the system when performing decision logic. As the steps could conceivably be executed in any order, at any time, the state needs to be managed in a context outside of most of the logic, this is where OO concepts can start to become really helpful.
Most Graphical User Interfaces will implement forms of Event Driven programming. Think of a simple button click event, the user controls the timing of the execution, or if the button is clicked at all.
From a testing point of view, the current state of the system is important to evaluate or control before testing a process. Depending on the type of events this can raise complications during testing, you may need to simulate, impersonate or intercept other systems or events from or to other
Object Oriented Programming describes a style where the state of the system is modelled using classes that describe a set of metadata and the behaviours and interactions with other objects. We can create Instances of a class to create objects. In this way you can think of OO as first defining a series of templates, and then creating objects from those templates.
OO therefore ends up with a lot of additional boiler plate logic and a lot more effort needs to go into the design of the state and environment before you really get into the behavioural or reactionary logic.
OO pairs really well with Event Driven programming, objects make it easier to represent the environment and nuanced changes to it.
From a testing point of view, OO makes it possible to replicate state or the environment without having access to the real operating environment. Because the logic is defined a more granular set of behaviours within each object we can easily test these behaviours in isolation from the rest of the system.
This same boon can become a burden though, more care needs to be taken to ensure the state is defined accurately enough to obtain meaningful test results. To complete end-to-end testing there can be a lot of moving parts, because the timing of events is less constrained (if at all) compared to PP, there is a greater permutation of potential outcomes to define and automate. Therefor in OOP it becomes more important to test properly at a granular level to verify discrete logic blocks to gain confidence before testing in larger cascading sets of rules.
I have a system prototype, which I want to model in BPMN. That system has three layers: data layer, gui and business logic. Can I use these three layers names as BPMN swimlanes names instead of using actors or roles?
http://blog.goodelearning.com/bpmn/common-bpmn-modeling-mistakes-swimlanes/
Says swimlanes are for an organizational role (e.g. developer, analyst and manager).
As far as I understand it, the blog entry does not state that organizational roles cannot be IT systems. It even mentions content management system as one example for an organization (when discussing pools). Subsequently, a sub system of the content management system should be a perfectly valid candidate for a lane.
When it comes to technicalities, it's always good to refer to the BPMN specification. Regarding the usage of lanes, it states:
The meaning of the Lanes is up to the modeler. BPMN does not specify the usage of Lanes. (page 306, respectively 336 in PDF document)
So according to the specification, you can use these three layer names as BPMN swimlane names.
Well, your work might have finished a long ago, but you are mixing Architecture with BPMN (Process design).
Application mapping is not part of business process design and this is a common mistake done by people missing E2E purpose and scope of process modeling and how it integrates with other domains.
for Architecture you might need to use some other language more specific to it, say Archimate which handles this requirement very well and global standard for modeling architecture.
Business architecture/process architecture and process design are separate entities. we should try not to mix them.
All the best for current assignments.
I am studying Object Oriented Design and am using usecases with actors and scenario''s to plan out the application i am trying to build. No specific language yet, just the theory at the moment.
I have come to the point where i have identified and written out the use cases for the users, administrator, owner, etc and also the external systems like the feed generator.
but i have come to realise that my application actually consists of multiple smaller apps. like a data gathering application and a analysis application.
Can/should i use the data gathering and analysis app as an actor in the overall application too?
I can write specific use cases for them, with scenarios etc.
Typically, no.
Actor is an entity that sits outside of the system and produces some action. It gets to the system boundaries, but then all interactions between system components are modeled not as usecases, but as i.e. dynamic diagrams or sequence diagrams.
For the record, I think this approach is flawed and doesn't really help you in building applications. I personally prefer thinking about components and their interactions directly, without forcing the idea of architecture to fit a particular modeling scheme.
I developing a 3 tier architecture for an MVC4 webapp + EntityFramwork5.
I want to keep separete the layer, so only DAL knows that I'm using EF, for example.
Actually I have a lot of classes to manage that:
DAL
Entity POCO
Entity DataContext : DbContext
Entity Repository
BL
Entity ViewModel
Entity Service(instantiate Entity Repository)
WEB
Entity Controllers (instantiate Entity Service)
This is working but is quite hard to mantain. I was thinking to remove the Entity Repository in DAL and use directly the DataContext (if I'm not wrong, after all DbContext has been desingned to be a Repository and a Unit of Work), but that will force me to add a reference to EntityFramework.dll in my BL. Is not a big issue, but I0m not sure it is the best choice.
Any advice?
(I hope I gave enough informations, if you need more, just ask)
You can use this this and this article.
An experienced Architect does not need to go through every single step in the book to get a reasonable design done for a small web
application. Such Architects can use their experience to speed up the
process. Since I have done similar web applications before and have
understood my deliverable, I am going to take the faster approach to
get the initial part of our DMS design done. That will hopefully
assist me to shorten the length of this article.
For those who do not have experience, let me briefly mention the general steps that involved in architecturing a software below...
Understand the initial customer requirement - Ask questions and do research to further elaborate the requirement
Define the process flow of the system preferably in visual (diagram) form. I usually draw a process-flow diagram here. In my
effort, I would try to define the manual version of the system first
and then would try to convert that into the automated version while
identifying the processes and their relations. This process-flow
diagram that we draw here can be used as the medium to validate the
captured requirements with the customer too.
Identify the software development model that suite your requirements
When the requirements are fully captured and defined before the design start, you can use the 'Water-Fall' model. But when the
requirements are undefined, a variant of 'Spiral' can be used to deal
with that.
When requirements are not defined, the system gets defined while it is being designed. In such cases, you need to keep adequate spaces
in respective modules, which later expansions are expected.
Decide what architecture to be used. In my case, to design our Document Management System (DMS), I will be using a combination of
ASP.NET MVC and Multitier Architecture (Three Tier Variant).
Analyze the system and identify its modules or sub systems.
Pick one sub system at a time and further analyze it and identify all granular level requirements belonging to that part of the systems.
Recognize the data entities and define the relationships among entities (Entity Relationship Diagram or ER Diagram). That can
followed by identifying the business entities (Some business entities
directly map with the classes of your system) and define the business
process flow.
Organized your entities. This is where you normalize your database, and decide what OOP concepts and design pattern to be used
etc.
Make your design consistent. Follow the same standards across all modules and layers. This includes streamlining the concepts (as an
example, if you have used two different design patterns in two
different modules to achieve the same goal, then pick the better
approach and use that in both the places), and conventions used in the
project.
Tuning the design is the last part of the process. In order to do this, you need to have a meeting with the project team. In that
meeting you need to present your design to your team and make them ask
questions about it. Take this as an opportunity to honestly evaluate/
adjust your design.
referring to the e-book patterns for parallel programming.
i read the e-book and learn a lot of new things. but i wonder which pattern to choose.
for example Parallel class, task class, PLINQ, ThreadPool class, ...
is there any resource that provide more information about parallel programming in .net 4?
Different patterns are designed for different types of application.
Task class: when the parallel jobs you want to execute are independent of each other & the order of completion doesn't matter. The jobs may be of irregular size. E.g. Manufacturing a car. It doesn't matter which parts(tire, engine, doors etc) are produced in which order. You only care that car is manufactured in the end and you are doing it in parallel so as to complete it as quickly as possible.
Parallel class: This type is for tasks that are independent and similar but the tasks are of almost equal size. E.g.: A simple for loop where the iterations are independent.
Threadpool class: This is somewhat a combination of the above two except that there can be certain level of dependencies between threads which can be managed by the developer (E.g.: by executing threads in some order OR executing a thread based on the results/conditions obtained from other threads etc).
Note that the choice of parallel pattern is not exclusively yours! Most of the times, one is forced to pick one or another based on the kind of application that's being implemented.
Task and Parallel are not patterns, they're classes or namespaces. These classes can be used to implement various common parallel patterns. In some cases only a single class is required to do this, for example data parallelism with Parallel.ForEach. In others different classes must be used in concert to develop a solution, for example implementing a pipeline with Tasks and BlockingCollection.
The ThreadPool can actually be considered an implementation detail upon which the Task Parallel Library in .NET 4 is built. Tasks represent an abstraction over the thread pool allowing developers to specify work as Tasks and have the .NET runtime handle scheduling the work as efficiently as possible in a hardware independent and scalable way.
Patterns discussed in the book aren't really applicable at the application level, they are more like the design patterns described by the Gang of Four. Typically an application consists of many lines of code that use many different patterns. For example an image processing application might use the Model-View-Controller pattern to separate concerns of the View (GUI) and the Model. The model itself might use a pipeline and data parallelism. You can see just such an example in the pipelines chapter of the book.
there is an official documentation in MSDN explaning parallel patterns and section (Selecting the Right Pattern).