Lecture 3
Lecture 3
Lecture 3
2023 2024
10/17/2023
مالحظة جميع المعلومات الواردة في ساليدات المخطط
BPMN
من المرجع
ومن الرابط
http://fundamentals-of-bpm.org/supplementary-material/lectures/
10/17/2023
Exercise 3.1
Model the following fragment of a business process for assessing loan
applications:
Once a loan application has been approved by the loan provider, an
acceptance pack is prepared and sent to the customer. The acceptance
pack includes a repayment schedule which the customer needs to
agree upon by sending the signed documents back to the loan provider.
The latter then verifies the repayment agreement: if the applicant
disagreed with the repayment schedule, the loan provider cancels the
application; if the applicant agreed, the loan provider approves the
application. In either case, the process completes with the loan
provider notifying the applicant of the application status.
10/17/2023
10/17/2023
Parallel Execution
• When two or more activities do not have any order dependencies on
each other they can be executed concurrently, or in parallel. The
parallel (AND) gateway is used to model this particular relation
• Example security check at an airport
Once the boarding pass has been received, passengers proceed to the
security check. Here they need to pass the personal security screening
and the luggage screening. Afterwards, they can proceed to the
departure level
10/17/2023
10/17/2023
• The AND-split splits the token coming from activity“ Proceed to
security check” into two tokens. Each of these tokens independently
flows through one of the two branches
• a token is used to indicate the state of a given instance
• When multiple tokens of the same color are distributed across a
process model, e.g. as a result of executing an AND-split, they
collectively represent the state of an instance
• The AND-join of our example waits for a token to arrive from each of
the two incoming arcs, and once they are all available, it merges the
tokens back into one.
• This behavior of waiting for a number of tokens to arrive and then
merging the tokens into one is called synchronization
10/17/2023
Extend the order-to-cash example of Figure
3.1
• Extend the order-to-cash example of Figure 3.1 by assuming that a
purchase order is only confirmed if the product is in stock, otherwise
the process completes by rejecting the order. If the order is
confirmed, the shipment address is received and the requested
product is shipped while the invoice is emitted and the payment is
received. Afterwards, the order is archived and the process completes
10/17/2023
Solution
10/17/2023
• In a BPMN model we can have multiple end event, each capturing a
different outcome of the process
• a process instance completes only when each token flowing in the
model reaches an end event.
• we can have multiple start events in a BPMN model,
10/17/2023
Inclusive Decisions
10/17/2023
Clearly this solution is not scalable
10/17/2023
The following solution is not correct. Why?
10/17/2023
Inclusive (OR) split gateway
10/17/2023
10/17/2023
10/17/2023
Introduction to Dart
Second Part
جميع المعلومات الواردة في الساليدات من المرجع األول
Dart documentation
10/17/2023
Parameters
• A function can have any number of required positional parameters.
These can be followed either by named parameters or by optional
positional parameters (but not both).
10/17/2023
dart:math library
• To use this library in your code:
import 'dart:math';
• Random is a generator of bool, int or double values.
10/17/2023
dart:math library
• To use this library in your code:
import 'dart:math';
• Functions
• Max: Returns the larger of two numbers
10/17/2023
Conditional expression
• condition ? expr1 : expr2
• If condition is true, evaluates expr1 (and returns its value); otherwise,
evaluates and returns the value of expr2.
17 October 2023 21
dynamic
10/17/2023
• A value of type 'double' can't be assigned to a variable of type 'int'.
10/17/2023
readLineSync();
• First: import 'dart:io';
17 October 2023 24
10/17/2023
list
var list = [1, 2, 3];
• Note: Dart infers that list has type List<int>. If you try to add non-integer
objects to this list, we have an error(see the following example).
10/17/2023
list
• You can add a comma after the last item in a Dart collection literal.
This trailing comma doesn’t affect the collection, but it can help prevent copy-
paste errors.
10/17/2023
list
• Lists use zero-based indexing, where 0 is the index of the first value
and list.length - 1 is the index of the last value. You can get a list’s
length using the .length property and access a list’s values using the
subscript operator ([]):
10/17/2023
• To create a list that’s a compile-time constant, add const before the
list literal
10/17/2023
set
10/17/2023
set
• To create a set that’s a compile-time constant, add const before the
set literal:
10/17/2023
class
• Dart is an object-oriented language
• Every object is an instance of a class
10/17/2023
Constructor
• You can create an object using a constructor.
• Constructor names can be either ClassName or ClassName.identifier.
• If you don’t declare a constructor, a default constructor is provided
for you. The default constructor has no arguments
• The this keyword refers to the current instance. Use this only when
there is a name conflict.
10/17/2023
Constructor
Declare a constructor by creating a function with the same name as its
class
10/17/2023
Initializing formal parameters
• The pattern of assigning a constructor argument to an instance
variable is so common, Dart has initializing formal parameters to
make it easy.
10/17/2023
Named constructors
• Use a named constructor to implement multiple constructors for a
class
10/17/2023
Named constructors
• Use a named constructor to implement multiple constructors for a
class
10/17/2023
Named constructors
10/17/2023
Named constructors
10/17/2023
Constant constructors
• If your class produces objects that never change, you can make these
objects compile-time constants. To do this, define a const constructor
and make sure that all instance variables are final.
10/17/2023
Extend a class
• Use extends to create a subclass, and super to refer to the superclass:
10/17/2023
Super parameters
• To avoid having to manually pass each parameter into the super
invocation of a constructor, you can use super-initializer parameters to
forward parameters to the specified or default superclass constructor.
10/17/2023
Overriding members
• Subclasses can override instance methods, getters, and setters. You
can use the @override annotation to indicate that you are
intentionally overriding a member:
10/17/2023
Getters and setters
• Getters and setters are special methods that provide read and write
access to an object’s properties. Recall that each instance variable has
an implicit getter, plus a setter if appropriate. You can create
additional properties by implementing getters and setters, using the
get and set keywords:
10/17/2023
• Unlike Java, Dart doesn’t have the keywords public, protected, and
private. If an identifier starts with an underscore (_), it’s private to its
library
• The import and library directives can help you create a modular and
shareable code base. Libraries not only provide APIs, but are a unit of
privacy: identifiers that start with an underscore (_) are visible only
inside the library. Every Dart file (plus its parts) is a library, even if it
doesn’t use a library directive.
10/17/2023
10/17/2023
abstract
10/17/2023
10/17/2023