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

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

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

    Oracle神諭

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

    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 on 2005-06-15 13:42 java世界暢談 閱讀(960) 評論(0)  編輯  收藏 所屬分類: 工作流
    主站蜘蛛池模板: 国产成人在线免费观看| 国偷自产一区二区免费视频 | 天天看片天天爽_免费播放| 亚洲毛片在线观看| 久久精品国产大片免费观看| 亚洲乱码国产一区三区| 国产亚洲蜜芽精品久久| 国产精品久久香蕉免费播放| 国产精品福利片免费看| 亚洲欭美日韩颜射在线二| 国产成人无码区免费内射一片色欲| 999任你躁在线精品免费不卡| 青青青国产在线观看免费网站| 亚洲av日韩片在线观看| 黄色a三级免费看| 四虎影视在线永久免费观看| 免费无码AV一区二区| 亚洲一区无码精品色| 成在线人视频免费视频| 亚洲成在人天堂一区二区| 无码人妻久久一区二区三区免费 | 成人亚洲网站www在线观看| 免费在线中文日本| 国产亚洲蜜芽精品久久| 亚洲天堂电影在线观看| 在线免费不卡视频| 久久国产乱子伦免费精品| 亚洲国产区男人本色在线观看| 两个人的视频www免费| 亚洲伊人久久大香线蕉AV| 免费永久国产在线视频| 日本高清在线免费| 无码亚洲成a人在线观看| 免费永久在线观看黄网站| 午夜国产精品免费观看| 久久精品免费一区二区三区| 美女露隐私全部免费直播| 亚洲伊人久久精品| 亚洲AV无码一区二三区| 久久综合给合久久国产免费 | 相泽南亚洲一区二区在线播放|