Purpose .se



Backgrund

Relation between analysis and design patterns? Is BML/SDL useful for both the analysis and the design phase.

Analysis - model the system as it is (as-is), find and discuss problems. The analysis may also include the creation of alternative architecture and solutions.

Design - is usually synonymous with implementation in Sweden. However, it should include modelling the system as it should be (to-be) and the design of the system´s architechture.

Purpose

Examine the expressive power of workflow engines. The investigation could be used by people that intend to work with a workflow engine and want to choose one product. However, Visuera Process Manager is a process broker product.

Examine the expressivness and the adequancy of a certain modelling language for workflow specification, by evaluating its ability to capture a collection of predefined workflow patterns.

Petia suggestion 1:

Examine the expressive power of the message oriented language BML, by using WF patterns as a model for analysis. Investigate how message oriented languages handle interorganisational workflow modelling. Problem with this purpose: The message oriented languages are not created to handle WF patterns. Therefore use EIA-pattern instead of WF-pattern. But what is EAI-patterns?

If you have a workflow server or process broker already deployed in your organisation, e.g. Visuera Process Manager, the patterns can serve as a set of ideas how to implement given requirements.

Petia suggestion 2:

How can we, by using BML and the BML patterns, improve available techniques/methods for interworkflow modelling. Such a purpose should give more depth than just investigate how expressive BML is, by investigating if and how BML can model/handle the workflow patterns.

Petia question:

Can we also identify patterns that are especially relevant for and demonstrate the expressive power of the message oriented languages? For example, EAI-pattern?

Why not create domain specific patterns instead of these more abstract patterns? How should an user use these patterns? Are they really usefull? Yes, but show how!

Message oriented process languages

[The following may not be totally correct!] A message oriented process language is an extended state machine. The extensions are the events/triggers Receive message and Expire Timer, and the actions/activities Send Message, Start Timers, Automated business Activity, Automated Business Decision. A state machine is a Petri net which are restricted so that each transition has exactly one input and one output. State machines are conservative and hench finite-state. In fact, they are exactly the class of finite-state machines. State machines has low modelling power (=the ability to correctly represent the system to be modelled) and high decision power (=the ability to analyse the model and determine properties of the modelled system), because the set of reachability state is finite. Classical Petri net has higher modelling power and lower decision power. This must be the same with BML and SDL, because of the extension?

In message oriented languages process languages a lot of patterns can not be shown in only one process. Usually several processes must be to demonstrate a pattern.

A message/signal that is sent to a process can either create a new instance of a process or activating an already started instance of a process, which are waiting in a waiting state, waiting for an input signal/message. In SDL this differences is visualised by using different symbols, one for creating an instance and one for sending a signal to an already created instance. BML only have one symbol, Send Message, for both of this examples.

Difference between input signal (used in SDL) and message (used i BML).

A signal is a message without content. A signal has a unique sender and recipient.

BML

BML does not use a specific symbol for starting/creating an instance, which SDL does. Problems? Benefits? See also Petia question 6 at the end of this document.

Should you model like figure 1 or figure 2 below, i.e. should there be an output symbol for each output signal or could the same output symbol be used for several output signals?. The example in figure 1 could be executed in Visuera Process Manager. The example in figure 2 could probably not (I check that!). Why then use the example in figure 2? One can argue that it is OK to use the example in figure 2 if M2 and M3 are of the same message type, i.e. the messages have the same structure, i.e. the data fields in the messages are the same, and follow in the same order. (Example of messages types are EDIFACT Order version 90.1 or X.12 Order 850 version.)

Or, is it OK to use the example in figure 2 in order to simplify and shorten the models.

[pic]

Figure 1

[pic]

Figure 2

Everything that happens between two states (=wait for events) in BML happens instantaneously. The order between two send symbols following each other is therefore not important. How about SDL?

I suppose it is the same, because of the fact that SDL is based on the communicating state-transition machines. In the book by Belina at al the authors claim on pp.30-31

“A process body is based on a state-based machine. This refers to a machine that is either in a state or performing a transition between two states. A transition is triggered by an input. Thus, the essential elements of the process body are states, inputs and nextstates. In addition, a transition, is composed of a possibly empty set of additional elements that specify certain actions…

States are the stable points in the process behaviour. A transition from a specific state is initiated by an input and terminated by a nextstate. An input consumes the corresponding signal from the input queue of the process. …

If the transition is empty, we have a situation corresponding to a pure finite-state machine.

Is it necessary/good to visualise the queue in order to help the designer create valid BML diagrams?

"A BIA takes help of the dataflow for checking each new message against already received and registered ones." Petia, what do you mean by ”takes help of the dataflow”. Takes help of the data model?

You can consider the data model as a way of representing (capturing) the data flowing between the different processes/activities. You could say ‘takes help of the data model’, but it is in fact rather the data in the data model than the data model itself.

In BML the conditions for exlusive choice are Boolean expressions which are evaluated from the top downwards and the first condition returning the value true is taken. For SDL request instead, the conditions are mutually exclusive, i.e. only one of them can be evaluated as true in a certain state.

SDL

SDL use a "create request symbol" for the creation of a new instance.

The save symbol i SDL is a way of introducing exception of the FIFO order in a message queue, by ignoring the saved signals from the queue in the relevant state.

Summary: What is the differences between BML and SDL?

1) The save semantics in SDL.

2) Different synchronisation solutions in BML and SDL, see Fig 13b. SDL use the Save symbol.

3) The sequential design solutions in BML - every diagram can be read sequential; the symbols in the diagram are followed one after each other. In SDL the Save symbol makes this impossible.

4) The creating instance symbol in SDL, which BML do not use.

5) The close connection to the hierarchical data model in BML. SDL use variables, more like programming languages.

6) Input signal (used in SDL) and message (used i BML). What is the differences?

7) Everything that happens between two states i BML happens instansously. How about SDL. Their activity/procedure symbol is probably not instansously.

8) The semantics of the exclusive choice, differs in SDL and BML

Delimitation

BML’s data model is not central in the patterns. This could be a problem because of the close relationship between the BIA and the data model.

BML’s and SDL´s static model is not used in the patterns.

Task

I think the use of the term "task" is good, but what does it mean. Is ”task” synonymous with ”activity” or is it something more abstract, containing more than just activities, for example states, sending and receiving messages and resources? Does figure 4 describing the dependencies between tasks or between activities?

Petia answer: a task is an action, no further decomposable (and non-interuptable).

The patterns in your solutions usually have one task performed in one BIA/process. Only in some solutions, two tasks are performed in the same BIA/process. Maybe there is a point to always create solutions where one task is performed in one BIA/process. And also visualise every logical connector (OR, AND …) in one BIA. This makes it possible to map a BIA and a certain task, and also map a BIA and a logical connector (OR, AND …). This solution means, for example that one BIA could be reserved only for the co-ordination (e.g. join) of message receipts.

This idea is interesting.

More concepts

[pic]

Figure 3a

Workflow engine terms

Workflow engines

Workflow servers

Workflow management systems

Workflow products

Process brokers

Process management systems

Catalogue of patterns

• Basic control patterns

• Advanced branching and synchronisation patterns

• Structural patterns

• Patterns involving multiple instances (MI)

• State based patterns

• Cancellation patterns

Why patterns?

Help the designer with solutions as an answer to questions how to handle complex requirements

What are patterns?

EAI patterns

I have below sketched some EAI pattern, on different levels.

The request&respond pattern:

In a message oriented process diagram, every request should be followed by a corresponding confirmation. (This pair of request and confirmation is optionally followed by a notification). This pattern can be observed in Fig 3b, where the visualised process BIA x receives a service request from the customer (the message "Order") and the process BIA x sends a service confirmation back to the customer ("Order answer"), after that the order message ("Order2") has been sent to BIA a and the message ("Order answer2") is received from BIA a. BIA a is responsible for inserting the order in apps and send an answer to BIA x, with information if the order is registered or not. This information is then sent to the customer ("Order answer") by BIA x.

Figure 3b

The notification pattern:

A notification means that the sender informs the receiver about the changes of some state of affairs. No respond back is involved in the pattern, see the notifications in Fig 3d.,

The reserveration&booking&cancellation pattern:

The differences between reserving and booking is that reserving is a preliminary stage to booking. A reservation could either be followed by a booking or a cancellation of the reserved resource. The distinction is important if the system automatically should cancel reserved resources that have not been booked after a certain time. For example, a person wants to book a telephone number. The system offers the customer several telephone numbers, which he/her can choose one number from, and thereby book the number. The system has to reserv the numbers offered to the customer for a certain time, so that no one else can reserve/book them during that time. The reserved numbers that are not booked after a certain time limit are automatically released by the system so that other people can reserve or book the numbers.

The upper path in diagram BIA x in Fig 3c visualise a process that receive the message "Get number proposals" from customer. The message indicate that customer wants to book a telephone number, but he/she shall to first choose a number suggested by the system (The message "Number proposals" sent to the customer contains several number proposals). The customer can either accept one of the suggested numbers (The message "Number chosen" received by BIA x from the customer) or ask for other suggestions (The message "New number proposals" received by BIA x from the customer). The latter case is visualised in the second path in Fig 3c. The third path visualises that the customer explicit does not want to book any of the suggested numbers. The fourth path visualises the case when the customer has not book any of the numbers before a certain time limit. (Note that the system has to reserve the number suggested to the customer, to prevent that somebody else reserves or books the number during the process. This is not visualised in fig 3c.)

Pattern description: In a process diagram, every reservation request should be followed by a corresponding booking request by the same actor. And every reservation request should be followed by a corresponding cancel message if the customer cancels the reservation or if the customer does not send a booking in a certain time.

[pic]

Figure 3c

Maintanance process pattern:

When using a Process Broker it is often desirable, but not necessary, to maintain redundant information in an internal or a master storage, which duplicates part of the data in the external applications. There are several reasons for this. First, it is possible that the external application can be updated without the Process Broker being notified. For example, the data about a customer can be changed by mistake when an external application communicates with applications not connected to the Process Broker. By using an internal storage the system has complete and correct data saved in one place.

Secondly, if the customer or customer service quickly requires information about, for example, an order, the system does not have to query several external applications; it only has to query the internal storage. It is not unusual that information about a customer is distributed over several applications. In that case, the internal storage is from a performance perspective, an important improvement of a system.

Thirdly, the opportunity to notify an internal storage of important events that occur in the system, makes it possible to create a data warehouse that is updated in real-time. A Process Broker can support data movement in real-time and it thereby can provide business managers with constantly new information, which can be aggregated.

The internal storage is handled by a maintenance process. The business managers and business designers first have to decide which events should notify the internal storage and then extend the processes with Send Message symbols, i.e. the messages that are sent to the maintenance process. Following this, the maintenance process has to be modelled. Fig. 3d shows a maintenance process (BIA y) that is handling subscription information. When a new telephone subscription is ordered, a message, New subscription, is sent from BIA a to the maintenance process, BIA y, and a new instance of that process, i.e. BIA y is created. The instance is then waiting for three different messages: Change subscription, if the customer wants to change the subscription, Customer info, if the customer wants to know what he or she has ordered, or Finish subscription, if the customer wants to finish the subscription. The maintenance process visualises the activities, i.e. updates and queries that can be performed on the storage. Furthermore, an aggregation made on the internal storage data can be modelled. For example, the process in Fig 3d counts how many times a certain subscription is changed. Note that notification do not need any respond back (see notification pattern). A maintanance process takes care of a notification and stores the information carried by the notification.

[pic]

Figure 3d.

The consistency check pattern:

However, the redundant information in the internal storage and the external applications, requires a process for handling possible inconsistencies. This consistency process, checks whether there is any inconsistency and takes appropriate actions when any inconsistency is detected. The process send messages to the actual apps and receive information about the information in the apps, this is then compared with the information in the redunant storage.

Figure 3e.

Update app pattern (interface process pattern):

An update app process handles the interaction with the external applications or people. An uppdate app process (in the Figure 3f, BIA x) receive and send messages between other processes (in the Figure, BIA a) and external applications (in the Figure, App A) and people. If an app does not answer during a certain time, a timer expire ( in Figure, Timer T1) and a message can be sent back to the requester or an operator (in Figure, System operator) or some processes (in the Figure, BIA b) handling this situation.

[pic]

Figure 3f

Synchronisation apps pattern:

A synchronisation process synchronises a number of uppdate app pattern processes.

[pic]

Figure 3g

Release resource pattern:

A release process cancel performed updates. This is a pattern used when for example two apps should be updated but one of the apps does not answer or can not be updated for some reason. In this pattern the app that was updated must be rolled back. This process pattern looks like the update app pattern.

Hinder duplicate instances patterns:

This process pattern will hinder serveral instances to start by misstake, for example if a customer push a button several time on the cellphone, which indicate that he/her wants to transfer money from bank account to a telecom operator prepay account. The customer wanst to do that transfer once, but if he/she push the button several time, the system must hinder that.

Figure 3h

Workflow patterns presumptions

Which are the presumption when describing a pattern?

• Create a new process instance vs. Send to an already created instance. Should the patterns handle the differences of creating an instance and sending a message to an already created instance.

Yes, I needed to distinguish between these two cases. The reason for this was that I modelled these two distinct cases by the same modelling constructs in the beginning and it was not of course correct because I did not knew how to interpret the difference. But, I think I solved it after our telephone discussion, have not I.

• Address/ID/Key? Is it assumed that an instance A that wants to send a message to instance B have the Address/ID/Key to the other instance, or not. Should both examples be modelled? Petia, do you mean that the abstract patterns you modelling only handle situations where you not take for granted that the instance sending message to a receiving instance, have the Address/ID/Key to that instance

I do not know how to answer you. If you do not have an Address/ID/Key you cannot send a message, can you. On the other hand, we do not always have it at the design time, but it is determined during the runtime. (?) I think that some of the patterns have required this (i.e. not taking for granted that the Address/ID/Key is known in advance), because they are so general, so the context in which they can be used is not specified. (Jag kanner mig forvirrat nu. Det viktiga for ogonblicket ar att monstren funkar)

• Specific message or just signals. What do we presume when modelling the patterns: Does the actual process instance receiving specific message types from specified process instances or just collecting a number of message (signals), from any process instances. I think that the former statement is the right interpretation!

I think you are right. The reason for this may be that we are trying to model WF patterns, i.e. we have so far only used the communication facilities of the SDL for modelling things like parallelism etc, which usually are modelled by a single WF model in the traditional WF languages, but for which we do need different BIAs in BML.

• Gather up not needed and latecoming instances/messages. Should all ongoing instances/sent messages be collected even after the actual task has been triggered?

Why?

a) To hinder the tiggering of the actual task several times (Simple merge, N-out-of-M join)

b) if only one process instance can be active at a time all incoming message must be collected so that the messages are sent to the correct instance. After all messages has been collected a new instance can be triggered, collecting new messages. (N-out-of-M join). Petia, is this not only interesting for workflows that can not running two instances of the same process? See Instances in parallel, below.

• Duplicated message with address/id:s/keys? Should the pattern handle situation where duplicated messages with the same address to a specific instances is sent, and the receiving process instance should only handle one of these messages, i.e. trigger the task only when the first messages arrive.

• Instances in parallel. Petia, I have got a feeling reading ter Hofstedes&co that several workflow pattern presume that several instances of att process can not run in parallel. Is that true?

Nja. I am citing from one of the papers “Problem Most workflow engines do not allow more than one instance of the same activity to be active at the same time.” Note first, that it is not the patterns, but the WF engines that limit it. Secondly it is activities they are talking about.

Sequence (sequential routing, serial routing)

Description:

• An activity is enabled after the completion of another activity in the same process. There is a dependency between two or more tasks/activities, so that one task/activity can not be started (scheduled) before another task is finished. Sequence pattern is used to model consecutive steps in a workflow process. ”Execute activities in sequence”.

[pic]

Figure 4

Examples:

• Send_bill is executed after the activity send_goods

EAI examples:

• After the task/activity order_is_registered the task/activity customer_is_notified is executed.

• The activity inform_customer_about_registration is executed after the activity register_order

• After a message order_registered is received from app A, a messages notify_customer is sent to the customer.

• Send message Create_customer in CRM app after receiving the message New_customer_order from Web server

• After the order is registred in Registy app, the customer is informed about the registration.

Problems:

Petia: A sequence of what: tasks, activities, symbols, concepts, or states?

Activities. In the traditional WF languages it is a sequence of activities. But since in BML we also have send and receive message then even they may be involved in a sequence.

Are Receive message and Send message activities, which then can be in a sequence? The creators of BML would probably call Receive Message for an event and Send Message for an action.

What is the difference between an event and an action? I consider Send and Receive messages as activities/tasks, but are they activities in the real sense. I think not, because we should then need a state symbol preceding and one subsequent for each activity.

Two Send Message in sequence is two action in sequence. How do you define activity? An example of a definition: An activity is something that is performed in a process/an object, possibly changing its conditions.

I have not seen any definition of activity. I have not myself defined it. Your suggestion is a possible definition, but I would like to avoid defining the term. If the paper is otherwise clear enough, it may work, like it works for the WF patterns papers. I am not sure about “changing its condition”. Does it imply a state change? Also in the definition you use the concept process, which makes it to a basic concept (i.e. a concept that we will not define, we cannot define all concepts but use the most basic of them without defining them.). I would then prefer to have activity as basic and define process by terms of activities.

How about SDL in this matter?

I the figure above (som jag igen inte kan lasa I en position) you can see the syntax for state and transitions and then in the second column all the different components in a Transition area.

SDL use the concept of task. My understanding is that it is an atomic activity, i.e. indivisible. Between two states, several tasks may be specified constitution the transition. Now it seems that I am contradicting myself. I need to refresh my knowledge of the definitions for a state-transition machine.

Are the activities A and B in a "sequence", according to the description/definition above?

Ke?

[pic]

Figure 5

Parallell Split (AND-split, fork, parallel routing)

Description:

• A single thread of control splits into multiple threads of control which can be executed in parallel. This pattern is required when two or more activities need to be executed in parallel.

[pic]

Figure 6

Examples:

• The execution of the activity payment enables the execution of the activities ship_goods and inform_customer in parallel.

EAI examples:

• After activity/task new_cellphone_subscription_order the task/activity insert_new_subcription in Registry app (Home Location Registry app) and insert_new_subcription in Mobile answer app are executed in parallell

• After receiving the message new_cellphone_subscription_order two messages are sent in parallel: one to Registry app (Home Location Registry app), insert_new_subcription, and one to Mobile answer app, insert_new_subcription.

• After the message Registry_app_does_ not_ answer is received the same message is routed in parallel to both the system operator and the customer web client.

• After the subcription order is received the Registry application and the CRM application are updated in parallel.

BML solutions:

[pic]

Figure 7

Explicit AND-split vs. Implicit AND-split:

• Explicit AND-split means that workflow engines define a routing node, see figure 3 and figure 6, with more than one outgoing transition, which will be enabled as soon as the routing node gets enabled.

• Implicit AND-split means that workflow engines do not provide routing constructs. Instead each activity can have more than one outgoing transition and each transition has an associated condition, see figure 8. Is the example in figure 8 a correct interpretation of implicit AND-split?

[pic]

Figure 8

Synchronisation (AND-join, synchroniser, rendezvous)

Description:

• A point in the process where multiple parallel activities/subprocess/threads converge into a single thread of control, thus synchronising multiple threads. An activity can be started only when all the parallel threads are completed. ”Synchronise two or more parallel threads of execution/control”

[pic]

Figure 9

Examples:

• Activity archive is enabled after the completion of both the parallel activities send_tickets and receive_payments.

EAI examples:

• Activity Inform_customer_about_order is executed after the completion of the parallel tasks/activities insert_new_subcription in Registry app (Home Location Registry app) and insert_new_subcription in Mobile answer app.

• The message Order_information is sent to the customer after both the messages Insert_new_subcription_answer from Registry app and insert_new_subcription_answer from Moblie answer app is received.

• The customer is informed about the status of the order after both the Registry app and Mobile answer app is updated.

Solutions:

This pattern is easily supported by all workflow engines that support parallel execution.

Incorrect use of AND-join may easily lead to deadlock.

Two basic strategies among workflow engines:

1) Usually an explicit synchronisation construct (routing node) is available which is called a synchroniser. See the AND-construct in figure 9.

2) The alternative is to have a special start condition for an activity that have more than one incoming transitions.

Two approaches of the actual semantics of the synchroniser:

1) Leading workflow products will ignore multiple triggering, which means that it will ignore triggering an activity twice after a synchroniser. If for example an acticity C is preceded by a synchroniser having transitions from activity A and B as input, this synchroniser will ignore termination of instances of activity A if it has already seen one such instance and is waiting for the termination of an instance of activity B.

2) An alternative approach would be to simply keep track of the number of ”extra” instances of activity A that terminated while waiting for activity B and try to match them later with corresponding instances of activity B.

[pic]

Figure 10

In figure 10 the synchronisation is rather simple because the message M2 that is sent from an instance of BIA x to an instance to BIA b, contains the address/id/key back to the instance of BIA x. The created instance of BIA b use the address/id/key to send the message M3 back to the right instance of BIA x.

Another design solution is to create another BIA, i.e. BIA d, see figure 11, in which task C is performed. Then BIA x is only used for synchronisation. Note that BIA x is mapped to the AND connector. Problem with this solution: To many BIA-diagrams!

[pic]

Figure 11

The example that you discuss in Fig 3 in your paper is complex (and abstract). The problem is that the system do not have addresses/id:s/keys to specific BIA instances. In the example in figure 12 any message from BIA d should be synchronised with any message from BIA e and BIA f in BIA g. To handle the problem a BIA x is used, which uses global variables.

[pic]

Figure 12

The example in figure 13a shows the example figure 12, but using the modelling solution with fewer symbols, see figure 1 and figure 2.

[pic]

Figure 13

In figure 12 or 13a only one instance of BIA x can be executed at a time. See Petia question 1.

Petia, in the modelling solution in Fig 2 in your paper draft, you also handle the situation where the queue does not put not consumed message in the end of the queue. Maybe this pattern should be a special pattern, not included in the synchronisation pattern.

Different synchronisation solutions in BML and SDL!

In BML the syncronisation point can easily be used to check the content in a certain message, for example if the message contain a negative review, as soon as a message is arrived. This is not the case with SDL, which use the save symbol, see figure 13.b. M3 is not easily checked until it is received after the second wait state. Am I correct?

I recall the definition of a signal = a message without content.

[pic]

Figure 13b

Exclusive Choice (XOR-split, switch, decision, conditional routing)

About conditional routing, see also multiple choice.

Description:

One execution path from many alternative is chosen based on a decision or ("or"? Petia, why "or"? Should it not be "e.g.") workflow control data. Exclusive choice is a point in the workflow process where one of several branches is chosen.

I should say, “One execution path from many alternative is chosen based on a decision on, why workflow control data”. I will check it.

[pic]

Figure 14

Example:

The task evaluate_claim is followed by either pay_damage or contact_customer, not both.

EAI examples:

• The manager is informed if the order exceeded $ 600, otherwise not.

• A message Order is received and is followed by either a send message Inform_manager or not depending if the order exceeded $ 600 or not.

• A message payment has received and is followed by a send message Payment_OK or Payment_not_OK.

Solutions:

Two basic strategies among workflow engines:

1) Some workflow engines provide an explicit construct/symbol for (the implementation of) the exclusive choice pattern. This is the matter for BML, see figure 15.

[pic]

Figure 15

In BML the conditions for exlusive choice are Boolean expressions which are evaluated from the top downwards and the first condition are returning the value true is taken.

2) The workflow designer has to emulate the exclusivness of the choice by a selection of transition condition. Is figure 16 a correct interpretation of that statement?

Jag will check, but do we need it.

[pic]

Figure 16

Multiple Choice (OR-split, selection, conditional routing)

About conditional routing, see also Exclusive choice

Description:

Several execution paths can be chosen from many alternatives. Multiple choice is a point in the workflow process where one or more branches are chosen based on decision or ("or"? Should it not be "e.g.") workflow control data.

[pic]

Figure 17

The multiple choice pattern generalises the parallel split and exclusive choice patterns, see figure 18.

[pic]

Figure 18

Example:

• After executing the activity evaluate_damage the activity contact_fire_department or the activity contact_insurance_company is executed. At least one of these activities is executed. However, it is also possible that both need to be executed.

EAI examples:

• After the message daily_paper_subscriptions is received the messages register_evening_paper_subscription or register_ morning_paper_subscription is sent. At least one of these activities is executed. However, it is also possible that both need to be executed.

• After the activity order_received the activities insert_order_in_Order_app or inform_department_about_order (if it exceed $400) or inform_ manager_about_order (if it exceed $600) At least one of these activities is executed. However, it is also possible that two or three activities need to be executed.

Two approaches among workflow engines:

1) Conditions can be specified on transitions, i.e. the OR-split can be captured directly.

[pic]

Figure 19

2) Conditions is not be specified on transitions, and instead AND-split and XOR-split building blocks are offered, i.e. a combination of the two. See Fig 20a and BML solution 20b

[pic]

Figure 20a

BML solution

[pic]

Figure 20b

Simple Merge (XOR-join, asynchronous join, merge)

Description:

Two or more alternative execution paths merge, i.e. two or more alternative branches come together without synchronisation. The merge will be triggered once (!) any of the incoming transitions/execution paths are triggered, but the merge will only be triggered one time (fel). This means that later incoming transitions/execution paths/messages should be prevent from triggering the task. Petia, is this the correct interpretation of the pattern?

NO! Det efterfoljande (efter merge) activiteten exekveras varje gang nogon av de ingoende (till merge) activiteterna ar fardigt execverade.

Figure 21 shows that C is executed as soon as one of A or B is executed. But C is only executed one time. For example if A is executed C should be executed, but if B executed this should not trigger C a second time. Petia, is this a right interpretation?

No. The execution of A should trigger C and a later execution of B should trigger C for a second time. (I think XOR shall be read that for executing C only one of the A or B are needed to be completed. It means that if A and B are both completed they should trigger their own execution of C). I agree that it is not obvious how to interpret it, and I did the same interpretation as you earlier. The difference from Multiple Merge, as I understand it, is that in Multiple Merge several branches can be running in parallel, i.e. the completion of A triggers C and then during the time C is running, B is completed and a second C should be started in parallel of the first one, according to the pattern. A lot of WF engines do not do it. Some of them ignore the triggering competition of B because one instance of C is already running, others waits until the first execution of C is completed before starting a second execution of it.

Petia, does not this pattern presume that addresses/id:s/keys are known? Think that several instances of a process is active.

The pattern delimits parallel execution of A and B. Again they are only activities. But I think that it should not be a problem if we had several instances of the whole WF/process. I suppose that their different instances should not be mixed in between, or is there such a risk?

How do you know that a message should trigger a new instance or not if you do not have addresses. See figure 22. A solution is of course to use global variables, se figure 23a, or a directory/repository, see figure 23b, which have information to which instance a certain messages should be sent, compare also with figure 12 and 13.

[pic]

Figure 21.

Examples:

• After the activity payment_received or the activity credit_granted the activity car_delivered is followed, i.e. the car is delivered to the customer. However, a car should not be delivered twice if both activities is executed.

EIA examples:

• After the message payment_received or the message book_ordered, the message deliver_book is sent. However, the book should not be delivered twice if both message have the same order_number, i.e. the same customer order the same book.

Solutions:

Some workflow engines can automatically garantees that not more than one incoming transition can be triggered. How? 1) The design of the models? 2) Because of the workflow language? 3) the implementation of the workflow engine?

The BML solution when instances of BIA a and BIA b have knowledge of the address to the instance of BIA (figure 22):

[pic]

Figure 22

The pattern i figure 22 require that instances of BIA a and BIA b have the address to a specific instance of BIA c. But if the instances do not have the addresses, can you create a more general pattern? Is the patterns in figure 23a och 23b a solution?

[pic]

Figure 23a

The example i figure 23a require that only one BIA x can be executed at a time.

BIA x can also use some kind of a directory service or repository to find the addresses, see figure 23b. In this example several BIA x can be executed in parallel if the Directory can handle concurrency.

[pic]

Figure 23b

However, some workflow engines require exclusive choise before simple merge, see figure below:

[pic]

Figure 24.

The corresponding BML solution is visualised in fig 24. In this case the address to BIA d is known:

[pic]

Figure 25

Multiple Merge

Description:

A point in a workflow process where many execution paths merge without synchronising, i.e. two or more branches reconverge (sammanstrålar) without synchronisation. If more than one branch get activated, the activity (D in figure 26) following the merge is started for every incoming branches that gets activited.

[pic]

Not included in Simple merge Executed as soon as B or C

Compare with figure 24. are executed, and executed

as many times B and C are

executed.

Figure 26

Example:

• Sometimes two or more branches share the same ending. Two activities audit_application and process_applications are running in parallel which should both be followed by an activity close_case, which should be executed twice if the activities audit_application and process_applications is excuted. Petia, is this a correct interpretation of the pattern?

Yes

EAI example:

• The messages payment_via_giro and payment_via_credit_card, which are running in parallel should both be followed by the message fill_e-account, which should execute each time any message of the former two is received.

BML solution

[pic]

Figure 27

Note that in this pattern BIA a and BIA x could not be linked together (combined) in the same BIA.

Most workflow engines will not generate the second instance of an activity if the first instance is still running, if it is not part of a loop. Petia, is really true, it sounds strange that several instances of a process can not execute i parallel? However, for BML/Visuera PM it is no problem to generate a second instance.

NB! Not a process, but a activity in a process. Jag refererar till tidigare publikationer och ifragasatter inte ens.

Discriminator

A special case of N out of M join, where N=1. M is the number of parallel paths and N is

the number of completed paths.

The pattern is also converse of Multiple merge, see figure 26..

Description:

This pattern merge many execution paths without with synchronising. Only one activity should be instantiated after merge. The discriminator is a point in the workflow process that waits for a number (N=1) of incoming branches to complete before activating the subsequent activity. From that moment on it waits for all remaining branches (all predefined incoming message types in BML) to complete (M) and ignores them. Once all incoming branches have been triggered the workflow process instance it reset itself so that a new instance can be trigged again.

Petia, I assume that M means different message types in the BML case. For example, M =3 if M1, M2 and M3 must be received. It does not mean any message=3? For example if M2 arrive three time and M1 and M3 zero time, is M=3. For me M=1. I am correct?

Yes

[pic]

Fig 28

Example:

• A paper needs to be sent to external reviewers. The paper is accepted if both reviewers are positive. But if the first review that arrive is negative, the author should be notified without having to wait for the second review.

Petia, is this a correct exampel? According to the description of discrimintor once all incoming branches have been triggered the workflow process instance it reset itself so that a new instance can be trigged again. Is this covered by the exampel?

Var hittade du det text stycket. Inte I monster beskrivningen. Jag skulle tro att du har tagit det ur forslag hur man skall implementera/losa monstren. I pappren finns dels beskrivning pa monstren, dels vilka problem man far I olika WF enginges, och slutligen forslag hur man kan gora for att kunna kringa dessa problem och implementera monstren.

No! Maybe the pattern presume that the workflow engine do not handle parallel instances of a process!??. Furthermore, the example presume that the incoming execution paths are checked: is the review postive or negative. Is that part of the describd pattern, i.e. is N in a N out of M join the same as "number of completed paths which make a condition come true", see figure 29d?

Jag gillade inte sjalv review exemplen, men det finns en annan exempel, som ar batter. Det ar exemplen som du anger nedan.

Another example:

• To improve query response time, a complex search is sent to two different db´s. The first one that comes up with the result should procede the flow. The second result is ignored.

EAI example:

• After an order is received the order is going to be inserted in three apps, a Registy app, a CRM app and a Transport app. As soon as the Registry app sent a message back to the system/process broker informing that the order is registred, the customer will be informed that the order is registered. However, the system must also receive messages back that the order is registered in the CRM and the Transport app. If not, this must be handled manually by an operator. But the customer is not going to be informed about that. For the customer it is enought that the order is inserted in the Registy app.

Interesting example. I do not think it is exactly this pattern. The thing is that you explicitly specify which one of the started activities (i.e. Registry) shall trigger the next activity (i.e. Customer confirmation).

Still waiting for the completion of the rest of the started activities, may give a new pattern.

E.g. a point in a workflow where M parallel treads reconverge into one. A subsequent activity should be activated once N treads have completed. Another activity shall be completed when all the treads have completed.

Petia, maybe this is the best form of describing the patterns, not using specific messages or activities? What do you say?

Yes, I agree. At least for the moment I feel it is the most suitable description.

BML solutions (fig 29a, 29b, 29c):

[pic]

Figure 29a

Note that BIA a, BIA x and BIA d can be linked together (combined) i the same BIA.

In figure 29a BIA x is created of BIA a. This is not correct according to the description: "once all incoming branches have been triggered the workflow process instance it reset itself so that a new instance can be trigged again". This is handle in figure 29b. In this example the first instance of BIA x is created of a message from BIA b1, BIA b2 or BIA c, but after that a new instance of BIA x is created of a message (M9) sent from the previous instance of BIA x. This means that the first part of the BIA x is only used in the first instance of BIA x.

[pic]

Figure 29b

The first instance of BIA x could also be created by an operator, see figure 29c, or when the system is activated.

[pic]

Figure 29c

[pic]

Figure 29d

Some workflow engines will not generate the second instance of activity if the first instance is still active. However, this does not provide a problem for the discrimination since once the first instance of the activity finishes, the second instance will be created.

The discriminator sematices is hard or impossible to implement. The common design pattern is to use Cancel activity, which means that once the first instance of the activity following the discriminator is created, the activities of the incoming branches that still not have been completed can be cancelled, see figure 30.

[pic]

Figure 30

The problems with this solution:

1) If activities B and C are performed concurrently, activity D may still end up beeing executed twice.

2) The original semantics of the discriminator is allow both B and C to finish. In this solution either B or C will get cancelled.

N out of M join (partial join, discriminator, custom join)

A generalisation of the basic Discriminator pattern. M is the number of parallel paths and N is

the number of completed paths.

Description:

The pattern merge many execution paths, i.e. perform partial synchronisation and execute subsequent activity only once, i.e the subsequent activity should be activiated once N path have completed. Completion of all remaining path should not execute the actual activity, but should be they should be "fired"/"collected". Once all incoming branches have "fired"/are "collected", the join resets itself so that it can fire again.

Example:

• A paper needs to be sent to three external reviewers. Upon receiving two reviews the paper can be processed. The third review can be ignored, but need to be . Petia, is thit a correct exampel? According to the description: Once all incoming branches have "fired"/are "collected", the join resets itself so that it can fire again. This is not covered in the exampel. Maybe the pattern presume that the workflow engine do not handle parallel instances of a process.

EAI examples:

• After an order is received the order is going to be inserted in three apps, a Registy app, a CRM app and a Transport app. As soon as the Registry and the CRM apps sent messages back informing that the order is registred in the apps, the customer will be informed that the order is registered. However, the system must also receive a message informing that the order is registered also in the Transport app. If not, this must be handled manually by an operator. But the customer is not going to be informed about that.

Solutions

Most of the workflow products do not provide construct that should allow for straightfoward implementation of the N-out-of-M join.

Solution 1:

Some workflow engines provide support for Custom triggers, which define the condition typically using some internal script language that would activate the activity when evaluate true.

Downside with this solution: The script solution do not visualise the solutions in the models, which thereby become harder to understand.

Solution 2:

By combining Discriminator and Synchronisation one can achieve the desired sematics, although the workflow definition becomes large and complex.

[pic]

Figure 31

BML solutions, see figure 29a, 29b, 29c

Synchronising Merge (synchronising join)

Petia, is that the same as "or-join"?

Description:

A point in the workflow process where multiple paths coverge into one single thread. If more than one path is taken, synchronisation of the active thread needs to take place. If only one path is taken, the alternative bransches should recoverge without synchronisation. This could only be decided at runtime, when we can tell whether one or several tasks are executed.

The difficulty is to decide when to synchroinise and when to merge. The problems are that

1) Synchronising alternative thread may leads to potential deadlocks

2) Merging parallel flows may lead to the undesireble multiple execution of activities, that follow the standard OR-join construct.

[pic]

Figure 33

[pic]

Figure 34

Example:

• After either or both the activities Contact_fire_department and Contact_insurance_company have been completed (depending on whether they are executed at all) the activity submit_report needs to be performed, exactly once. But the submit_report should include information from all the executed activities.

EAI example:

• The customer order include a booking of either a travel ticket or both the travel ticket and a hotel. A booking message is sent to the apps of interest. After the booking_answer message is received from the apps the message inform_cusomer is sent to the customer. The message should include information about the booked travel ticket and hotel.

[pic]

Figure 35

Solutions:

1. Passing a false token for each transition that evaluates to false and a true token for each transition that evaluates to true. The merge will wait until it receives tokens from all incoming transitions.

2. Passes a token through every transition in a graph. This token may or may not enable the execution of an activity depending on the entry condition. In this way every activity having more than one incoming transition can expect that it will recieve a token from each one of them, thus deadlock cannot occur.

3. Avoid explicit use of OR-split and implement it as a combination of AND-split and XOR-split. This way we can easily synchronise corresponding branches by using AND-join and XOR-join constructs.

BML solution:

[pic]

Figure 36

MI (multiple instances) requiring synchronisation

Description:

For one case many instances of one activity can be generated and these requiring synchronisation. The number of instances may not be determined at design time (as in the while loop). After completing all instances of that activity another activity has to be started. That is, sometimes it is required to continue the process only after all instances of an activity are completed without a priori knowledge of how many instances that were created at runtime.

Examples:

• When booking a trip, the activity book_flight is executed multiple times if the trip involves multiple flights. Once all booking are made, the invoice is to be sent to the client. How many booking made are determined at runtime.

• The requisition of 100 computers results in a certain number of deliveries. Once all deliveries are processed, the requisition has to be closed.

EAI example:

• See example above.

Solutions:

Most workflow engines do not allow multiple instances. Languages that do allow multiple instances may not provide any constructs that allow for synchronisation of these instances.

1. If the number of instances is known at design time, then it should be easy to synchronise these using basic synchronisation.

2. If the language supports multiple instances and decomposition that does not terminate unless all activities are finished, then muktiple instances can be synchronised by placeing a sub-flow containing a loop generating the multiple instances.

3. If the number of instances is known at some point during runtime, all created instances can be synchronised. But how receive that information.

4. Use of external triggers once each instance of an activity is completed, an event should be sent. There should be antoher activity in the main process waiting for events. This activity will only complete after all events from each instance are received.

BML solution:

Producer Consumer

Producer Consumer with Bounded Queue

Messaging Communication

Messaging Coordination

Bulk Message Sending

Bulk Message Recieving

Petia Question 1

Can you, and if yes, how do you limit the number of instances? What happens if you start up more that the maximum number of instances?

Petia, I check this with Visuera. Probably the instances are saved in a queue at the BIA type level.

Antingen initierar en invocation/ett request/ett meddelande en ny BIA instans (fall1), dvs requestet är det första meddelandet som ska nå en viss BIA-instans, som då skapas, eller så skickas meddelandet till en specifik BIA-instans (fall2) som redan har börjat exekvera. Vad som händer om denna BIA-instans inte finns eller om det inte går att initiera fler BIA-instanser vet jag inte, men kan tänka mig att sådana meddelanden samlas i en speciell kö. Det är dock upp till de som implementerar attt tänka ut vilken lösning som är det bästa i det speciella fallet. Det finns inget i BML som hanterar detta. Jag ska dock kolla även detta med Visuera.

Petia Question 2

What is the interpretation of send&receive message?

[pic]

Figure 35

Different interpretations of the symbol:

1. Remote procedure call

a) which means synchronous communication style, i.e. the client makes an request/invocation and then suspends its execution (blocks) until a result is returned from the server. This is a blocking paradigm, i.g. style.

b) and which include a special type of message containing both the request data and the respond data

2. Send and receive symbols in combination. The symbol is an abstraction mechanism! Instead of using two symbols: Send message and Receive message, you only need to use one.

a) which means an asynchronous communication style. (A client composes the request, issues it over the network, but does not block waiting for a response. Rather the client can continue processing while waiting for the result to return.)

b) and which include two different types of messages: one request message of a certain type and one repond message of a certain type.

3. The symbol contains several symbols: Send message, Wait for event, and Receive message or Expire Timer. See 2 above. This means that the new symbol contain 3 symbols. The symbol may have two alternative outgoing transitions, one if the Recieve message arrive in time, the other if the Timer expire before the message arrive.

[pic]

Figure 36

I check with Visuera the latest interpretation of the symbol. I also check if this symbol could be executed.

Petia Question 3

What happens with messages that are not consumed?

Are they discarded or are they put in the end of the queue?

Probably the user of the Visuera Process Manager can chose any of these two implementation solutions. I check that with Visuera.

Petia Question 4

How does BML visualise broadcasting? Can you implement the symbol at the bottom in Visuera Process Manager? I check that with Visuera.

[pic]

Figure 37

Petia Question 5

Dina kolleger frågade om man kunde ha flera instanser for att hantera olika workflows?

Jag förstår inte frågan.

Petia question 6

How do you know when you should create a new instance of a BIA or send a message to an already created instance? Can you create an instance of a BIA from an already executed instance of the same BIA?

Figure 38 visualise that you sometimes must receive a special message that create the BIA instance.

[pic]

Figure 38

In the figure above you do not see the communication with the db. In the figure below you see that communication.

[pic]

Figure 39

Petia question 7

How can you address from one instance of a BIA to another instance of another BIA, if they where not created by each other or from a parent in a hierachy?

There are two alternative:

1) Use global variables, which store information about running instances.

2) Use some form of a common directory service. Before one of the BIA instances can send a message to another (i.e dynamically send a message) it must first find the address/key/ID to that BIA instance. You obtain this information from a repository, which contain information about running instances.

Det finns dels variabler, typ Javas klassvariabler, på BIA typ-nivå, som är gemensamma för alla instanser av en och samma BIA, dels variabler, typ Javas klassvariabler, på BPI-nivå, som är gemensamma för alla BIA-instanser som finns i samma BPI. Om instanser av olika BIA-typer ska få adressen måste de använda dessa BPI-variabler som kan innehålla adressen till initierade instanser. Ett annat alternativ är att fråga en speciell BIA eller en applikation som håller information om vilka instaner som är initierade. Ungefär som CORBA har repositories med information om vilka serverapplikationer som för tillfället är tillgängliga/körs/exekverar.

Petia question 8

Is BML fully executable, i.e. is there any construct (symbols) that cannot be run (used) in the current implementation?

I think that all constructs are executable, but I check this with Visuera.

Petia question 9

When a broadcasting is done, do the different recipients need to be waiting for the broadcast message? I.e. usually for each sent message from BIA1 to BIA to, you need to have a Send Message symbol in BIA1 and a Receive Message symbol in BIA2. Is this the same for broadcasting and if yes, how is the situation when an unexpected for the recipient message is sent? A typical example is when DMC sends message to all students and employees that the mail server shall be moved and therefore not available during the next coming day.

Petia question 10

How do you model the sending of a message to yourself, i.e. BIA1 sends M1 to BIA1?

Petia question 11

How is parallelism implemented in BML, i.e. does parallelism have an interleaving semantics or is it true concurrence. (Interleaving semantics is when, a runs parallel to b (a//b) means that one of the following sequences occurs: a followed by b (ab), or b followed by a (ba), where ab is considered to be the same as ba, i.e. there is no true concurrence. True concurrence is only possible when different processors are allocated for the tasks a and b.) So the question is whether it is possible to run two different instances of one BIA on different processors, i.e. true parallelism, or not? (My answer is no). Also is it possible to run two different BIAs within the same BPA on different processors or not? (My answer is yes, but how do you define it? Does a setting true for the ‘Distributed data’ property for a BPI automatically imply this? (page 23 in the Modeler manual)). Finally. I do thing that two different BPA can be run on different processors? Is my understanding correct?

Petia question 12

Hur utbrett ar BML? Ar det bara Viewlocity som anvander det, eller finns det aven andra som kanner till och anvander den. Fragan ar relevant for att kunna positionera arbetet, dvs motivera varfor vi tittar just pa BML och inte nagra andra liknande sprak. Kanner du till forresten andra liknande sprak. SDL vet jag om och det tankte vi titta pa, dvs titta mera generellt pa den gruppen av sprak, som karakteriseras som meddelandeorienterade processmodelleringssprak. Det kan ge en vidare perspektiv pa arbetet? Nar utvecklades BML forresten? Och varfor racket inte det med SDL? (Jag kan i och for sig saga att med mina ringa kunskaper om SDL sa tycker jag att BML ar ett mycket snyggare sprak, men fragan ar intressant i alla fall.)

Resten ej bearbetat:

What happens in BML solution if you receive two messages from A, i.e. if A was executed twice?

Mmm, redan här börjar det bli krångligt när man ska tänka abstrakt.

Som jag ser det finns det två eller flera alternativ för synkronisering. I det första alternatovet skickas det två meddelandetyper, dvs två meddelanden med olika struktur, till exempel ett meddelande med fälten Petia Wohed, Kungsgatan 34, 0708-668 665 och.ett meddelande med fälten 0708-668 665 och tjänst 23 beställd, Det är det vanliga fallet. I så fall skulle jag inte modellerat som du utan som i fig 1 sist o dokumentet Det innebär att du har lika många receive-symboler som meddelandetyper som ska tas emot.

Dvs tänk dig att meddelandena M1 och M2 ska tas emot och de skickas från olika applikationer eller processer, t ex ( respektive (. Då måste båda mottas innan processinstansen kan löpa vidare. Om två M1 tas emot kommer bara det första leda till att processinstansen löper vidare (i loopen). Eftersom processinstansen i nästa tillstånd endast kan ta emot M2 nu kommer alla M1 att kastas (eller stoppas sist i kön, beroende på implementation) Glöm inte att varje processinstans har en meddelandekö i vilken alla meddelanden hamnar.

Svaret på din fråga för detta alternativ är att om A, om du med A menar A1, exekverar 2 ggr så kommer inte det att påverka C.

Sedan finns det ett andra alternativ där två eller flera meddelanden av samma meddelandetyp måste tas emot innan instansen kan hamna i C. Det är så jag tolkar din modell. Behovet av ett sådant mönster är nog inte så stort i praktiken. Möjligen för att av någon anledning räkna antalet meddelanden av samma typ for att notifiera en person/applik om antalet överstiger ett visst antal. Men, nedan svarar jag på vad som gäller gör det första alternaivet, om inget annat anges.

Jag återkommer med en bättre definition av meddelandetyp.

This is allowed in the WF pattern (on left).

Ja, det är tillåtet i BML för A1 att exekvera hur många gånger som helst, men det är först när An exekverar som processinstansen kan gå vidare till C

However AND means that C shall only be executed when both A and B have been executed. How des BML work in this situation, i.e. what is the semantic of the receive message with or inside and followed by the decision symbol with ‘All M received’?

Svar: OK, "All M received?" Är väl lite för slängigt uttryckt. Vad som menas är "M1 AND M2 received?" Eller "two messages of M1 received!" för alternativ 2.

Does it count or does it also check that messages from correct senders are received?

Checkar att rätt meddelande kan tas emot.

What happens to the messages received from the same sender?

Det ignoreras, eller snarare så slängs meddelandet eller hamnar sist i meddelandekön. Vilket som är fallet beror på implementation.

NB! If A is executed twice and B has not been executed at all, the condition All M received may still be satisfied.

OK. Som sagt villkoret är lite slarvigt formulerat, se ovan

The problem appear even clearer if you try to include this pattern in a loop. I’ve got to do this to the next meeting. This also raises the question: What happens to the messages in a message queue, which cannot be consumed for the moment? Are they deleted or are they sent to the end of the queue. According to your paper it depends on the implementation, but since it influence the semantic of the language a lot the question is how does the current implementation do?

Det är möjligt att du har rätt. Måste fundera mer på relationen modell och implementation. Om man väljer alternativet med att spara meddelandena sist får man minst problem. Troligen är det så det är implementerat, eller så kan man välja från process till process. Jag ska ta reda på det

[pic]

Om unika nycklar. Oj, inte så bra. Ja, här måste man bestämma sig. Antingen har varje BIA instans en unik nyckel, vilket jag tycker att de ska ha, eller kan instanser ha samma nyckel, som Christer uppenbarligen tycker (om han nu inte bara tänkt fel). Jag tror att det kan finnas vissa skäl att acceptera Christers syn, även om jag inte tycker det. Om du vill kan jag försöka utveckla det vid ett senare tillfälle.

2. Jo, varje instans av en BIA har sina värden i datainstansen. Sedan finns en BIA, dvs en process på typnivå, och även denna har data/variabler som är gemensam för alla instanser och som de kan utnyttja. Det kan vara en variabel som anger hur många instanser det finns av denna BIA, och som räknas upp när en ny instans skapas och räknas ned när den försvinner. OK! Flera BIOr kan packeteras i en BPI. Även denna BPI har data/variabler gemensamma för att BIOr som finns i BPI:en och som kan utnyttjas för att kordinera BIOrna. Hur detta i praktiken ska användas har jag inte funderat igeom så mycket.

Frågor del 2

1. I BML:s dynamiska diagram är samtliga symboler exekverbara. Det krävs dock att man skriver ett skript för varje symbol i språket Python för att kunna exekvera modellerna.

2. Oj, denna fråga är nog svår att svara generellt på. Och du vill ju helst ha generella mönster som svar på din fråga. Jag behöver tänka mer på detta eftersom flera alternativ möjliga och vilken design du väljer beror lite på vilken lösning eller vilket system du vill ha (Notera också att om du använder dig av en process broker bör du fråga dig vad du vill att process brokern ska göra och vad som applikationer utanför systemet bör göra. En lösningn på din fråga kan ju vara att skicka ett message till en applikation utanför process brokern/utanför systemet som i sin tur meddelar alla studenter. Men nu är ju frågan vad BML kan göra.)

I BML måste varje process (BIA) som tar emot ett meddelande ha en receive message symbol, oavsett om det är ett broadcast eller inte. Om du vill modellera upp ditt föreslagna fall bör du modellera en process X (BIA) som väntar på ett meddelande, i detta fall ett broadcast. Det finns en instans av denna process för varje elev. Det innebär att när ett broadcast skickas till alla elever kommer lika många instanser av denna process att sätta igång att exekvera som det finns elever. Dessa processinstanser kan antingen initieras vid detta broadcast, se fig 1, eller så har dessa instanser initieras vid något annat tillfälle, till exempel när eleven skrev in sig, se fig 2. I detta senare fall, fig 2, är instansen hela tiden levande tills någon tar bort den. Sedan är ju frågan vad som är tänkt att hända efter att broadcastet mottagits. Ska en applikation/db utanför systemet meddelas. Så har jag modellerat i fig 1 och 2. Man kan också tänka sig att det skickas meddelanden till andra BIOr.

Ett problem är dock om du har en lång BIA, dvs en BIA som tar tid att exekvera klar. Kanske vill du att denna process ska avbrytas av ett broadcast. Då måste du efter varje Wait for Event ha ett receive message som kan ta emot detta broadcast.

3. Det var en bra fråga. Du visar det genom ett send message och du markerar att detta meddelande går till denna BIA(typ). Sedan kan man se i datainstansen att meddelandet har en nyckeln/id är identiskt med samma BIA som skickat meddelandet. Däremot ser man inte i själva BIA processmodellen att meddelandet ska skickas till samma instans av BIAn, utan du måste studera datainstansen. Men det skulle ju kunna gå att fixa någon speciell symbol i processen som visar detta.

Jag kan inte komma på något exempel på rak arm när man har behov av att skicka ett meddelande till sin egen instans, men jag utesluter inte att det kan finnas behov. Jag kan fråga Christer om han vet något exempel.

4. Oj, frågorna blir svårare och svårare. Denna fråga har väl med implementation och arkitektur av process brokern att göra, snarare än med BML,och återigen inget som är unikt för BML. Detta är nog också en fråga som utvecklarna av Visuera Process Manager (PM) ska svara på. Om du vill kan jag vidarebefordra den. Men jag tror att du har tolkat saken rätt. Olika BIOR kan köras på olika servrar, dvs på olika processorer. Process Managern har en treskiktsarkitektur för att möjliggöra skalbarhet. Däremot tror jag inte att man skulle kunna köra olika instanser av samma BIA på olika servrar, vilket möjliggör sann parallelism. Det beror på att man måste kunna adressera en specifik instans ( som har en unik nyckel/id) av en process. Det implementeras, om jag minns rätt, genom att först söka upp rätt BIAn, som finns på en server, och sedan från denna hitta instansen, som finns på samma server. Men i teorin är det kanske inget som utesluter att BIAn och instanserna av denna BIA ligger på olika servrar. Men denna fråga är komplicerad. Även i fallet där två Bior ligger på olika servrar och kan köras parallellt måste ju någon slags synkroniseringsmekanism finnas. Dessutom kan ju en server ha flera processorer osv. Om jag minns rätt har

5. Det är bara Viewlocity som använder det. Dessutom har ju de intellektuella rättigheterna för BML och PM övergått till Visuera (). Jag är inte säker på när BML skapades, utvecklingen har pågått under en längre tid. Symbolerna var mindre lika SDL:s i början eftersom man inte kände till SDL då. Troligen såg språket ut ungefär som det gör idag kring 1998.

Jag tror att IDEF3 har likheter med BML och SDL, kolla gärna det.

Skillanden mellan SDL och BML är framförallt datamodellen, som Paul dock tycker är syntaktiskt socker i jämförelse med SDL:s. Jag håller dock inte med, utan att ha funderat igenom det så värst mycket. Fast det är nog bäst du kollar med Paul, jag kan ha missförstått honom. BML datamodell är väldigt enkel, tydlig och hierarisk, och passar tankarna kring interface och meddelanden på ett bra sätt, tycker jag. Jag kan utveckla det. . BML, åtminstone som jag och Christer använder det när vi modellerar, kan ses spår som ett tåg kan åka på. SDL modellerar på ett annat sätt. Där kan du hamna i en återvändsgränd utan att det är fel. Jag har några bilder som visar några skillnader som jag kan leta upp om du vill. SDL har också fler symboler, till exempel Save-symbolen.

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download