´«ÖDz¥¿Íjavaѧϰ jbpm½ø½×
ÎÒ½ñÌìѧϰÁËjbpmµÄ֪ʶ£ºÎÒ×öÁ˼òµ¥µÄÕªÒª£º
Á÷³ÌͼÖеĸ÷ÖÖ½ÚµãµÄ×÷Óü°Ó÷¨£º
ÐèÒªÓв»Í¬ÀàÐÍ£¨×÷Ó㩵Ľڵ㣬²ÅÄÜÉè¼Æ³ö¸´ÔÓµÄÁ÷³Ìͼ¡£JbpmÓÐÒ»Ì×Ô¤Ïȶ¨ÒåºÃµÄ½ÚµãÀàÐÍ¡£Èç¹û²»¹»Óã¬Ò²¿ÉÒÔʹÓÃ×Ô¶¨Òå½Úµã½øÐÐÀ©Õ¹£¬ÒÔÍê³É²»Í¬µÄÁ÷³ÌµÄÐèÒª¡£²»Í¬µÄ½ÚµãÀàÐÍ´ú±í²»Í¬µÄÐÐΪ¡£
ÿ¸öÁ÷³Ì¶¼±ØÐëÒªÓпªÊ¼½ÚµãºÍ½áÊø½Úµã¡£
Ô¤¶¨Òå½Úµã£º
start-state£¬¿ªÊ¼½Úµã£º±êʶÁ÷³Ì¿ªÊ¼¡¢
end-state£¬½áÊø½Úµã£º±êʶÁ÷³Ì½áÊø¡¢
task-node£¬ÈÎÎñ½Úµã£º¿ÉÒÔ·Å0¸ö»ò¶à¸öÈÎÎñ¡¢
decision£¬¾ö²ß½Úµã £ºÂ·¾¶Ñ¡Ôñ£¬Ö»Ê¹ÓÃÒ»¸öÁ÷ת£¨²æ·¿Ú£©¡¢
fork/join£¬·ÖÖ§½Úµã/ºÏ²¢½Úµã£º¿ÉÒÔ·ÖΪ¶à¸ö²¢ÐÐÖ´ÐеķÖÖ§¡¢
state£¬×´Ì¬½Úµã£ºµÈ´ý¡£
»¹ÓÐmail-node¡¢process-state¡¢super-stateµÈ
ÿ¸ö½Úµã¶¼¶ÔÓ¦Ò»¸öÀࣨJbpmµÄ³Ö¾Ã»¯Àࣩ£¬¶¼ÊÇorg.jbpm.graph.def.NodeµÄ×ÓÀà¡£½Úµã¶¼ÓÐÃû×Ö¡¢Á÷ת£¨end-state³ýÍ⣩¡£
start-state ½Úµã£º
¿ªÊ¼½Úµã£º±êʶÁ÷³Ì¿ªÊ¼±ß½ç¡£¿ªÊ¼×´Ì¬ÓÐÇÒÖ»ÓÐÒ»¸ö£¬¾ÍÊÇ˵Á÷³ÌÖв»ÄÜÓÐÈκÎtransitionÖ¸Ïò¿ªÊ¼½Úµã¡£
´´½¨ÐµÄÁ÷³ÌʵÀýºó£¬¾ÍÓÐÒ»¸ö¶ÔÓ¦µÄToken£¨RootToken£¬¸ùÁîÅÆ£©Ö¸Ïòstart-state¡£²¢ÇÒ´¦Óڵȴý״̬£¬ÐèÒª¸øToken·¢Ðźţ¨signal£©²ÅÄÜʹÁ÷³Ì¼ÌÐøÖ´ÐС£
signalÊôÐÔ£º
task-nodeµÄsignalÊôÐÔ£ºÖ¸¶¨Íê³ÉÈÎÎñʵÀý¶ÔÖ´ÐÐÁ÷³ÌµÄÓ°Ï죨·¢Ðźţ©¡£
£¨Ö¸¶¨ÄĸöÈÎÎñʵÀýÍê³Éºó»á·¢ÐźÅÀ뿪½Úµã
ÊôÐÔ¿ÉÈ¡µÄÖµ:
last£ºÄ¬ÈÏÖµ£¬µ±×îºóÒ»¸öʵÀý±»Íê³Éʱºò·¢Ðźš£µ±ÔÚÕâ¸öÈë¿ÚûÓÐÈÎÎñ±»Éú³Éʱºò£¬Á÷³Ì¼ÌÐøÖ´ÐУ¨·¢Ðźţ©
first£ºµ±µÚÒ»¸öʵÀý±»Íê³Éʱºò·¢Ðźš£µ±ÔÚÕâ¸öÈë¿ÚûÓÐÈÎÎñ±»Éú³Éʱºò,Ö´ÐмÌÐø.
never£º²»¹ÜÈÎÎñʵÀýÊÇ·ñÍê³É£¬¶¼²»·¢Ðźš£
nsynchronized£º½øÈë½Úµãºó¾Í·¢Ðźţ¬²»¹ÜÈÎÎñÊÇ·ñû½¨Á¢»òÓÐûÓÐÍê³É¡£¾ÍÊÇ˵ÈÎÎñµÄÖ´ÐкÍÁ÷³ÌÖ´Ðл¥²»Ó°Ïì¡£
last-wait£ºµ±½øÈë½ÚµãʱûÓÐÈÎÎñʵÀý±»´´½¨Ê±£¬¾Í»áÒ»Ö±´¦Óڵȴý״̬£¬Ö±µ½ÈÎÎñʵÀý±»´´½¨£»´´½¨ÈÎÎñʵÀýºó£¬¾ÍÊǵ±ËùÓеÄʵÀý¶¼Ö´ÐÐÍê³Éºó·¢Ðźţ¨ºÍlastÒ»ÑùÁË£©¡£
½øºó½Úµãºó
If( taskInstanceµÄÊýÁ¿ = 0 ){
Wait£¬Ö±µ½´´½¨ÈÎÎñʵÀý
}
Signal = “last” first-wait: ºÍlast-waitÒ»ÑùÀí½â¡£
decision ½Úµã£º
¾ö²ß½Úµã£ºÓÃÓÚ¼ÆËãÁ÷Ïò¡£ÔÚdecisionÖÐʹÓÃDecisionHandler¡£»òʹÓÃÒ»¸ö±í´ïʽ£¬Ò²ÊÇ·µ»ØҪʹÓõÄtransitionµÄn
Ïà¹ØÎĵµ£º
ÎÒÃǶ¼ÖªµÀjava¡¢c#¡¢vbµÈÓïÑÔ¶¼ÓÐsleepÔÝÍ£µÄº¯Êý£¬¶øJavaScript½Å±¾Ã»ÓÐÀàËƵŦÄÜ¡£
ÏÂÃæ¾ÍÊÇÎÒµÄʵÏֵķ½·¨£º
<mce:script type="text/javascript"><!--
function test()
{
var s="javascript--ÔÝÍ£º¯Êý";
setTimeout(
function(){
eval(sleep(test)); //Ö´ÐÐreturnÖ®ºóµÄ´úÂ룬Ҳ¾ÍÊÇ&ldq ......
ÒëÕß×¢ :Äã¿ÉÄÜ»á¾õµÃJavaºÜ¼òµ¥£¬ObjectµÄequalsʵÏÖÒ²»á·Ç³£¼òµ¥£¬µ«ÊÇÊÂʵ²¢²»ÊÇÄãÏëÏóµÄÕâÑù£¬ÄÍÐĵĶÁÍê±¾ÎÄ£¬Äã»á·¢ÏÖÄã¶ÔJavaÁ˽âµÄÊÇÈç´ËµÄÉÙ¡£Èç¹ûÕâƪÎÄÕÂÊÇÒ»·ÝJava³ÌÐòÔ±µÄÈëÖ°±ÊÊÔ£¬ÄÇô²»ÖªµÀÓжàÉÙÈË»áµôÂäµ½ÕâÑùµÄÏÝÚåÖС£ÔÎÄת×Ôhttp://www.artima.com/lejava/articles/equality.html Èýλ×÷Õ߶¼ÊDz»Í¬Áì ......
BlockingQueueÊÇÒ»¸ö½Ó¿Ú£¬Ëü´ÓQueue¼Ì³Ð¶øÀ´£¬
°üº¬ÁËQueueµÄËùÓй¦ÄÜ£¬²¢ÔÚQueueµÄ»ù´¡ÉÏÌṩÁË2¸öÐµĹ¦ÄÜ£º
1. ¼ìË÷ÔªËØʱµÈ´ý¶ÓÁбäΪ·Ç¿Õ
2. ´æ´¢ÔªËØʱµÈ´ý¿Õ¼ä±äµÃ¿ÉÓá£
ÏÂÃæ³Â¼Ò»Ð©JDKÎĵµÖйØÓÚBlockingQueueµÄ½éÉÜ£º
BlockingQueue ¿ÉÒÔÊÇÏÞ¶¨ÈÝÁ¿µÄ¡£ËüÔ ......
ÒòΪ¼´½«ÒªÑ§Ï°lucene£¬ËùÒÔÎÒÌáǰԤϰÁËluceneµÄÏà¹Ø֪ʶ£¬
1£¬luceneÊÇÖÚ¶àËÑË÷ÒýÇæÖеÄÒ»¸ö£¬¾ÍÏñ³Ö¾Ã²ã³ýÁËHibernateÍâÒ²ÓкܶàÆäËü¿ò¼Ü
Ò»Ñù¡£LuceneÊÇÒ»¸ö¿ª·¢¹¤¾ß°ü£¬ÎÒÃÇ¿ÉÒÔʹÓÃËûΪӦÓóÌÐòÌí¼ÓÈ«ÎļìË÷µÄ¹¦ÄÜ¡£
2£¬Ä¿Ç°ÒѾÓкܶàÓ¦ÓóÌÐòµÄËÑË÷¹¦ÄÜÊÇ»ùÓÚ Lucene µÄ£¬±ÈÈç Eclipse µÄ°ïÖúϵ
ͳµÄËÑË÷¹¦ÄÜ¡£ ......