Oracle神諭

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

          #

          This is a preconfigured jboss 4.0.2 installation that contains jBPM.  
          這是一個包含jBPM的預先配置好的jboss4.0.2的安裝文件

          Deployed components
          配置組件:
          The jBPM service archive: The deploy directory contains a service archive that creates a JbpmSessionFactory at startup of the server and puts it in JNDI. To make use of this JbpmSessionFactory, you have to specify the property jbpm.session.factory.jndi.name=java:/jbpm/JbpmSessionFactory in your jBPM configuration (e.g. in the jbpm.properties in your WEB-INF/classes in your web application).
          這個jBPM 服務存檔:這個部署目錄包含一個服務歸檔,它創建一個JbpmSessionFactory 在服務器啟動并且把它丟到JNDI中。為了使用這個JbpmSessionFactory,你不得不使用指定這個屬性 jbpm.session.factory.jndi.name-=java:/jbpm/JbpmSessionFactory 在你的jBPM注冊文件(例如在jbpm.properties 在你的web程序中的 WEB-INF/classes 里)

          The jBPM database: The server includes a hypersonic database that is preconfigured. with the jBPM database tables. Also an example process is already present in the database. The database can be accessed via a TCP connection to port 1701 with the hsqldb driver.
          jBPM數據庫:這個服務器包含一個原先配置好的hypersonic 數據庫。使用這個jBPM數據庫表。也可以使用已經數據庫中設置好的.這個數據庫可以通過 tcp連接1701端口使用這個hsqldb驅動器。

          The jBPM web console application: The jBPM web console application is a simple webapplication that allows access to the jBPM database. Currently the functionality of the webapplication is still limited, but a lot of focus is going to go to the webapplication in the near future for making it easier to manage, maintain and monitor your business processes.
          Other customizations
          jBPM web控制臺程序:這個jBPM web控制臺程序是一個簡單的web程序,它允許訪問jBPM數據庫。當前這個web程序的功能仍然是受限制的,但是很多焦點, 在不久的未來打算使它更容易管理、維護和監控你的商業流程。

          For reducing download the minimal, default and all server configurations have been removed. Only the jbpm configuration is available. (start with run.bat -c jbpm).

           

          For improving startup time, some of the default services have been removed.

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

          <!--

          jbpm.db build script  (jbpm.db 編譯腳本)
          ====================

          The jbm.db build script consists of a few major sections(jbpm.db 編譯腳本包含一些主要部分):

          - general setup (普通安裝)
          - common tasks   (公用任務)
          - database specific tasks (數據庫特定任務)

          A database specific task calls common tasks with the database name as a parameter
          and carries out its duties. (一個數據庫特定任務調用公有的任務使用數據庫名作為一個參數,并且執行它的職責。)

          The main tasks are the database script creation and the database test run.(主要的任務是數據庫腳本創建和數據庫測試運行)

          Following is a explanation of the flow for both. They start off with the same steps.
          The explanation with use hsqldb as an example.(下面是一個流程的說明。他們開始使用同樣的步驟)

          1. "prepare" target compiles all jbpm.3 classes ("prepare" 目標編譯所有的jbpm3.classes )
          2. "hsqldb.prepare" target calls the "db.prepare" target with the parameter "hsqldb" ("hsqldb.prepare" 目標調用"db.prepare"目標使用"hsqldb"參數)
          3. "db.prepare" copies the resources tree from the jbpm.3 project and ()
          4. sources the property file hsqldb/hibernate.properties and replaces the
             properties from the main project in the copied hibernate config file with
             properties from the file making it database specific to the test settings using
             "hibernate.replace". This differs per database.
             ("db.prepare"從jbpm.3項目和 hsqldb/hibernate.properties 屬性文件復制資源目錄,并從在復制的擁有從文件屬性的hibernate配置文件中的主項目替換這些屬性,使用數據庫特定給test 的設置使用"hibernate.replace".這對每個數據庫是不同的 。
             )

          After this preparation the scripts targets (在這準備腳本目標之后)

          5. "hsqldb.scripts" target calls the "db.scripts" target with the hsqldb parameter ("hsqldb.script"目標調用"db.script"目標使用hsqldb 參數)
          6. "db.scripts" target creates the scripts files in the build/hsqldb/scripts folder based
             on the db specific hibernate configuration
             ("db.scripts"目標創建腳本文件在db特定hibernate配置文件的build/hsql/scripts/目錄 或test目標文件 )
          or the the test targets

          5. "hsqldb.test" target calls the "db.test" target with the hsqldb parameter ("hsqldb.test" 目標調用"db.test"目標使用hsqldb參數)
          6. "db.test" target runs all tests against the hsqldb database and creates a test report
             in build/hsqldb/testresults
             ("db.test"目標運行所有的測試 靠著hsqldb 數據庫和測試報告)
          -->

          posted @ 2005-06-22 11:54 java世界暢談 閱讀(514) | 評論 (0)編輯 收藏

          今天一個同事在琢磨:
          function dialogReturn(value1){
            window.parent.returnValue = value1;
            window.parent.close();
          }
          這樣一個函數的時候,有點模糊,后來查看MSDN終于找到答案。
          window Object  Represents an open window in the browser. (表現在瀏覽器中打開一個窗口。)

          Typically, the browser creates one window object when it opens an HTML document. However, if a document defines one or more frames (that is, contains one or more frame or iframe tags), the browser creates one window object for the original document and one additional window object for each frame. These additional objects are child windows of the original window and can be affected by actions that occur in the original. For example, closing the original window causes all child windows to close. You can also create new windows (and corresponding window objects) using methods such as open, showModalDialog, and showModelessDialog.
          如果一個文檔定義了一個或多個框架,瀏覽器為每一個框架創建一個window對象為這個源document和一個附加的window對象。 這些附加的對象是源文檔的子windows,并且受源動作的影響。例如,關閉這個源窗體導致子窗體也被關閉。
          returnValue Sets or retrieves the value returned from the modal dialog window.

          posted @ 2005-06-21 17:47 java世界暢談 閱讀(426) | 評論 (2)編輯 收藏

          <process-definition name="the scheduler process">
              <swimlane name="initiator"/>
             
              <start-state name="start" swimlane="initiator">
                  <transition to="only state">       
              </start-state>
             
              <state name="only state" swimlane="initator">
                  <action>
                     <delegation class="org.jbpm.delegation.action.SchedulerJobActionHandler">
                     <job>
                        <delegation class="org.jbpm.scheduler.LoggingActionHandler"/>
                        <delay>0</delay> (延遲)
                        <name>halleluya</name>
                     </job>
                     </delegation>
                  </action>
                 
                  <action event-type="state-leave">
                    <delegation class="org.jbpm.delegation.action.CancelJobActionHandler">halleluya</delegation>
                  </action>
                 
                  <transition to="end"/>
              </state>
             
              <end-state name="end"/>
          </process-definition>
          posted @ 2005-06-16 14:17 java世界暢談 閱讀(476) | 評論 (0)編輯 收藏

          Fork : A fork spawns(產生) multiple concurrent(并發) paths of execution.
          <process-definition name="the fork-in-loop process">
             <swimlane name="initiator"/>
            
             <start-state name="start" swimlane="initiator">
                <transition to="aFork"/>
             </start-state>
            
             <fork name="aFork">
                <transition to="aState"/>
             </fork>
            
             <state name="aState" swimlane="initiator">
                 <transition to="aJoin"/>
             </state>
            
             <join name="aJoin">
                <transition to="aFork"/>
             </join>
            
             <end-state name="end"/>
          </process-definition>
          posted @ 2005-06-16 14:17 java世界暢談 閱讀(984) | 評論 (0)編輯 收藏

          Decision : A decision decides between multiple paths of execution which are exclusive(獨占的)
          <process-definition name="the decision process">
             <swimlane name="initiator"/>
              
             <start-state name="start" swimlane="initiator">
                <transition to="only descision">
             </start-state>
            
             <decision name="only descision">
                <delegation class="org.jbpm.impl.DecisionTestDecisionHandler"/>
                <transition name="left" to="inside the left street"/>
                <transition name="right" to="inside the right street"/>
             </decision>
            
             <state name="inside the left street" swimlane="initiator">
                <transition to="end"/>
             </state>
            
             <state name="inside the right street" swimlane="initiator">
                <transition to="end"/>
             </state>
            
             <end-state name="end"/>
          </process-definition>
          posted @ 2005-06-16 14:14 java世界暢談 閱讀(2791) | 評論 (4)編輯 收藏

          9.4. Swimlanes(詠道)
          A swimlane is a process role(角色). It is a mechanism to specify that multiple tasks in the process should be done by the same actor.(多個任務被同一個用戶執行) So after the first task instance is created for a given swimlane, the actor should be remembered in the process for all subsequent(后來的) tasks that are in the same swimlane. A swimlane therefore has one assignment and all tasks that reference a swimlane should not specify an assignment.

          When the first task in a given swimlane is created, the AssignmentHandler of the swimlane is called. The Assignable that is passed to the AssignmentHandler will be the SwimlaneInstance. Important to know is that all assignments that are done on the task instances in a given swimlane will propagate to the swimlane instance. This behaviour is implemented as the default because the person that takes a task to fulfilling(實行) a certain process role will have the knowledge of that perticular process. So all subsequent(并發的) assignements of task instances to that swimlane are done automatically to that user.

          Swimlane is a terminology(術語) borrowed from UML activity(活動) diagrams.

          ------------------------------------------------------------
          9.5. Task events (任務事件)
          Tasks can have actions associated with them. There are 4 standard event types defined for tasks: task-create, task-assign, task-start and task-end.

          (1)task-create
           is fired when a task instance is created.

          (2)task-assign
          is fired when a task instance is being assigned. Note that in actions that are executed on this event, you can access the previous actor with executionContext.getTaskInstance().getPreviousActorId();
          executionContext.getTaskInstance().getPreviousActorId();

          (3)task-start
          is fired when TaskInstance.start() is called. This can be used to indicate(指示) that the user is actually starting to work on this task instance. Starting a task is optional.

          (4)task-end
           is fired when TaskInstance.end(...) is called. This marks the completion of the task. If the task is related to a process execution, this call might trigger the resuming(恢復) of the process execution.

          Since tasks can have events and actions associated with them, also exception handlers can be specified on a task. For more information about exception handling, see Section 7.5, “Exception handling”.

          ---------------------------------------------------------------
          9.6. Task timers(任務定時器)
          As on nodes, timers can be specified(指定) on tasks. See Section 10.1, “Timers”.

          The special(特別的) thing about timers for tasks is that the cancel-event for task timers can be customized(取消事件可以被定制). By default, a timer on a task will be cancelled when the task is ended (=completed). But with the cancel-event attribute on the timer, process developers can customize that to e.g. task-assign or task-start. The cancel-event supports multiple events.|取消事件支持多種事件| The cancel-event types can be combined by specifying them in a comma(逗號) separated list in the attribute.

          9.7. Customizing task instances(定制任務實例)
          Task instances can be customized. The easiest way to do this is to create a subclass of TaskInstance.|創建一個任務實例的子類| Then update the property jbpm.task.instance.class and specify the class name of your custom class that inherits from TaskInstance. Also create a hibernate mapping file for the subclass (using the hibernate extends="org.jbpm.taskmgmt.exe.TaskInstance"). Then add that mapping file to the list of mapping files in the hibernate.cfg.xml
          (1)更新jbpm.task.instance.class 的屬性
          (2)指定繼承TaskInstance的定制類
          (3)創建一個子類的影射文件(使用 extends="org.jbpm.taskmgmt.exe.TaskInstance")
          (4)將這個影射文件加到 hibernate.cfg.xml

          9.8. The identity component(身份組件)
          Management of users, groups and permissions is commonly known as identity management. jBPM includes an optional identity component that can be easily replaced by a company's own identity data store.

          The jBPM identity management component includes knowledge of the organisational model. Task assignment is typically done with organisational knowledge. So this implies knowledge of an organisational model, describing the users, groups, systems and the relations between them. Optionally, permissions and roles can be included too in an organisational model. Various academic(理論的) research attempts failed, proving that no generic organisational model can be created that fits every organisation.

          The way jBPM handles this is by defining an actor as an actual participant(參與者) in a process. An actor is identified by its ID called an actorId. jBPM has only knowledge(知道) about actorId's and they are represented as java.lang.Strings for maximum flexibility. So any knowledge about the organisational model and the structure of that data is outside the scope of the jBPM core engine.

          As an extension to jBPM we will provide (in the future) a component to manage that simple user-roles model. This many to many relation between users and roles is the same model as is defined in the J2EE and the servlet specs and it could serve as a starting point in new developments. People interested in contributing should check the jboss jbpm jira issue tracker for more details. 用戶和角色 (user-roles 模型)


          Note that the user-roles model as it is used in the servlet, ejb and portlet specifications, is not sufficiently powerful for handling task assignments. That model is a many-to-many relation between users and roles. This doesn't include information about the teams and the organisational structure of users involved in a process.


          The classes in yellow are the relevant(相關的) classes for the expression assignment handler that is discussed next.

          A User represents a user or a service.|一個用戶表現為一個用戶或一個服務。| A Group is any kind of group of users.|一個組是任何種類用戶組。| Groups can be nested to model the relation between a team, a business unit and the whole company.|組可以被內嵌到在團隊、商業單元和整個公司的關系模型。 | Groups have a type to differentiate between the hierarchical groups and e.g. haircolor groups.|組可以有一個種類來區分分等級的組和haircolor組。| Memberships represent the many-to-many relation between users and groups. A membership can be used to represent a position in a company.|一個membership可以被用來表現在公司中的位置。| The name of the membership can be used to indicate(指出) the role that the user fullfills in the group.

          9.8.2. Assignment expressions (分派表達式)
          The identity component comes with one implementation that evaluates an expression for the calculation of actors during assignment of tasks. Here's an example of using the assignment expression in a process definition:

          <process-definition>
            ...
            <task-node name='a'>
              <task name='laundry'>
                <assignment expression='previous --> group(hierarchy) --> member(boss)' />
              </task>
              <transition to='b' />
            </task-node>
            ...
          Syntax of the assignment expression is like this:

          first-term --> next-term --> next-term --> ... --> next-term

          where

          first-term ::= previous |
                         swimlane(swimlane-name) |
                         variable(variable-name) |
                         user(user-name) |
                         group(group-name)

          and

          next-term ::= group(group-type) |
                        member(role-name)

          9.8.2.1. First terms
          An expression is resolved(分解) from left to right.|一個表達式被從左到右進行分解| The first-term specifies a User or Group in the identity model.|第一個項目是在身份模型中指定了一個用戶或組| Subsequent terms calculate the next term from the intermediate(中間的) user or group.

          previous means the task is assigned to the current authenticated actor. This means the actor that performed the previous step in the process.

          swimlane(swimlane-name) means the user or group is taken from the specified swimlane instance.

          variable(variable-name) means the user or group is taken from the specified variable instance. The variable instance can contain a java.lang.String, in which case that user or group is fetched from the identity component. Or the variable instance contains a User or Group object.

          user(user-name) means the given user is taken from the identity component.

          group(group-name) means the given group is taken from the identity component.

          9.8.2.2. Next terms
          group(group-type) gets the group for a user. Meaning that previous terms must have resulted in a User. It searches for the the group with the given group-type in all the memberships for the user.

          member(role-name) gets the user that performs a given role for a group. The previous terms must have resulted in a Group. This term searches for the user with a membership to the group for which the name of the membership matches the given role-name.

          9.8.3. Removing the identity component
          When you want to use your own datasource for organisational information such as your company's user database or ldap system, you can just rip out the jBPM identity component. The only thing you need to do is make sure that you delete the line ...

          <mapping resource="org/jbpm/identity/hibernate/identitymappings.hbm.xml"/>
          from the hibernate.cfg.xml

          The ExpressionAssignmentHandler is dependent on the identity component so you will not be able to use it as is. In case you want to reuse the ExpressionAssignmentHandler and bind it to your user data store, you can extend from the ExpressionAssignmentHandler and override the method getExpressionSession.

          protected ExpressionSession getExpressionSession(AssignmentContext assignmentContext);

          posted @ 2005-06-15 13:42 java世界暢談 閱讀(967) | 評論 (0)編輯 收藏

          Assignment(分派)
          A process definition contains can have task nodes. A task-node contains zero or more tasks. Tasks are a static description as part of the process definition. At runtime, tasks result(起源于) in the creation of task instances. A task instance corresponds to(相應) one entry in a person's task list.
          tasknodes-->>task-node--->>tasks 

          With jBPM, push and pull model (see below) of task assignment can be applied in combination. The process can calculate(考慮) the responsible for a task and push it in his/her tasklist. Or alternatively(作為選擇), a task can be assigned to a pool of actors, in which case each of the actors in the pool can pull the task and put it in the actor's personal tasklist.  {這里提到了一個行為池的概念 pool of actors}

          9.3.1. Assignment interfaces
          Assigning task instances is done via the interface AssignmentHandler: {任務實例分派是依靠AssignmentHandler來實現的}

          public interface AssignmentHandler extends Serializable {
            void assign( Assignable assignable, ExecutionContext executionContext );
          }
          An assignment handler implementation is called when a task instance is created. At that time, the task instance can be assigned to one or more actors. The AssignmentHandler implementation should call the Assignable methods (setActorId or setPooledActors) to assign a task. The Assignable is either a TaskInstance or a SwimlaneInstance (=process role).

          Assignable 流程角色:TaskInstance  SwimlaneInstance

          public interface Assignable {
            public void setActorId(String actorId);
            public void setPooledActors(String[] pooledActors);
          }

          Both TaskInstances and SwimlaneInstances can be assigned to a specific user or to a pool of actors. To assign a TaskInstance to a user, call Assignable.setActorId(String actorId). To assign a TaskInstance to a pool of candidate(侯選) actors, call Assignable.setPooledActors(String[] actorIds).

          分配對象:
          分配給一個用戶       Assignable.setActorId(String actorId);
          分配給一個侯選用戶池 Assignable.setPooledActors(String[] actorIds);

          Each task in the process definition can be associated with an assignment handler implementation to perform the assignment at runtime.


          When more then one task in a process should be assigned to the same person or group of actors, consider the usage of a swimlane

          在一個流程當多于一個任務時應當被分派給一個用戶或多用戶的組,考慮使用泳道。

          To allow for the creation of reusable AssignmentHandlers, each usage of an AssignmentHandler can be configured in the processdefinition.xml. See Section 13.2, “Delegation(委托)” for more information on how to add configuration to assignment handlers.

          9.3.2. The assignment data model
          The datamodel for managing assignments of task instances and swimlane instances to actors is the following. Each TaskInstance has an actorId and a set of pooled actors.

          The actorId is the responsible for the task, while the set of pooled actors represents a collection of candidates that can become responsible if they would take the task. Both actorId and pooledActors are optional and can also be combined.


          Pull model(拉模式)
          On the other hand, the tasks of pooled tasks for a given user are the tasks for which the given user is referenced in the pooled actors.
          Fetching the list of pooled tasks is typically a two step operation :
          1) get all the groups for the given user from the identity component. and
          2) get the list of all pooled tasks for the combined set of the user's actorId and the actorId's that reference the users' groups.
           Getting the list of pooled tasks that are offered to a given user can be done with the methods TaskMgmtSession.findPooledTaskInstances(String actorId) or TaskMgmtSession.findPooledTaskInstances(List actorIds). These methods will only return task instances for which the actorId is null and one of the given actorIds matches one of the pooled actors.

          TaskMgmtSession.findPooledTaskInstance(String actorId)
          TaskMgmtSession.findPooledTaskInstance(List actorIds)

          To prevent multiple users working on the same pooled task, it is sufficient to update the actorId of the TaskInstance with the user's actorId. After that, the task instance will not appear in the list of pooled tasks, but only in the user's personal task list. Setting the actorId of a taskInstance to null will put the task instance back in the pooled tasks.

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

          9.2. Task instances|任務實例|
          A task instance can be assigned to an actorId (java.lang.String).|任務實例被分派給一個行為ID。| All task instances are stored in one table of the database (JBPM_TASKINSTANCE).|所有的實例都被存儲在數據庫的一個表格里(JBPM_TASKINSTANCE)。| By querying this table for all task instances for a given actorId, you get the task list for that perticular user. |通過查詢這個行為ID表的所有任務實例的表,你得到指定用戶的任務列表。|

          The jBPM task list mechanism can combine jBPM tasks with other tasks, even when those tasks are unrelated to a process execution.|jBPM任務列表機制可以與其它任務結合jBPM任務,甚至當這些任務與一個流程執行無關。| That way jBPM developers can easily combine jBPM-process-tasks with tasks of other applications in one centralized task-list-repository.|那種方法jBPM開發人員可以和容易的使jBPM流程任務在一個集中的任務列表庫與其他程序中的任務|

          9.2.1. Task instance life cycle |任務實例生命周期|
          The task instance lifecycle is straightforward: After creation, task instances can optionally be started.|任務生命周期是 簡單的:在創建之后,任務實例可以隨意地被開始。| Then, task instances can be ended, which means that the task instance is marked as completed.|接著,任務實例可能被結束,它意味著任務實例已經被標志已完成。|

          Note that for flexibility, assignment is not part of the life cycle.|注意適應性、委派不是生命周期的一部分。| So task instances can be assigned or not assigned.|所有任務實例可能被委派也可能不被委派。| Task instance assignment does not have an influence on the task instance life cycle.|任務實例委派不影響任務實例的生命周期。|

          Task instances are typically created by the process execution entering a task-node (with the method TaskMgmtInstance.createTaskInstance(...)).|任務實例被進入一個任務節點流程執行代典型的創建(使用TaskMgmtInstance.createInstance(...)方法)| Then, a user interface component will query the database for the tasklists using the TaskMgmtSession.findTaskInstancesByActorId(...).|接著一個用戶接口組件將要為任務列表查詢數據庫使用TaskMgmtSession.findTaskInstancesByActorId(...)| Then, after collecting input from the user, the UI component calls TaskInstance.assign(String), TaskInstance.start() or TaskInstance.end(...).|接著,在收集從用戶收入之后,這個UI組件調用TaskIntsance.assign(String),TaskInstance.start() 或者 TaskInstance.end(...)。|

          A task instance maintains it's state by means of date-properties : create, start and end.|一個任務實例依靠日期屬性維護它的狀態:創建、開始、結束。| Those properties can be accessed by their respective getters on the TaskInstance.|這些屬性可以通過它們的各自在任務實例上的的getters被訪問。|

          Currently, completed task instances are marked with an end date so that they are not fetched with subsequent queries for tasks lists.|通常地,完成的任務實例被標志為結束狀態,所以他們并不通過對任務列表的子查詢獲得。| But they remain in the JBPM_TASKINSTANCE table.|但是他們仍然保持在JBPM_TASKINGSTANCE表中。|

          9.2.2. Task instances and graph execution|任務實例和圖表執行|
          Task instances are the items in an actor's tasklist.|任務實例是在行動者的任務列表中的項目。| Task instances can be signalling.|任務實例可以被發信號的| A signalling task instance is a task instance that, when completed, can send a signal to its token to continue the process execution.|一個發信號的任務實例是一個這樣的任務實例,當被完成時候,可以發送一個信號給它的令牌以繼續流程的執行。| Task instances can be blocking, meaning that the related token (=path of execution) is not allowed to leave the task-node before the task instance is completed.|任務實例可以被模塊化,意味著有關系的令牌(執行路徑)在任務實例完成之前允許離開任務節點。| By default task instances are signalling and non-blocking. |缺省的任務實例是被信號化且非模塊化的。|

          In case more than one task instance are associated with a task-node, the process developer can specify how completion of the task instances affects continuation of the process.|萬一超過一個的任務實例與一個任務節點關聯,這個流程開發者可以定義 任務實例的完成如何影響流程的繼續。| Following is the list of values that can be given to the signal-property of a task-node.|接下來是值的列表可以指定給節點的信號屬性。|

          last: This is the default.|最后:這是缺省的。| Proceeds execution when the last task instance is completed.|當最后流程執行完畢,繼續進行執行。| When no tasks are created on entrance of this node, execution waits in the task node till tasks are created.|當在這個的節點的入口沒有任務被創建,在任務節點中執行等待直到這些任務被創建。|
          last-wait: Proceeds execution when the last task instance is completed. When no tasks are created on entrance of this node, execution waits in the task node till tasks are created.
          first: Proceeds execution when the first task instance is completed. When no tasks are created on entrance of this node, execution is continued.
          first-wait: Proceeds execution when the first task instance is completed. When no tasks are created on entrance of this node, execution is continued.
          unsynchronized: Execution always continues, regardless wether tasks are created or still unfinished.
          never: Execution never continues, regardless wether tasks are created or still unfinished.
          Task instance creation might be based upon a runtime calculation. In that case, add an ActionHandler on the node-enter event of the task-node and set the attribute create-tasks="false". Here is an example of such an action handler implementation:

          public class CreateTasks implements ActionHandler {
            public void execute(ExecutionContext executionContext) throws Exception {
              Token token = executionContext.getToken();
              TaskMgmtInstance tmi = executionContext.getTaskMgmtInstance();
               
              TaskNode taskNode = (TaskNode) executionContext.getNode();
              Task changeNappy = taskNode.getTask("change nappy");

              // now, 2 task instances are created for the same task.
              tmi.createTaskInstance(changeNappy, token);
              tmi.createTaskInstance(changeNappy, token);
            }
          }
          As shown in the example the tasks to be created can be specified in the task-node. They could also be specified in the process-definition and fetched from the TaskMgmtDefinition. TaskMgmtDefinition extends the ProcessDefinition with task management information.

          The API method for marking task instances as completed is TaskInstance.end(). Optionally, you can specify a transition in the end method. In case the completion of this task instance triggers continuation of the execution, the task-node is left over the specified transition.

          posted @ 2005-06-15 10:33 java世界暢談 閱讀(735) | 評論 (0)編輯 收藏

          Task management『任務管理』
          The core business of jBPM is the ability to persist the execution of a process. 『jBPM的核心業務是有能力持久化流程的執行。』A situation in which this feature is extremely useful is the management of tasks and tasklists for people.『在這特征中的一個解決方案對人們任務或者任務列表的管理是非常有用的』 jBPM allows to specify a piece of software describing an overall process which can have wait states for human tasks.『jBPM 允許定義一塊軟件描述全部的流程,它可以為用戶任務持有等待狀態』

          1. Tasks『任務』
          Tasks are part of the process definition and they define how task instances must be created and assigned during process executions.『任務是 流程定義的一部分,并且它們定義了在流程執行中任務實例如何必須被創建和分派。 』

          Tasks can be defined in task-nodes and in the process-definition.『任務可以被定義在task-nodes和流程定義的中』 The most common way is to define one or more tasks in a task-node.『最通用的方式是在task-node中定義一個或多個任務。』 In that case the task-node represents a task to be done by the user and the process execution should wait until the actor completes the task.『如果是那樣的話這個任務節點表現了一個任務被用戶執行并且這個流程執行應當等待直到行動者完成。』 When the actor completes the task, process execution should continue.『當行動者完成這個任務,流程執行應該繼續。』 When more tasks are specified in a task-node, the default behaviour is to wait for all the tasks to complete.『當在任務節點中定義多個任務,缺省行為是等待所有所有任務完成。』

          Tasks can also be specified on the process-definition.『任務也可以被定義在流程定義中。』 Tasks specified on the process definition can be looked up by name and referenced from within task-nodes or used from inside actions.『定義在流程定義中的任務可以通過名字查找和從任務節點內部參考或者從內部行為中使用。』 In fact, all tasks (also in task-nodes) that are given a name can be looked up by name in the process-definition. 『實際上,所有的任務(在任務節點中的也一樣)可以在流程定義通過名字進行查找』

          Task names must be unique in the whole process definition.『任務名稱在整個流程定義中必須是不能重復的』


           

          posted @ 2005-06-14 23:03 java世界暢談 閱讀(847) | 評論 (1)編輯 收藏

          僅列出標題
          共29頁: First 上一頁 21 22 23 24 25 26 27 28 29 下一頁 
          主站蜘蛛池模板: 南江县| 石家庄市| 顺昌县| 嘉荫县| 玛纳斯县| 祁阳县| 军事| 芜湖县| 科技| 宜昌市| 绩溪县| 开平市| 通州区| 临漳县| 杭锦旗| 怀来县| 高陵县| 府谷县| 南宁市| 休宁县| 朝阳区| 皮山县| 巧家县| 吉水县| 湘西| 湘潭县| 抚顺市| 香格里拉县| 牟定县| 武平县| 汉中市| 成都市| 育儿| 东乡县| 麻栗坡县| 教育| 繁峙县| 确山县| 苍梧县| 黔江区| 南雄市|