Oracle神諭

            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            284 隨筆 :: 9 文章 :: 106 評論 :: 0 Trackbacks

          #

          (一)結構:
          (1)XML定義文件(definition)
          (2)plain java   JBpm對象模型  定義 執行 日志
          (3)DataBase  定義 執行 日志
          (二)
          A process definition can be represented in 3 different forms : as xml, as java objects and as records in the jBPM database. Executional (=runtime) information and logging information can be represented in 2 forms : as java objects and as records in the jBPM database.{一個流程定義可以表現為三種不同的形態:XML 、java對象和jBpm數據庫中的記錄。執行(運行)信息和日志信息可以表現為兩種形態:java對象和jBpm數據庫中的記錄}

          For more information about the xml representation of process definitions and process archives, see Chapter 13, jBPM Process Definition Language (JPDL).{Process Definition Language JPDL}

          This chapter will discuss the transformations done between the java objects and the jBPM database. To store java objects in the database and retrieve them, jBPM uses hibernate internally. While it is not strictly necessary to have hibernate knowledge for using jBPM, it is recommended. {這個章節將要討論在java對象和jBPM數據庫之間的轉換。為了在數據庫中存儲對象和獲取他們,jBPM使用內部使用了Hibernate。當然不是在使用jBPM中嚴格要擁有Hibernate的知識,它是建議的}

          More information on how to deploy a process archive to the database can be found in Section 13.1.1, “Deploying a process archive” .


          (三)Session的層次:
          JbpmSessionFactory
          |
          |
          |
          JbpmSession
          |
          |
          |
          GraphSession
          TaskMgmtSession
          ContextSession

          (四) The jBPM database classes

          The jBPM persistence operations can be found in the named sessions like e.g. GraphSession, TaskMgmtSession and ContextSession,... The named sessions can be obtained from a JbpmSession. The JbpmSession in its turn can be obtained from a JbpmSessionFactory. {jBPM持久層操作可以發現被命名為sessions,例如想GraphSession TaskMgmtSession和ContextSession.... 這個命名sessions可以從JbpmSession中獲得。JbmpSession可以從JbpmSessionFactory中獲得}

          A JbpmSessionFactory is threadsafe so in your application, you need one JbpmSessionFactory. That singleton can be referenced e.g. in a static variable with lazy initialization (beware about the issues around lazy initialization and double-checked locking). At creation time, the JbpmSessionFactory prepares all information in a way that JbpmSessions can be created super fast. {一個JbpmSessionFactory在你的程序中是線程安全的,你僅僅需要一個JbpmSessionFactory. 那個單例可以被參考在例如在lazy初始化下的靜態變量(小心發布在Lazy 初始化并且雙層檢查鎖定。在創建時刻,JbpmSessionFactory 在某種程度準備所有信息那樣可以被快速創建)}

          As a user, you should create one JbpmSession per thread or per request. The JbpmSession has a JDBC connection to the database. {作為一個用戶,你應該創建一個JbpmSession 每一個線程或每一次請求。JbpmSession擁有一個連接數據庫的Jdbc連接。}

          The purpose of the JbpmSession and JbpmSessionFactory is only to wrap their hibernate counterparts. For advanced features such as detached objects or optimistic locking, see the hibernate documentation. {這個JbpmSession和JbpmSessionFactory的目的僅僅是為了包裝Hibernate 副本。 對于高級特征 例如分離對象或樂觀鎖,看hibernate文檔。}

          public class PersistenceApiTest extends TestCase {

            static JbpmSessionFactory jbpmSessionFactory = JbpmSessionFactory.buildJbpmSessionFactory();

            public void testStartProcessInstance() {
              // obtain a session
              JbpmSession jbpmSession = jbpmSessionFactory.openJbpmSession();
              try {
                // start a user managed transaction
                jbpmSession.beginTransaction();

                // load information from the database
                // (note that process definitions will be cached in memory
                // in the second level cache of hibernate)
                ProcessDefinition auctionProcess =
                  jbpmSession.getGraphSession().findLatestProcessDefinition("auction");

                // perform a POJO workflow operation on the plain object model.
                ProcessInstance auctionInstance = new ProcessInstance(auctionProcess);
                auctionInstance.signal();
               
                // store the result in the database
                jbpmSession.getGraphSession().saveProcessInstance(auctionInstance);
               
                // commit the user transaction
                jbpmSession.commitTransaction();

              } finally {
                // close the session.
                jbpmSession.close();     
              }
            }
          }

          posted @ 2005-06-14 18:04 java世界暢談 閱讀(1832) | 評論 (0)編輯 收藏

          流程定義XML流:
          1.定制action:
          <process-definition>
             <start-state>
                <transition to="s"/>
             </start-state>
             <state name="s">
                <transition to="end">
                   <action class="com....MyActionHandler"/>
                </transition>
             </state>
             <end-state name="end"/>
          </process-definition>
          2.有對應事件的
          <process-definition>
             <start-state>
                <transition to="s"/>
             </start-state>
             <state name="s">
                <event type="node-enter">
                   <action calss="com....MyActionHandler"/>
                </event>
                <event type="node-leave">
                   <action calss="com....MyActionHandler"/>
                </event>
                <transition to="end"/>     
             </state>
             <end-state name="end"/>
          </process-definition>
          3.任務分派XML流程定義
          <process-definition name="the baby process">
             <start-state>
                <transition name="baby cries" to="t"/>
             </start-state>
             <task-node name="t">
                <task name="change nappy">
                   <assignment class="com....NappyAssignmentHandler"/>
                </task>
                <transition to="end" />
             </task-node>
             <end-state name="end"/>
          </process-definition>

          posted @ 2005-06-06 17:07 java世界暢談 閱讀(1368) | 評論 (0)編輯 收藏

          JBPM_ACTION                                 action記錄表
          JBPM_DECISIONCONDITIONS     結果條件表
          JBPM_DELEGATION                        委托表
          JBPM_EVENT                                    事件表 處理進入或者離開事件
          JBPM_EXCEPTIONHANDLER        異常處理表
          JBPM_ID_GROUP                             用戶組表
          JBPM_ID_MEMBERSHIP                 用戶成員表   表現用戶和組之間的多對多關系
          JBPM_ID_PERMISSIONS                用戶權限表
          JBPM_ID_USER                                用戶表
          JBPM_MODULEDEFINITION         模塊定義表
          JBPM_MODULEINSTANCE            模塊實例表
          JBPM_NODE                                     流程節點表
          JBPM_POOLEDACTOR                   匯集參與著表
          JBPM_PROCESSDEFINITION         流程定義表
          JBPM_PROCESSFILE                       流程文件表
          JBPM_PROCESSFILEBLOCK         流程文件塊表
          JBPM_PROCESSINSTANCE           流程實例表
          JBPM_RUNTIMEACTION               運行中行為表
          JBPM_SCRIPTVARIABLES             腳本變量表
          JBPM_SWIMLANE                          泳道表
          JBPM_SWIMLANEINSTANCE       泳道實例表
          JBPM_TASK                                     任務表
          JBPM_TASKACTORPOOL             用戶行為匯總
          JBPM_TASKINSTANCE                 任務實例
          JBPM_TIMER                                   計時表
          JBPM_TOKEN                                 令牌表
          JBPM_TOKENVARIABLEMAP      令牌變量影射表
          JBPM_TRANSITION                        轉換表
          JBPM_VARIABLEINSTANCE         變量實例表
          JBPM_VARIABLEINSTANCEBLOCK  變量實例塊表
          JBPM_VARIABLEMAPPING            變量影射表
          posted @ 2005-06-06 13:27 java世界暢談 閱讀(2642) | 評論 (8)編輯 收藏

            最近剛剛開始接觸工作流,感覺這個東西確實很不錯。當然現在自己還沒有入門,因為自己的幾個朋友在開發中接觸類似的東西。現在也開始接觸一些。
            目前選擇jBPM作為研究的對象,其他的工作流(OSWorkflow)暫時先放在一邊,因為jBPM將hibernate3.0作為其持久層的解決方案,而自己對Hibernate現在也有了一定的認識。想來,上手應該好一些的。
            昨天和朋友在一起的游泳的時候,也談了很長時間的工作流。工作流有自己的一套Database,其中主要記錄的是狀態信息。工作流關心的就是狀態信息。可以有流程描述語言來設置流程,jBPM有自己一套繪制流程的工具(提供的是一個插件)。不過在具體的業務信息中也要處理狀態信息,方便于流向下個業務層面。流程可以回滾處理。
            典型的一個流程,甲寫了一個請假申請,提交給領導乙,領導拿到后,不給予審批,然后將給第三方丙。丙來處理這個流程。
          posted @ 2005-06-06 13:02 java世界暢談 閱讀(834) | 評論 (1)編輯 收藏

          僅列出標題
          共29頁: First 上一頁 21 22 23 24 25 26 27 28 29 
          主站蜘蛛池模板: 巴林右旗| 广水市| 海兴县| 韶山市| 鹰潭市| 永登县| 台湾省| 陆川县| 嘉义市| 工布江达县| 泉州市| 饶阳县| 博乐市| 大宁县| 通化县| 淮北市| 凉城县| 巧家县| 楚雄市| 光山县| 新源县| 包头市| 昆明市| 乌拉特前旗| 阿勒泰市| 大理市| 临漳县| 宁安市| 横山县| 行唐县| 南平市| 独山县| 英吉沙县| 侯马市| 汶上县| 鹤山市| 湖北省| 宁国市| 宁津县| 明水县| 塘沽区|