Translated andromda3.2 User Manual
Use case diagram (use-Cases)Use cases represent a set of logical processing, and the use case names cannot be the same. The version of the use case is <frontendusecase>. <Frontendapplication> is the version of the application entry, and only one of the use cases is this version. Each Use Case maps to the global-forward element in the struts-config.xml file when code is generated.
Activity Graphs)The activity diagram should be a child element of the use case.
Initial status (initial states)Each activity requires an initial state, which indicates the start of the use case. There is no input stream and only one output stream. Only one initial status is allowed in each activity diagram.
Action status)An action status indicates a status that can be recorded by the application. In bpm4struts, the action status can be used on the client (View: JSP) and server (Controller: struts actions). The action status of the client is marked as <frontendview>, it represents a JSP page and can have multiple output streams (each input stream represents a call to the server ). The server action status does not require any version type, but only one output stream is allowed, or no output stream (in special cases ).
Stream (transitions)The stream is used to connect different states in the activity diagram. By adding tagged values to the stream, you can indirectly transmit information between client action states.
Event Parameters)Event parameters are defined on the client action status output stream. If a stream with event parameters is defined, it represents a web page-oriented server-side call, usually a form is submitted, and these event parameters represent fields in the form.
Page Variables)The page variable definition method is similar to the event parameter. The difference is that the page variable is defined in the input stream of the client action status. These page variables can be used on the generated JSP page ..
Decision Point (demo-points)In some cases, it is not enough to have an action or a stream. For example, if the user logs on successfully or fails, different streams are used. In this case, decision points are required.
Final states)In the activity diagram, there can be multiple end states. In bpm4struts, the end state indicates that the use case ends and enters the next use case. There are two methods to define the end state: use the name of the next use case to name the end state, and use a hyperlink to point to the next use case without naming the end state.
Passing parameters between Use CasesSometimes parameters need to be passed between two use cases, which can be easily achieved using bpm4struts.
JSP pageEach <frontendview> action status generates a JSP page when the code is generated.
Struts actions/FormsThe output stream of the initial status or version is <frontendview> action status. The struts action and Struts form classes are generated when the code is generated. Parameters defined on the stream signal event will be used as form fields.
Controller (controllers)For each use case, a class should be defined. This class contains all the methods called in the activity diagram of the use case. This class is the controller. This use case and class should be associated. There are two methods available for reference (depending on the modeling tool ): l use this class as the context of the use case l specify a tagged value for the Controller, pointing to the use case