In the next video, you will be introduced to the concepts of fork and join.
Next, as part of the activity diagram we'll be looking into Folk and Join. Folk is similar to your decision node where you will have one single inflow. But the difference here is in the decision node you will have of all possible options, only one definite outflow. Instead in the fork you will have all the outflows for sure and all these outflows happen concurrently. In other words, parallel in join, similar to the merge node you have multiple inflows, one outflow. The difference being from Join and merge. Although you have options for multiple inflows in merge at any point of time you are definite of getting only one inflow. While in, you are certain that all the inflows must happen for the outflow to happen. In Join, we literally wait for all the inflows to come in and complete for the outflow to happen that way. Join diverse from merge and fork differs from dish and node, the difference being in terms of concurrency. Let's see an example. In case of a supplier who receives an order, he checks if his product is available and based on his stock he decides to manufacture the product or not. Once the product is available, the product before it is shipped the supplier decides to do two things simultaneously. One is he would send the product to the inventory manager. At the same time he would also raise an invoice. Here the Send stock and rise invoice are happening simultaneously which is a fork. Now, similarly, in case of a join, once the supplier sends his stock and raises his invoice, the admin actually waits for getting the invoice and getting the stock. Once the stock is available in the inventory and the invoice is as well received only then the admin tries to view the invoice. This is the line of the stock being added to the inventory and the invoice being raised.
The segment discusses the concepts of Folk and Join in activity diagrams.
Folk is a node where all outflows happen concurrently, and there is one inflow.
Join is a node where all inflows must happen for the outflow to occur.
In Merge, although you have options for multiple inflows, you are certain of getting only one inflow at any point in time.
The difference between fork and decision nodes is in terms of concurrency.
Fork and Join nodes help in modeling concurrent behavior in activity diagrams.
The video provides an example of a supplier who receives an order, checks product availability, sends stock, and raises an invoice.
The process of sending stock and raising an invoice happens concurrently, which is a fork.
In the case of Join, the admin waits for both the invoice and stock to be received before viewing the invoice.
In the previous video, you learnt about fork and join. These are similar to decision nodes and merge nodes, respectively. Forks have one input flow and multiple output flows, while joins have multiple input flows and only one output flow. The difference is in the concurrency. You can represent fork and join in activity diagram as shown below.
Through the previous videos, you were introduced to the concepts of fork and join and how you can use them to design concurrent systems.