In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
Today, I will talk to you about what the basic components of Activiti are, many people may not know much about it. In order to make you understand better, the editor has summarized the following contents for you. I hope you can get something according to this article.
The following figure shows the basic artifacts used by the component flowchart in the actiBPM plug-in in idea:
There are mainly four kinds of components: start event, intermediate event, boundary event and end event. The following is a detailed description of the various components.
StartEvent
If the event is triggered when the event is started, it can only be triggered after it is triggered by a third party, and can be triggered by the relevant api of activiti.
Empty startup event: no other elements or attributes in the tag are defined.
Timing start event: can set one-time timing start, fixed time interval start, timeDate (one-time timing), timeDuration (set how long time to start the process), timeCycle (fixed time interval start).
Exception start event: an exception start event can trigger an abnormal subprocess, but it cannot be started through api. You can only wait for another event to throw an exception.
Message start event: wait for a message to start the event
EndEvetn
Null end event: the end event is thrown, and the empty end event does not handle the thrown result.
Exception end event: the exception end event defines the error code thrown by the exception. If there is an exception start event corresponding to the sum, enter the exception start event, otherwise it will be regarded as a null end event.
Termination event: you can terminate the operation of a process instance.
Cancel the end event: you can cancel the execution of a transaction subprocess and can only be used in a subprocess.
UserTask
You can set attributes such as processing users, user groups, forms, and so on, which must be triggered artificially.
ScriptTask
The script task does not need to be triggered artificially, and the process rotation to the script task will be executed automatically. The script task can use the engine to rely on other scripting languages, such as Groovy and JavaScript, that is, you can insert code from other languages directly into the xml content.
ServiceTask
It can be transferred to autorun without human interference, calling methods in java. You need to implement the JavaDelegate interface for the class and set the implementation class to the class property of the service event.
MailTask
Mail tasks can send messages through activiti, where mail messages are passed in a variable manner.
ManualTask
Manual task: activiti treats the manual task as an empty task, which is automatically completed by the engine and moved on to the next task when it is reached.
ReceiveTask
Receiving task: a receiving task is a simple and single task, which begins to wait for the arrival of a message after the task is created, and the task will not be completed until it is triggered.
BusinessRuleTask
Business rule task, which can process preset business rules according to the value of process variables.
CallActivitiTask
When the process executes to the callActivity, a new branch is created, which is the branch of the process that reaches the calling node. This branch is used to execute subprocesses, creating parallel subprocesses by default, just like a normal process. The superior process waits for the subprocess to complete before continuing down.
SubProcess
Sub-process: there are embedded sub-process and call sub-process. When embedding sub-process, part of the main process can only be called by the main process, and vice versa.
PoolLaneParallelGateway
Parallel gateway: a parallel gateway is used to model the flow of concurrent tasks. It can split a single line task into multiple paths or merge multiple routes.
Branch: all outgoing sequential flows after parallel, creating a concurrent branch for each sequential flow.
Aggregation: all reach the parallel gateway. Enter the branch waiting here. Until all the branches that enter the sequence flow arrive. The process passes through the aggregation gateway.
ExclusiveGateway
Exclusive gateway: an exclusive gateway is used to model decisions in the process. What is the difference between using online condition and simply using online condition, all processes that are true will be executed, while using exclusive gateway, even if there are multiple true, only the first one will be selected for execution. If there is no execution flow that meets the requirements, an exception will be thrown by the exclusive gateway.
InclusiveGateway containment gateway: includes gateway which combines the characteristics of exclusive gateway and parallel gateway. Exclusive gateway sets conditions on each line, parallel gateway can execute multiple lines at the same time, including gateway can not only execute multiple lines at the same time, but also allow setting conditions on the gateway.
Branch: all conditions for outgoing sequential flows are parsed. Sequential flows that result in true continue to run in parallel. A branch is created for each sequence flow.
Aggregation: all parallel branches arrive, including gateways. It enters the waiting table until each branch that includes the process token that enters the sequential flow arrives. This is the biggest difference from parallel gateways. In other words, including the gateway will only wait for the selected run to enter the sequential flow. After the aggregation, the process continues to run through including the gateway.
EvetntGateway
Event gateway: it allows multiple output streams to point to multiple different intermediate capture events.
Based on the agreement of the event gateway, the flow direction is inferred from the event.
Each outgoing sequential flow of the gateway is connected to an intermediate capture event. When the process reaches an event-based gateway, the gateway goes into a waiting state: it is suspended. At the same time, relative event subscriptions are created for each outgoing sequential flow.
Note that the outgoing sequential flow based on the event gateway is different from the normal sequential flow. These sequential streams don't really "run".
On the contrary. They let the process engine decide which events to subscribe to when running to an event gateway-based process.
Consider the following conditions:
Event-based gateways must have two or more outgoing sequential flows.
Based on the event gateway, only the intermediateCatchEvent type can be used. (activiti does not support connecting ReceiveTask based on event gateways. )
An intermediateCatchEvent connected to an event-based gateway can only have one entry into the sequential flow.
BoundaryEvent
A boundary event is a capture event bound to an activity, always listens for a trigger in an event, interrupts the activity after the event is captured, and then continues execution from the data flow of the boundary event type. Can capture signals, messages, timers, error signals
IntermediateCatchingEvent
Capture events in the middle, you can capture signals, messages, timer errors.
IntermediateThrowEvent
Intermediate event thrown: signal event can be thrown
AnnotionSequenceFlow
Standard sequential flow: allows you to add listening events.
Conditional sequential flow: conditional expressions can be added to reach the specified target activity only if the condition is met.
After reading the above, do you have any further understanding of what are the basic components of Activiti? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un