<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Oracle神諭

      BlogJava :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
      284 隨筆 :: 9 文章 :: 106 評(píng)論 :: 0 Trackbacks

    #

    This is a preconfigured jboss 4.0.2 installation that contains jBPM.  
    這是一個(gè)包含jBPM的預(yù)先配置好的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).
    這個(gè)jBPM 服務(wù)存檔:這個(gè)部署目錄包含一個(gè)服務(wù)歸檔,它創(chuàng)建一個(gè)JbpmSessionFactory 在服務(wù)器啟動(dòng)并且把它丟到JNDI中。為了使用這個(gè)JbpmSessionFactory,你不得不使用指定這個(gè)屬性 jbpm.session.factory.jndi.name-=java:/jbpm/JbpmSessionFactory 在你的jBPM注冊(cè)文件(例如在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數(shù)據(jù)庫(kù):這個(gè)服務(wù)器包含一個(gè)原先配置好的hypersonic 數(shù)據(jù)庫(kù)。使用這個(gè)jBPM數(shù)據(jù)庫(kù)表。也可以使用已經(jīng)數(shù)據(jù)庫(kù)中設(shè)置好的.這個(gè)數(shù)據(jù)庫(kù)可以通過(guò) tcp連接1701端口使用這個(gè)hsqldb驅(qū)動(dòng)器。

    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控制臺(tái)程序:這個(gè)jBPM web控制臺(tái)程序是一個(gè)簡(jiǎn)單的web程序,它允許訪問(wèn)jBPM數(shù)據(jù)庫(kù)。當(dāng)前這個(gè)web程序的功能仍然是受限制的,但是很多焦點(diǎn), 在不久的未來(lái)打算使它更容易管理、維護(hù)和監(jiān)控你的商業(yè)流程。

    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) | 評(píng)論 (0)編輯 收藏

    <!--

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

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

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

    A database specific task calls common tasks with the database name as a parameter
    and carries out its duties. (一個(gè)數(shù)據(jù)庫(kù)特定任務(wù)調(diào)用公有的任務(wù)使用數(shù)據(jù)庫(kù)名作為一個(gè)參數(shù),并且執(zhí)行它的職責(zé)。)

    The main tasks are the database script creation and the database test run.(主要的任務(wù)是數(shù)據(jù)庫(kù)腳本創(chuàng)建和數(shù)據(jù)庫(kù)測(cè)試運(yùn)行)

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

    1. "prepare" target compiles all jbpm.3 classes ("prepare" 目標(biāo)編譯所有的jbpm3.classes )
    2. "hsqldb.prepare" target calls the "db.prepare" target with the parameter "hsqldb" ("hsqldb.prepare" 目標(biāo)調(diào)用"db.prepare"目標(biāo)使用"hsqldb"參數(shù))
    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項(xiàng)目和 hsqldb/hibernate.properties 屬性文件復(fù)制資源目錄,并從在復(fù)制的擁有從文件屬性的hibernate配置文件中的主項(xiàng)目替換這些屬性,使用數(shù)據(jù)庫(kù)特定給test 的設(shè)置使用"hibernate.replace".這對(duì)每個(gè)數(shù)據(jù)庫(kù)是不同的 。
       )

    After this preparation the scripts targets (在這準(zhǔn)備腳本目標(biāo)之后)

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

    5. "hsqldb.test" target calls the "db.test" target with the hsqldb parameter ("hsqldb.test" 目標(biāo)調(diào)用"db.test"目標(biāo)使用hsqldb參數(shù))
    6. "db.test" target runs all tests against the hsqldb database and creates a test report
       in build/hsqldb/testresults
       ("db.test"目標(biāo)運(yùn)行所有的測(cè)試 靠著hsqldb 數(shù)據(jù)庫(kù)和測(cè)試報(bào)告)
    -->

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

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

    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.
    如果一個(gè)文檔定義了一個(gè)或多個(gè)框架,瀏覽器為每一個(gè)框架創(chuàng)建一個(gè)window對(duì)象為這個(gè)源document和一個(gè)附加的window對(duì)象。 這些附加的對(duì)象是源文檔的子windows,并且受源動(dòng)作的影響。例如,關(guān)閉這個(gè)源窗體導(dǎo)致子窗體也被關(guān)閉。
    returnValue Sets or retrieves the value returned from the modal dialog window.

    posted @ 2005-06-21 17:47 java世界暢談 閱讀(426) | 評(píng)論 (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) | 評(píng)論 (0)編輯 收藏

    Fork : A fork spawns(產(chǎn)生) multiple concurrent(并發(fā)) 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) | 評(píng)論 (0)編輯 收藏

    Decision : A decision decides between multiple paths of execution which are exclusive(獨(dú)占的)
    <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) | 評(píng)論 (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.(多個(gè)任務(wù)被同一個(gè)用戶執(zhí)行) So after the first task instance is created for a given swimlane, the actor should be remembered in the process for all subsequent(后來(lái)的) 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(實(shí)行) a certain process role will have the knowledge of that perticular process. So all subsequent(并發(fā)的) assignements of task instances to that swimlane are done automatically to that user.

    Swimlane is a terminology(術(shù)語(yǔ)) borrowed from UML activity(活動(dòng)) diagrams.

    ------------------------------------------------------------
    9.5. Task events (任務(wù)事件)
    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(恢復(fù)) 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(任務(wù)定時(shí)器)
    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(逗號(hào)) separated list in the attribute.

    9.7. Customizing task instances(定制任務(wù)實(shí)例)
    Task instances can be customized. The easiest way to do this is to create a subclass of TaskInstance.|創(chuàng)建一個(gè)任務(wù)實(shí)例的子類| 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)創(chuàng)建一個(gè)子類的影射文件(使用 extends="org.jbpm.taskmgmt.exe.TaskInstance")
    (4)將這個(gè)影射文件加到 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(相關(guān)的) classes for the expression assignment handler that is discussed next.

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

    9.8.2. Assignment expressions (分派表達(dá)式)
    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.|一個(gè)表達(dá)式被從左到右進(jìn)行分解| The first-term specifies a User or Group in the identity model.|第一個(gè)項(xiàng)目是在身份模型中指定了一個(gè)用戶或組| 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) | 評(píng)論 (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(相應(yīng)) 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.  {這里提到了一個(gè)行為池的概念 pool of actors}

    9.3.1. Assignment interfaces
    Assigning task instances is done via the interface AssignmentHandler: {任務(wù)實(shí)例分派是依靠AssignmentHandler來(lái)實(shí)現(xiàn)的}

    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).

    分配對(duì)象:
    分配給一個(gè)用戶       Assignable.setActorId(String actorId);
    分配給一個(gè)侯選用戶池 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

    在一個(gè)流程當(dāng)多于一個(gè)任務(wù)時(shí)應(yīng)當(dāng)被分派給一個(gè)用戶或多用戶的組,考慮使用泳道。

    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) | 評(píng)論 (0)編輯 收藏

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

    The jBPM task list mechanism can combine jBPM tasks with other tasks, even when those tasks are unrelated to a process execution.|jBPM任務(wù)列表機(jī)制可以與其它任務(wù)結(jié)合jBPM任務(wù),甚至當(dāng)這些任務(wù)與一個(gè)流程執(zhí)行無(wú)關(guān)。| That way jBPM developers can easily combine jBPM-process-tasks with tasks of other applications in one centralized task-list-repository.|那種方法jBPM開(kāi)發(fā)人員可以和容易的使jBPM流程任務(wù)在一個(gè)集中的任務(wù)列表庫(kù)與其他程序中的任務(wù)|

    9.2.1. Task instance life cycle |任務(wù)實(shí)例生命周期|
    The task instance lifecycle is straightforward: After creation, task instances can optionally be started.|任務(wù)生命周期是 簡(jiǎn)單的:在創(chuàng)建之后,任務(wù)實(shí)例可以隨意地被開(kāi)始。| Then, task instances can be ended, which means that the task instance is marked as completed.|接著,任務(wù)實(shí)例可能被結(jié)束,它意味著任務(wù)實(shí)例已經(jīng)被標(biāo)志已完成。|

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

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

    A task instance maintains it's state by means of date-properties : create, start and end.|一個(gè)任務(wù)實(shí)例依靠日期屬性維護(hù)它的狀態(tài):創(chuàng)建、開(kāi)始、結(jié)束。| Those properties can be accessed by their respective getters on the TaskInstance.|這些屬性可以通過(guò)它們的各自在任務(wù)實(shí)例上的的getters被訪問(wèn)。|

    Currently, completed task instances are marked with an end date so that they are not fetched with subsequent queries for tasks lists.|通常地,完成的任務(wù)實(shí)例被標(biāo)志為結(jié)束狀態(tài),所以他們并不通過(guò)對(duì)任務(wù)列表的子查詢獲得。| But they remain in the JBPM_TASKINSTANCE table.|但是他們?nèi)匀槐3衷贘BPM_TASKINGSTANCE表中。|

    9.2.2. Task instances and graph execution|任務(wù)實(shí)例和圖表執(zhí)行|
    Task instances are the items in an actor's tasklist.|任務(wù)實(shí)例是在行動(dòng)者的任務(wù)列表中的項(xiàng)目。| Task instances can be signalling.|任務(wù)實(shí)例可以被發(fā)信號(hào)的| A signalling task instance is a task instance that, when completed, can send a signal to its token to continue the process execution.|一個(gè)發(fā)信號(hào)的任務(wù)實(shí)例是一個(gè)這樣的任務(wù)實(shí)例,當(dāng)被完成時(shí)候,可以發(fā)送一個(gè)信號(hào)給它的令牌以繼續(xù)流程的執(zhí)行。| 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.|任務(wù)實(shí)例可以被模塊化,意味著有關(guān)系的令牌(執(zhí)行路徑)在任務(wù)實(shí)例完成之前允許離開(kāi)任務(wù)節(jié)點(diǎn)。| By default task instances are signalling and non-blocking. |缺省的任務(wù)實(shí)例是被信號(hào)化且非模塊化的。|

    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.|萬(wàn)一超過(guò)一個(gè)的任務(wù)實(shí)例與一個(gè)任務(wù)節(jié)點(diǎn)關(guān)聯(lián),這個(gè)流程開(kāi)發(fā)者可以定義 任務(wù)實(shí)例的完成如何影響流程的繼續(xù)。| Following is the list of values that can be given to the signal-property of a task-node.|接下來(lái)是值的列表可以指定給節(jié)點(diǎn)的信號(hào)屬性。|

    last: This is the default.|最后:這是缺省的。| Proceeds execution when the last task instance is completed.|當(dāng)最后流程執(zhí)行完畢,繼續(xù)進(jìn)行執(zhí)行。| When no tasks are created on entrance of this node, execution waits in the task node till tasks are created.|當(dāng)在這個(gè)的節(jié)點(diǎn)的入口沒(méi)有任務(wù)被創(chuàng)建,在任務(wù)節(jié)點(diǎn)中執(zhí)行等待直到這些任務(wù)被創(chuàng)建。|
    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) | 評(píng)論 (0)編輯 收藏

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

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

    Tasks can be defined in task-nodes and in the process-definition.『任務(wù)可以被定義在task-nodes和流程定義的中』 The most common way is to define one or more tasks in a task-node.『最通用的方式是在task-node中定義一個(gè)或多個(gè)任務(wù)。』 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.『如果是那樣的話這個(gè)任務(wù)節(jié)點(diǎn)表現(xiàn)了一個(gè)任務(wù)被用戶執(zhí)行并且這個(gè)流程執(zhí)行應(yīng)當(dāng)?shù)却钡叫袆?dòng)者完成。』 When the actor completes the task, process execution should continue.『當(dāng)行動(dòng)者完成這個(gè)任務(wù),流程執(zhí)行應(yīng)該繼續(xù)。』 When more tasks are specified in a task-node, the default behaviour is to wait for all the tasks to complete.『當(dāng)在任務(wù)節(jié)點(diǎn)中定義多個(gè)任務(wù),缺省行為是等待所有所有任務(wù)完成。』

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

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


     

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

    僅列出標(biāo)題
    共29頁(yè): First 上一頁(yè) 21 22 23 24 25 26 27 28 29 下一頁(yè) 
    主站蜘蛛池模板: 免费观看成人久久网免费观看| 最近中文字幕免费2019| 久久亚洲AV成人无码国产电影| 亚洲国产成人超福利久久精品| 91亚洲精品第一综合不卡播放| 亚洲视频免费在线观看| 亚洲Av综合色区无码专区桃色 | 88xx成人永久免费观看| 日韩精品久久久久久免费| 99re免费在线视频| 91老湿机福利免费体验| 免费黄色福利视频| 毛片a级三毛片免费播放| 国产精品福利片免费看| 72pao国产成视频永久免费| a免费毛片在线播放| 伊人免费在线观看| 久久精品一本到99热免费| 免费看片在线观看| 午夜神器成在线人成在线人免费| 日日操夜夜操免费视频| 精品久久8x国产免费观看| 91视频国产免费| 特级淫片国产免费高清视频| 亚洲AV无码一区二三区| 亚洲精品乱码久久久久久中文字幕| 亚洲va在线va天堂va不卡下载| 亚洲精品国产福利片| 在线亚洲午夜片AV大片| 小说专区亚洲春色校园| 精品国产污污免费网站入口在线| 久久午夜夜伦鲁鲁片免费无码| AA免费观看的1000部电影| 免费国产综合视频在线看| 亚洲日韩欧洲乱码AV夜夜摸| 亚洲精品第一国产综合精品| 亚洲啪AV永久无码精品放毛片| 一级毛片免费在线播放| 69pao强力打造免费高清| 午夜色a大片在线观看免费| 亚洲熟妇中文字幕五十中出|