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

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

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

    Oracle神諭

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

    Task management 任務管理
    The core business of jBPM is the ability to persist the execution of a process. 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的核心邏輯是有能力持久化流程的執(zhí)行。一個為人們用來管理任務和任務列表的特征的情形是非常有用的。jBPM允許指定一些軟件描述一個全面的流程,它可以為人任務擁有等待狀態(tài)。

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

    Tasks can be defined in task-nodes and in the process-definition. The most common way is to define one or more tasks in a 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.
    任務可以在task-nodes和process-definition中被定義。最常用的方式是在task-node中定義一個或多個任務。如果是那樣的話,task-node表現(xiàn)一個任務被用戶執(zhí)行并且流程執(zhí)行應該等待知道actor完成這個任務。當這個actor完成這個任務,流程定義應該繼續(xù)。當更多任務在task-node被定義,缺省的行為是等待所有任務的完成。

    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.
    任務也被定義在process-definition中。指定在流程定義上的任務可以通過名稱查詢并且參考從內(nèi)部的task-nodes或者從內(nèi)部actions中使用。事實上,所有的給定名稱任務(也在task-nodes)可以在流程定義中通過名字查詢。

    Task names must be unique in the whole process definition. Tasks can be given a priority. This priority will be used as the initial priority for each task instance that is created for this task. TaskInstances can change this initial priority afterwards.
    任務名稱在整個流程定義中是非重復。任務可以被指定一個優(yōu)先權(quán)。這個優(yōu)先權(quán)將被使用在初始化優(yōu)先權(quán)為每個為任務創(chuàng)建的流程實例。任務實例然后可以修改初始化優(yōu)先權(quán)

    9.2. Task instances
    A task instance can be assigned to an actorId (java.lang.String). All task instances are stored in one table of the database (JBPM_TASKINSTANCE). By querying this table for all task instances for a given actorId, you get the task list for that perticular user.
    一個任務實例可以被委派給一個actorId(java.lang.String).所有任務實例被儲存在數(shù)據(jù)庫的一個表中(JBPM_TASKINGSTANCE)。通過給定的actorId來對所有的任務實例查詢這個表,你為特定用戶得到任務列表。

    The jBPM task list mechanism can combine jBPM tasks with other tasks, even when those tasks are unrelated to a process execution. That way jBPM developers can easily combine jBPM-process-tasks with tasks of other applications in one centralized task-list-repository.

    這個jBPM任務列表機制可以組合jBPM任務和其他任務,甚至當這些任務于流程執(zhí)行無關。那種方法jBPM開發(fā)者可以很容易的在一個集中的任務列表倉庫中組合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.
    任務實例生命周期是簡單的:創(chuàng)建之后,任務實例可以隨意地開始。接著,任務實例可以被終結(jié),這意味著任務實例內(nèi)標志為完成。

    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(...)). Then, a user interface component will query the database for the tasklists using the TaskMgmtSession.findTaskInstancesByActorId(...). Then, after collecting input from the user, the UI component calls TaskInstance.assign(String), TaskInstance.start() or TaskInstance.end(...).

    TaskMgmtInstance.createTaskInstance(...)
    TaskMgmtSession.findTaskInstancesByActorId(...)
    TaskInstance.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.
    一個任務實例維護它的狀態(tài)借助于日期屬性:create,start 和end. 這些屬性可以在任務實例中通過他們分別的getter獲得通道。

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

    9.2.2. Task instances and graph execution 任務實例和圖形執(zhí)行
    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 is continued.
    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 waits in the task node till tasks are created.
    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 on 2005-09-22 18:02 java世界暢談 閱讀(2034) 評論(7)  編輯  收藏 所屬分類: JBPM

    評論

    # re: Task management 任務管理 2005-10-18 10:48 孫茂成
    我想問一下actorId 是如何被賦予某個taskInstance的,我在使用過程中登入用戶后該用戶激發(fā)(點擊人物實例的連接 調(diào)用一個任務實例 taskInstance表里的actorId 字段就被賦予了該用戶的名字),請您告訴我具體的源碼是如何實現(xiàn)的,給我指出關鍵的幾處就行。


    另外我可以知道您的聯(lián)系方式嗎?比如郵箱或者即時通訊,我的聯(lián)系方式已經(jīng)在您的公開留言中:)
      回復  更多評論
      

    # re: Task management 任務管理 2005-10-18 23:12 java世界暢談
    Email: jv_ora@yahoo.com.cn

    jBPM的Source網(wǎng)上是有的,自己好好看看就清楚!我們可以一起交流,我現(xiàn)在做項目很多也是參考這個項目的。  回復  更多評論
      

    # re: Task management 任務管理 2005-10-21 15:58 snowly
    你們好!我也很想知道你們是如何實現(xiàn)這部分的!
    fazhg@sohu.com  回復  更多評論
      

    # re: Task management 任務管理 2005-11-07 17:56 xiangbo
    jBPM3在網(wǎng)上有完整的例子嗎?  回復  更多評論
      

    # re: Task management 任務管理 2005-11-28 16:58 路人甲
    你好,我想問一下,你們是如何處理中文亂碼的.比如我輸入一條中文字串,下次再取出了時就時亂碼了,數(shù)據(jù)庫用的是MYSQL,是不是和數(shù)據(jù)庫有關啊?  回復  更多評論
      

    # re: Task management 任務管理 2005-12-20 15:33 LunaLiu
    我現(xiàn)在正在做工作流二次開發(fā)的項目,用的是jbpm3的。請問那里有完整的jbpm的例子。本人打算參考一下。本人對這方面的技術很有興趣。有意和我共同研究的可以和我聯(lián)系。
    MSN(E_Mail):liuyue_handsome2002@hotmail.com
    qq:3940846

      回復  更多評論
      

    # re: Task management 任務管理 2005-12-20 15:40 LunaLiu
    我現(xiàn)在正在做工作流二次開發(fā)的項目,用的是jbpm3的。請問那里有完整的jbpm的例子。給位如果有的話請給我發(fā)一份。本人打算參考一下。謝謝。另外,本人對這方面的技術很有興趣。有意和我共同研究的可以和我聯(lián)系。
    MSN(E_Mail):liuyue_handsome2002@hotmail.com
    qq:3940846

      回復  更多評論
      

    主站蜘蛛池模板: 亚洲国产aⅴ综合网| 97视频免费在线| 亚洲高清成人一区二区三区| 亚洲一区二区三区写真| 国产成人免费爽爽爽视频| 亚洲毛片基地4455ww| 在线看片无码永久免费视频| 国产精品高清视亚洲一区二区| 成人毛片免费观看| 亚洲hairy多毛pics大全| 国产免费看插插插视频| 美女黄频免费网站| 国产亚洲精品福利在线无卡一 | 免费观看a级毛片| 亚洲国产欧美一区二区三区 | 亚洲精品无码永久中文字幕| 最近免费字幕中文大全| 亚洲成人中文字幕| 免费福利网站在线观看| 亚洲国产精品无码中文lv| 亚洲国产中文v高清在线观看| 中国国产高清免费av片| 一区二区三区亚洲| 好吊妞998视频免费观看在线| 国产成人va亚洲电影| 亚洲av无码一区二区三区乱子伦| 91禁漫免费进入| 亚洲av日韩综合一区久热| 国产亚洲精品AA片在线观看不加载| 免费日本一区二区| 美女视频黄免费亚洲| 亚洲一区二区三区免费| 最近中文字幕免费2019| 337p日本欧洲亚洲大胆人人| 国产成人精品日本亚洲| 无码日韩人妻av一区免费| 农村寡妇一级毛片免费看视频| 亚洲成a人片77777老司机| 香蕉视频在线观看免费国产婷婷| 国产免费一区二区三区免费视频| 亚洲国产av美女网站|