<body>
6.2 Handling Other tasks
Transact out library task public String Outstore () {map<string, object> variables = new hashmap<string, object> (); Variables.put ("Warehouse Administrator", Boscontext.getloginuser (). GetUserName ());p Rocessengine.gettaskservice (). Complete (TaskId, variables); return "Topersonaltasklist";} Handling distribution Tasks Public String Transfergoods () {map<string, object> variables = new hashmap<string, object> (); Variables.put ("PI", Boscontext.getloginuser () GetUserName ());p Rocessengine.gettaskservice (). Complete (TaskId, variables); return "Topersonaltasklist";} Sign-off task public String receive () {map<string, object> variables = new hashmap<string, object> (); Variables.put ("PI", Boscontext.getloginuser () GetUserName ());p Rocessengine.gettaskservice (). Complete (TaskId, variables); return "Topersonaltasklist";}
Project Review
1. First day of the project
Project Overview
1, project background, software development process (waterfall model), common types of software projects (OA, CRM, ERP, CMS)
2. Build BOS Project Development environment (SSH +mysql+tomcat)
3. Homepage design (Easyui in Layout, accordion, tabs, Ztree plugin (using standard JSON data 4, construct ztree, construct Ztree tree with simple JSON data)
4. Design database using PowerDesigner
2. The second day of the project
1. Extract Basedao and baseaction (generic + reflective)
2. Realize user login (based on Basedao and baseaction), use of verification code
3, Easyui message prompt box Messager (show, alert, confirm, prompt, progress)
4. Easyui menu Button Menubutton
5, write Struts2 Custom Interceptor (if the user is not logged in, automatically jump to the login page)
6. Use Easyui's Validatebox control for form verification
6. Implement password change function based on Windows window
3. Third day of the project
1, basic set part of the demand analysis (pick-up, area, division, fixed area)
The entire BOS project is divided into basic settings, pick-up, transit, routing, reporting parts
2. Export the SQL file according to the provided PDM file, generate the entity class and HBM
3. Usage of the DataGrid in Easyui
Method One: Render the HTML code in the page as a DataGrid style
Mode two: Send AJAX requests to load server-side JSON data to construct DataGrid data
Method Three: Dynamically create the DataGrid with JS code
4, based on the DataGrid implementation of the paging query (implement a common paging query method in Basedao)
5, modify the Pi Echo (based on the load method of the form to implement Echo)
6, add the pick-up (expansion of mobile phone number of the check rule)
7. Delete the pick-up staff (tombstone)
4. Fourth day of the project
1, ocupload One-click Upload JS plug-in use (simulated Ajax asynchronous effect)
2. Using Apache's POI technology to read data from Excel files
3, PINYIN4J tool class use
4, based on (one-click Upload, POI, pinyin4j) to achieve the region's bulk import function
5, the area of the paging query
6. Reconstruct the paging query code (baseaction)
7. Use of ComboBox (dropdown box) control in Easyui
8. Add function for partition based on ComboBox (ComboBox filter function)
9, implementation of the combination of partition conditions paged query
10, based on the POI to achieve the partition data export function
5. Fifth day of the project
1. Add function of the fixed area (add window using ComboBox to display the data of the dispatch, using the DataGrid to display the partition data)
2, Fixed page query
3. Use of the Hessian framework (Remote call technology)
Remote Call technology: Hessian, WebService (CXF, Axis2), httpClient
4, the use of Hessian publishing services in the CRM service, to provide services to inquire customer information
5. Remotely invoke the CRM service in the BOS project
A. Providing an interface in BOS and corresponding to the interface in CRM
B. Creating a proxy object for the client on the interface, invoking the CRM remotely through the proxy object
6. Sixth day of the project
1, Business acceptance (business notice, ticket, work order)
A. Remotely call CRM in the BOS project based on the phone number to obtain customer information and echo back to the page
B. Automatic sorting according to the customer's pickup address
2. The editing function of the DataGrid
A. Set the editor property to specify that the column has editing capabilities
B. Calling method BeginEdit to turn on editing
C. Calling method EndEdit end Edit function
D. Inserting a row in a data table dynamically by Method InsertRow
E. Getting the index of a row by method Getrowindex
F. Ending an edit event with an event Onafteredit listener
3, based on the data table editing function to achieve work order fast input function
7. Seventh day of the project
1. Overview of permissions (authentication, authorization)
2, the common way to control the rights (URL interception, method annotation (proxy), page label control)
3. Getting started with the Shiro framework
A. Functions: Authentication, authorization, session management, encryption
B.shiro Running Process: Application Code----->>subject-------->>securitymanager------>realm
4. Apply Shiro to the BOS project for authentication and authorization
A. Configuring a filter in Web. XML, Spring provides for consolidating the Shiro
B. Configure a bean,id for shirofilter in Applicationcontext.xml
C. Configure a security manager in Applicationcontext.xml and inject it to the Shirofilter
D. Configure a realm in applicationcontext.xml and inject it to the security manager
E. Modify the Login method in Useraction, authenticate using Shiro, and finally call to realm
5. Use Shiro annotations for permission control
A. Turn on annotation functionality (Configure auto proxy, slice class in spring configuration file)
B. Using Shiro annotations on the action method
C. Modifying the construction method of Baseaction
8. Eighth day of the project
1. Initialize permission data (insert permission data into permission table via SQL script)
2. Role management (add, query)
3, user management (add, query)
4, modify the authorization method in the Bosrealm, according to the login to query the corresponding permissions
5. Use Ehcache to cache permission data
A. Importing the Ehcache jar
B. Provide ehcache configuration files (obtained from the jar package)
C. Configure a cache manager in the spring configuration file and inject it to the security manager
6, Shiro label use
7. The left menu of the system is displayed according to the permission of the login.
9. Nineth Day of the project
1. Workflow Concept
2, install plug-in Eclipse plug-in, design process
3. Create 23 tables of the ACTIVITI framework (deployment table, process definition table, process instance table, Task table, Binary tab, process variable table, Group table, user table, relational table)
4. Deployment process definition, query process definition, START process instance, query process instance, process picture name and input stream, query task, handle task
5, the web version of the process designer use
10. Tenth day of the project
1. Querying historical data
2, process variables set, get
3. Group tasks (candidates, candidate groups)
4. Listener (execution, Task)
5. Gateway (exclusive, parallel)
6, Spring Integration Activiti
11.11th Day of the project
1. Deployment process definition (upload to server via ZIP file, complete deployment)
2. Query the latest version of the process definition list data
3, based on the struts2 file download implementation view PNG flowchart slice function
4. View running process instances (run status, Query task node coordinates)
5. Synchronize the role data and user data in the BOS system to the Activiti table
It can also be implemented through a database trigger
12.12th Day of the project
1, Design logistics distribution process (task assignment based on group tasks, use of exclusive gateway, branch selection using process variables implementation)
2. Start the logistics distribution process (set process variables---work order)
3. Query group tasks
4. Pick up group tasks and become personal tasks
5. Query Personal Tasks
6, to handle personal tasks (each task of the handling of an action method)
Framework day58 BOS Project exercises (based on Activiti logistics distribution process, start, inquiry, processing, Project Knowledge Point Review)