"Activiti: Application of Knowledge" "chapter three" Activiti HelloWorld procedure (Activiti Modeler drawing teaching)

Source: Internet
Author: User

The first two chapters

"Activiti:" The first chapter of the workflow core API

"Activiti: Apply to the Knowledge" "Chapter two" Activiti the configuration file XML integration with 100,000 why



This chapter begins with a simple HelloWorld program to warm up your son and get excited ....


First of all, let's draw a flowchart (I use the Beijing Edge network to provide online process designer, as if it is based on the original Activiti transformation), as to how to draw? Let's see.




Click on the first event (yes, the circle one), fill in the attribute values respectively ID is start and the name is the beginning, the other is the ID is end and the name is ended


Simply draw a good picture, and then we start the process, first give a simple code to start the process to see you:

  /**     * Start process     */map<string, object> variables = new hashmap<string, object> (); ProcessInstance processinstance = Runtimeservice.startprocessinstancebykey ("Test", variables); String Pid=processinstance.getid (); SYSTEM.OUT.PRINTLN ("process started, Process ID:" +pid);

Then the process is started, but these must be based on the integration of Activiti, how to integrate into a chapter "Activiti: The Application of" "chapter two" Activiti configuration file XML integration and 100,000 why, here to use RuntimeserviceStart the process instance Runtimeservice, it's a direct autowired.

@Autowired private Runtimeservice Runtimeservice;


You can then look at the table act_hi_procinst(History flow instance information) Table brain complement, see theActiviti database table structure (table detailed version))

Because this time HelloWorld said the beginning of the end, so this time can only learn the history of the flow chart, see,start_act_id_(start) and end of the start and end_act_id_(end) Is the ID of the drawing we just made.

Proc_inst_id_ is the process ID that was printed when the process was started, (PS: But here's a id_ .) Later will say, here briefly, because the current node is relatively small, there is no difference,

Because each node of the workflow is logged, multiple IDs correspond to a process ID)



act_hi_actinst(History node table) table brain complement, see "Activiti database table structure (table detail)")

And then you can say a table


The specific people also understand, according to the previous understanding and the table of the brain complement,Duration_ is from the beginning HelloWorld and end the length of time spent HelloWorld

Act_type_ is just a drawing drag, here is the English version of the field (Beijing Yuan Network designers are translated into Chinese.) )

ID those with act_hi_procinst understanding can be!!!

Summarize:

*  today to show you how to draw, you can try to draw a test to try!!





Activiti: Learning from the "third chapter" Activiti HelloWorld Program (Activiti Modeler drawing teaching)

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.