2015-8-11 work Log

Source: Internet
Author: User

1. Work plan: Complete the function of system leave management.

(1) According to the system needs to complete the leave management model;

(2) The deployment of the leave process;

(3) The process definition management of the leave process;

(4) the process configuration management;

(5) Launch the Leave Management module;

(6) To take leave management and after the Usertask task page of the form page is written.

(7) Set up the agent function at all levels of the page

Yesterday, the next few did not finish, walk through, today continue to do.

There are several ideas:

1. In Lemonoa, the use of the Activiti engine for process management is naturally intended for code reuse. Its thought is task-driven, what does it mean? Once a process is initiated, each subsequent step is a task. In this case, we extracted a business model, a process structure. Each subsequent step can reuse the code of the task part, except that the data changes and becomes the task-related data: the form.

Do you remember that classic formula for the data structure class? program = data structure + algorithm. Here, the data structure = form, or the business model. If this is the case, in fact, the granularity is larger, there is a formula: type = Type of data on the operation of this type of data, the operation of the form is as follows,

If the granularity is smaller, it should be the Activiti process engine to drive the flow of the various state data, and at this time the operation of the business model is composed of Activiti API.

However, I feel that this is a little miscellaneous, it is clear that the granularity of the operation is fine, but the operation of the method is more, but the operation of the data types become diverse, XML, forms and so on. The lack of a common interface to encapsulate, like the I/O stream in Java, for the memory, for the file system, for the network.

2. Follow the above idea, in the case of large granularity, here the data is form a, the operation method is for the form of the various operations B, and the entire business model is the form of B design how to operate a algorithm.

3. Here, the front-end display of the form is worth mentioning. As we mentioned above, in order to be able to reuse the code, extract the task model and then design a set of APIs for task. But the front-end display, each task of the form is not the same, how to display. can also save the URL, and then redirect to a different URL, then we are in the design of a different JSP page, placed under a different directory.

What if we were to redirect to a fixed URL? It is necessary to put the form data in the front-end JSP page into the database, and then in the JSP page to assemble the data from the background, to reconstruct the DOM tree. Therefore, in the Lemonoa code Java and JS, there is a set of operations front-end form assembly and display code.

And the real world, and not as complicated as we think, is to encapsulate it with a variety of JSON data. Key & Value can hold most of the world's application scenarios.

Step two to process configuration management

I was stuck here yesterday, and I realized that I should still be unfamiliar with the business, after I drew the model through modeler, I generated the XML file and then decomposed the XML at deployment time, generating the individual instances of node nodes and depositing them into the database.

However, in the background of the process configuration, there is no modification of the XML file, or just the database insert and update operation, do not know. (The Procdef table reads once and a forward graph should be generated in memory.) Once the XML file is deployed, it is not changed, and the change is implemented by adding data to the BPM_ prefix table group. The semantics of deploying Deployer is to parse and decompose XML files. )

So, look at the MySQL log today, and it's estimated to see the parts of the Lemonoa that operate the Activiti API in the process.

-------------------------------

Avtiviti engine part in the engine flow, read a act_re_procdef, should be in memory to save a state diagram model, and then get the next task position.

State circulation, now check identitylink, and then hi_actinst–> ru_execution–> ru-task;

-------------------------------

However, it is clear that although the Activiti Code section, leaving the Tasklistener interface, but need a concrete implementation, so in Lemonoa code defined a lot of different types of listener, these listener need to be stored in the database. This is the meaning of the existence of the BPM_ prefix table group.

-------------------------------

In this Lemonoa system, the form supports file uploads, and the file data is stored locally through storeconnector.

--------------------------------

In the process design, you need to take into account the branch, as well as some of the implementation of automated jumps, which need to introduce variables when implemented. And when I query the flow of the MySQL database log, I will find that, in fact, the Varinst table is before the Taskinst table operation.

-------------------------------

Today, when I want to understand the process variables of knowledge, I saw a buddy's diary, very beautiful, very clear thinking, it is worth learning

----------------------------------

After the process management of Lemonoa, and the Activiti engine itself learning and becoming more familiar with, I think I should take a good look at the whole process of the code structure.

---------------------------------

The best way to learn a system is to draw a state diagram of the system and then get the event orchestration by the state graph.

For example, during the learning process, the process: Ready-Start-execute-block-terminate and so on.

For example, when learning GUI programming, event: Mouse Type Event-keyboard type event-other events and so on.

An event is a signal signal after a state change.

--------------------------------

Wednesday pm Weekly meeting Report:

1. I am now designing the absence process;

2. The need for a single process of leave alone is relatively clear;

3. The problem is as follows: (1) due to the possibility of data inventory database operation, it is necessary to add a new interface in the process flow, but also to design the database structure, (2) in the absence process, there are some automated task requirements, such as depending on the type of leave and the number of days of leave to do some automated tasks , which requires that we add a rule engine to the system. This is the main two problems that are now encountered.

----------------------------------

In Lemonoa, a lot of listener are defined, how do these listener work?

Step-by-step tracking, we can see the code eventually as the Processengineconfiguration configuration properties, study the Activiti and spring configuration interface. This piece of knowledge belongs to the interface category of spring and Activiti, and the field properties are not very clear.

-------------------------------------

I think about it, it's a bit better to go into the log system and look at the order of execution for different listener. Just can touch this OA log system to build the situation.

--------------------------------------

The system is too large, I decided to go through the line of code.

--------------------------------------

The variable management of Lemonoa has been unclear. Now a little bit of a concept, activiti the way to set variables is Setvariables (ID, MAP);

In this case, Lemonoa either call Taskservice for setvarible, or encapsulate it, and the Lemonoa is packaged.

--------------------------------------

In the Lemonoa of the Process Management module code, roughly over and over, the general experience of it.

First, according to this idea, if the function is not to go directly activiti, you can divide the code into: extension code and calling code.

Secondly, according to the module division, can be divided into: (1) Modeler, Modeler module. (2) Personal task module, which is equivalent to the front end of process management. (3) The background of the process management, the process is configured. (3) Form Design module.

Code distribution is this, divided into registered code, written in listener. The calling code is written in the controller. In the code, there are a lot of interfaces that are naturally for good expansion. Also wrote a lot of command objects, but in my opinion, these command objects, it seems not good, because the command is only a callback function, but also can not be able to parse the argument expression. Of course it's a command.

--------------------------------

In the next phase, consider how to configure the Drools engine and implement docking of forms and databases (primarily to consider reuse issues).

2015-8-11 work Log

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.