"Activiti: Applying to Practice" "chapter Three" Activiti HelloWorld program (Activiti Modeler drawing teaching) __activiti-modeler

Source: Internet
Author: User

First two chapters

"Activiti: Applying to the Work" "Chapter One" workflow Core API

"Activiti: Applying to the Activiti" "chapter II" configuration file XML integration with 100,000 why



This chapter begins with a simple HelloWorld program to warm up the child, excitement ....


First, we will draw a flowchart (I use the online process designer provided by the Beijing Rim network, it seems to be based on the original Activiti transformation), as to how to draw. Look at the picture.




Click on the first event (yes, that's the round one), fill in the property value ID is start and the name is the beginning, the other is the ID is the end and the name is over


Simple drawing, and then we start the process, first of all to start the process of simple code to show 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 starts, but these must be based on the integration of the Activiti, how to integrate a look at the chapter "Activiti: The Use of" "chapter II" Activiti of the configuration file XML integration with 100,000 why, here use RuntimeserviceStart process instance Runtimeservice, it's a direct autowired.

@Autowired
 private Runtimeservice runtimeservice;


Then can correspond to look at table Act_hi_procinst(historical process instance information) Table brain complement, please see "Activiti database table structure (table details)")

Because this time HelloWorld said that the beginning of the end, so this time you can only learn the history process table, look at the following figure,start_act_id_(start) and end of start and end_act_id_ That's 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 another id_ is the same. Later will say, here simply, because the current node is less, there is no difference,

Because the workflow is recorded for each node, multiple IDs correspond to a process ID.


act_hi_actinst(History node table) Table Brain Repair, please see "Activiti database table structure (table details)")

And then you can say a table


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

Act_type_ is just drawing drag things, here is corresponding to the English version of the field (Beijing Edge Network designer has been translated into Chinese. )

ID those with act_hi_procinst Understanding on it ...

Summary:

* Today to show you how to paint, you can try to draw a try to test the first.





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.