??xml version="1.0" encoding="utf-8" standalone="yes"?>盗摄系列偷拍视频精品tp,欧美激情乱人伦,免费av一区二区三区四区http://www.aygfsteel.com/javaora/category/3413.htmlzh-cnTue, 27 Feb 2007 18:25:12 GMTTue, 27 Feb 2007 18:25:12 GMT60Hibernate的subclass用法http://www.aygfsteel.com/javaora/archive/2005/10/03/14688.htmljava世界畅谈java世界畅谈Mon, 03 Oct 2005 02:22:00 GMThttp://www.aygfsteel.com/javaora/archive/2005/10/03/14688.htmlhttp://www.aygfsteel.com/javaora/comments/14688.htmlhttp://www.aygfsteel.com/javaora/archive/2005/10/03/14688.html#Feedback1http://www.aygfsteel.com/javaora/comments/commentRss/14688.htmlhttp://www.aygfsteel.com/javaora/services/trackbacks/14688.html  (一)、首先先ȝ看Hibernate的subclassQ?BR>  1.对于“每一个类l承树对应一个表”的{略来说Q就需要?lt;subclass>定义?BR>  <subclass>
            name="className"  //子类的全?BR>            discriminator-value="discriminator-value" //辨别标识Q一个用于区分每个独立的子类的?BR>            proxy="proxyInterface" //指定一个类或接口,在gq加载时作ؓ代理使用
            lazy="true|false"
            dynamic-update="true|false"
            dynamic-insert="true|false"
            entity-name="entityName"
            node="element-name">
           <property ..../>
          ......
        </subclass>
  2.每个子类都应该定义它自己的持久化属性和子类?lt;version>?lt;id>属性可以从根父cȝ承下厅R在一늑承树上的每个子类都必d义一个唯一的discriminator-value。如果没有指定,׃使用Javacȝ全限定名?BR>  3.必须在子cȝ影射中指定extends属性来指定已媄的类?BR>
 (?在jBPM中的使用
 1.在jBPM的definitionl的cL构中采用上q的技术。其中ModuleDefinition是作为抽象父cd在的Q而ContextDefinition、FileDefinition、LoggingDefinition、SchedulerDefinition、MgmtDefinitioncL做ؓsubclass存在的?BR> 2.在父cM使用了discriminator鉴别器的技术:在承策略中的?STRONG>一个对象承树应对应一个表”的{略中,<discriminator>元素是必ȝ。鉴别器字段包含标志|用于告知持久层应该ؓ某个特定的行创徏哪一个类别的实例。例如:
  父类的媄片D:
    <discriminator type="char" column="CLASS_"/>
    <!-- M : org.jbpm.module.def.ModuleDefinition -->
    <!-- C : org.jbpm.context.def.ContextDefinition -->
    <!-- F : org.jbpm.file.def.FileDefinition -->
    <!-- L : org.jbpm.logging.def.LoggingDefinition -->
    <!-- I : org.jbpm.scheduler.def.SchedulerDefinition -->
    <!-- T : org.jbpm.taskmgmt.def.TaskMgmtDefinition -->
    <!--  :  -->
    <!--  :  -->
 3.鉴别器字D늚实际值是Ҏ<class>?lt;subclass>元素中的discriminator-value属性得来的?BR> 例如Q?BR>  父媄文Ӟ
  <class name="org.jbpm.module.def.ModuleDefinition"
         table="JBPM_MODULEDEFINITION"
         abstract="true"
         discriminator-value="M"
         lazy="false">
       子媄文Ӟ
  <subclass name="org.jbpm.context.def.ContextDefinition"
            extends="org.jbpm.module.def.ModuleDefinition"
            discriminator-value="C"
            lazy="false">
       </subclass>


]]>
org.jbpm包的JbpmConfigurationc?/title><link>http://www.aygfsteel.com/javaora/archive/2005/10/02/14641.html</link><dc:creator>java世界畅谈</dc:creator><author>java世界畅谈</author><pubDate>Sun, 02 Oct 2005 02:52:00 GMT</pubDate><guid>http://www.aygfsteel.com/javaora/archive/2005/10/02/14641.html</guid><wfw:comment>http://www.aygfsteel.com/javaora/comments/14641.html</wfw:comment><comments>http://www.aygfsteel.com/javaora/archive/2005/10/02/14641.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/javaora/comments/commentRss/14641.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/javaora/services/trackbacks/14641.html</trackback:ping><description><![CDATA[<P>  有一阉|有看jBPM的source了,正好q几天是国庆Q口袋也没有多少cI没有出去旅游的计划,所以,又重新研I分析一下src。希望从中可以学习到有用的东东!<BR>  JbpmConfigurationQ从名字上就知道是获取jBPM的相关配|信息。不q这里写的是一个公q获取properties的方法?BR>  首先声明了一个static propertiesQ静态属性)的实例properties,然后使用静态方法getPropertiesQ)Qؓproperties获得具体的|取org.jbpm.jbpm.propertiesQ?BR>  然后是N多获取方法:<BR>  public static String getString(String key)<BR>  public static String getString( String key, String defaultValue ) //如果没有q个|默认q回的是defaultValue<BR>  public static long getLong( String key, long defaultValue )<BR>  public static boolean getBoolean(String key, boolean defaultValue)<BR>  public static Object getObject(String key)<BR>  public static Object getObject(String key, Object defaultValue)    <BR>  q些取String、long、boolean、Object提供基础的支持,Z后的操作提供了很多的方便?/P><img src ="http://www.aygfsteel.com/javaora/aggbug/14641.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/javaora/" target="_blank">java世界畅谈</a> 2005-10-02 10:52 <a href="http://www.aygfsteel.com/javaora/archive/2005/10/02/14641.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Task management d理http://www.aygfsteel.com/javaora/archive/2005/09/22/13759.htmljava世界畅谈java世界畅谈Thu, 22 Sep 2005 10:02:00 GMThttp://www.aygfsteel.com/javaora/archive/2005/09/22/13759.htmlhttp://www.aygfsteel.com/javaora/comments/13759.htmlhttp://www.aygfsteel.com/javaora/archive/2005/09/22/13759.html#Feedback7http://www.aygfsteel.com/javaora/comments/commentRss/13759.htmlhttp://www.aygfsteel.com/javaora/services/trackbacks/13759.htmlTask management d理
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的核心逻辑是有能力持久化流E的执行。一个ؓZ用来理d和Q务列表的特征的情形是非常有用的。jBPM允许指定一些Y件描qC个全面的程Q它可以Zhd拥有{待状态?/P>

9.1. Tasks d
Tasks are part of the process definition and they define how task instances must be created and assigned during process executions.
d是流E定义的一部分Qƈ且他们定义了d实例如何在流E执行中必须被创建ƈ且委z?/P>

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.
d可以在task-nodes和process-definition中被定义。最常用的方式是在task-node中定义一个或多个d。如果是那样的话Qtask-node表现一个Q务被用户执行q且程执行应该{待知道actor完成q个d。当q个actor完成q个dQ流E定义应该l。当更多d在task-node被定义,~省的行为是{待所有Q务的完成?/P>

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.
d也被定义在process-definition中。指定在程定义上的d可以通过名称查询q且参考从内部的task-nodes或者从内部actions中用。事实上Q所有的l定名称dQ也在task-nodesQ可以在程定义中通过名字查询?/P>

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.
d名称在整个流E定义中是非重复。Q务可以被指定一个优先权。这个优先权被使用在初始化优先权ؓ每个ZQ务创建的程实例。Q务实例然后可以修改初始化优先?/P>

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.
一个Q务实例可以被委派l一个actorId(java.lang.String).所有Q务实例被储存在数据库的一个表?JBPM_TASKINGSTANCE)。通过l定的actorId来对所有的d实例查询q个表,你ؓ特定用户得到d列表?/P>

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.

q个jBPMd列表机制可以l合jBPMd和其他Q务,甚至当这些Q务于程执行无关。U方法jBPM开发者可以很Ҏ的在一个集中的d列表仓库中组合jBPM程d和其他应用程序?/P>

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.
d实例生命周期是简单的Q创Z后,d实例可以随意地开始。接着QQ务实例可以被l结Q这意味着d实例内标志ؓ完成?/P>

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.

注意寚w应性、委z不是生命周期的l成部分。所以Q务实例可以被委派或者不委派。Q务实例委z֜生命周期d实例中没有媄响?/P>

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.
一个Q务实例维护它的状态借助于日期属性:create,start 和end. q些属性可以在d实例中通过他们分别的getter获得通道?/P>

Currently, completed task instances are marked with an end date so that they are not fetched with subsequentQ随后) queries for tasks lists. But they remain in the JBPM_TASKINSTANCE table. JBPM_TASKINSTANCE.

9.2.2. Task instances and graph execution d实例和图形执?BR>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 caseQ以Ԍ 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 overQgq) the specified transition.

 



]]>
script脚本http://www.aygfsteel.com/javaora/archive/2005/09/20/13527.htmljava世界畅谈java世界畅谈Tue, 20 Sep 2005 07:42:00 GMThttp://www.aygfsteel.com/javaora/archive/2005/09/20/13527.htmlhttp://www.aygfsteel.com/javaora/comments/13527.htmlhttp://www.aygfsteel.com/javaora/archive/2005/09/20/13527.html#Feedback1http://www.aygfsteel.com/javaora/comments/commentRss/13527.htmlhttp://www.aygfsteel.com/javaora/services/trackbacks/13527.htmlscript脚本Q?BR>一个script是一个执行BeanShell脚本的action。缺省地Q所有流E定义变量都是合法的q且无脚本变量将被写入流E变量。下列脚本变量也是合法的Q?BR>executionContext
token
node
task
taskInstance

<process-definition>
  <event type="node-enter">
     <script>
        System.out.println("this script is enering node"+node);
     </script>
  </event>
  ...
</process-definition>

为定制缺省加载行为ƈ且储存变量进scriptQ变量元素可以被用来作ؓscript的子元素。那P脚本表达式不得不被放入一个脚本的子元?expression

<prcession-definition>
  <event type="process-end">
    <expression>
      a = b+c;
    </expression>
    <variable name="XXX" access="write" mapped-name="a"/>
    <variable name="YYY" access="read" mapped-name="b"/>
    <variable name="ZZZ" access="read" mapped-name="c"/>
  </event>
</prcession-definition>

在脚本开始之前,q个程变量YYY和ZZZ分别作本变量b和c使其合法。所有脚本完成之后,脚本变量值a被存储进程变量XXX.

如果access变量属性包?read"Q这个流E变量在脚本赋g前将被加载作Z个脚本变量。如果access变量属性包?write"Q这个流E变量在脚本赋g后将被加载作Z个脚本变量?/P>

]]>
Nodetype节点cdhttp://www.aygfsteel.com/javaora/archive/2005/09/20/13496.htmljava世界畅谈java世界畅谈Tue, 20 Sep 2005 02:25:00 GMThttp://www.aygfsteel.com/javaora/archive/2005/09/20/13496.htmlhttp://www.aygfsteel.com/javaora/comments/13496.htmlhttp://www.aygfsteel.com/javaora/archive/2005/09/20/13496.html#Feedback3http://www.aygfsteel.com/javaora/comments/commentRss/13496.htmlhttp://www.aygfsteel.com/javaora/services/trackbacks/13496.htmlNodetype task-node 节点cd d节点
A task node represents one or more tasks that are to be performed by humans. So when execution arrives in a task node, task instances will be created in the task lists of the workflow participants. After that, the node will behave as a wait state. So when the users perform their task, the task completion will trigger the resuming of the execution. In other words, that leads to a new signal being called on the token.
  一个Q务节点表Cؓ被h所q行的一个或多个d。所以当执行到达一个Q务节点,d实例被创徏在工作流创徏者业务列表中。毕竟,q个节点作Z个等待状态。所以当用户q行他们的Q务,q个d完成触发执行的恢复。换a之,那导致一个新的标记在那个toke上被呼叫?/P>

7.3.3. Nodetype state  节点cd 状?BR>A state is a bare-bones wait state. The difference with a task node is that no task instances will be created in any task list. This can be usefull if the process should wait for an external system. E.g. upon entry of the node (via an action on the node-enter event), a message could be sent to the external system. After that, the process will go into a wait state. When the external system send a response message, this can lead to a token.signal(), which triggers resuming of the process execution.
  一个状态是裔R{待状态。这个不同一个Q务节点的是没有Q务实例将被创建在dd列表中。这可以是有用的Q如果流E应当ؓ外部pȝ{待。例如,在节点实体之上(依靠在节点进入事件的一个动作)Q一个消息将被发送到外部pȝ。毕竟,q个程进入等待状态。当外部pȝ发送一个返回信息,q可以导致token.signal(),q将触发一个流E执行的恢复?/P>

7.3.4. Nodetype decision 节点cd 军_
Actually there are 2 ways to model a decision. The distinction between the two is based on *who* is making the decision. Should the decision made by the process (read: specified in the process definition). Or should an external entity provide the result of the decision.
  实际上这里有两种Ҏ来创Z个决定。两者的区别是基谁在做这个决定。 应该被流E来军_。(限定在流E定义中Q或者应该一个外部实体支持决定的l果?/P>

When the decision is to be taken by the process, a decision node should be used. There are basically 2 ways to specify the decision criteria. Simplest is by adding condition elements on the transitions. Conditions are beanshell script expressions that return a boolean. At runtime the decision node will loop over its leaving transitions (in the order as specified in the xml), and evaluate each condition. The first transition for which the conditions resolves to 'true' will be taken. Alternatively, an implementation of the DecisionHandler can be specified. Then the decision is calculated in a java class and the selected leaving transition is returned by the decide-method of the DecisionHandler implementation.
  当这个决定被程执行Q一个决定节点应该被使用。这里有两个基本Ҏ来限定决定标准。最单是在跃q上增加条g因素。条件是Beanshell脚本表达式返回一个boolean倹{在q行时这个决定节点将循环d跃迁Q顺序和xml定义的一P。一个DecisionHandler的实现被定义是可选择的。那么,军_被计在javacMq且选择d跃迁被DecisionHandler实现的决定方法返回?/P>

When the decision is taken by an external party (meaning: not part of the process definition), you should use multiple transitions leaving a state or wait state node. Then the leaving transition can be provided in the external trigger that resumes execution after the wait state is finished. E.g. Token.signal(String transitionName) and TaskInstance.end(String transitionName).
  当这个决定被外部执行Q意味着Q不是流E定义部分)Q你应该使用多跃q离开一个状态或{待节点。那么这个离开跃迁在外部的除法器可以被支持恢复执行Q在{待状态完成后。例如,Token.signal(String transitionName) 和TaskInstance.end(String transitionName).
7.3.5. Nodetype fork 节点cd ?BR>A fork splits one path of execution into multiple concurrent paths of execution. The default fork behaviour is to create a child token for each transition that leaves the fork, creating a parent-child relation between the token that arrives in the fork.
一个叉分离一个\径执行到多个q行的执行\径。这个缺省的叉行为是为每个离开叉跃q创Z个子tokenQ创Z个到辑֏中父Q子关系?/P>

7.3.6. Nodetype join 节点cd 合ƈ
The default join assumes that all tokens that arrive in the join are children of the same parent. This situation is created when using the fork as mentioned above and when all tokens created by a fork arrive in the same join. A join will end every token that enters the join. Then the join will examine the parent-child relation of the token that enters the join. When all sibling tokens have arrived in the join, the parent token will be propagated over the (unique!) leaving transition. When there are still sibling tokens active, the join will behave as a wait state.
~省的合q假设所有的token到达合ƈ点,q些都都是相同父的子。这个情形被创徏如我们以上提到的使用叉ƈ且当所有被fork创徏的所有token到达相同的join. 一个join结束每个进入join的token. 那么q个join检查进入join的tokenӞ子关pR当所有的兄弟姐们tokensȀz,q个d的跃qjoin传播。当q里q有兄弟tokensȀz,q个join作Z个等待状态?/P>

7.3.7. Nodetype node 节点cd 节点
The type node serves the situation where you want to write your own code in a node. The nodetype node expects one subelement action. The action is executed when the execution arrives in the node. The code you write in the actionhandler can do anything you want but it is also responsible for propagating the execution.
节点cd服务在你惛_你自q代码在节点中。这个节点类型节Ҏ待一个子元素行ؓ。这个行执行当所有执行到达这个节炏V在actionHandler中你写的代码可以做你惛_的Q何事情,当时它是也是一个责Mؓ执行传播?/P>

This node can be used if you want to use a JavaAPI to implement some functional logic that is important for the business analyst. By using a node, the node is visible in the graphical representation of the process. For comparison, actions --covered next-- will allow you to add code that is invisible in the graphical representation of the process, in case that logic is not important for the business analyst.
q个节点可以被用,如果你将使用JavaAPI来实C些功能逻辑Q对逻辑分析是重要的. 作ؓ使用一个node,node 是可以视的在程囑Ş表现中。ؓҎQactions-convered next--允许在程囑Ş表现中增加不可见的代码,万一对你逻辑分析是不重要?/P>


 



]]>
org.jbpm.indentity.xml包之 IdentityXmlParserc?/title><link>http://www.aygfsteel.com/javaora/archive/2005/09/19/13456.html</link><dc:creator>java世界畅谈</dc:creator><author>java世界畅谈</author><pubDate>Mon, 19 Sep 2005 13:51:00 GMT</pubDate><guid>http://www.aygfsteel.com/javaora/archive/2005/09/19/13456.html</guid><wfw:comment>http://www.aygfsteel.com/javaora/comments/13456.html</wfw:comment><comments>http://www.aygfsteel.com/javaora/archive/2005/09/19/13456.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/javaora/comments/commentRss/13456.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/javaora/services/trackbacks/13456.html</trackback:ping><description><![CDATA[<P>三个字段Q?BR>1. List  entities<BR>2. Map user<BR>3. Map groups<BR>q个cM要从一个流文g中获?BR>users用户列表  Map列表  name<key>,user<value>?user : name email password<BR>l列?nbsp;  Map列表  name<key>,group<value>?group : name type<BR>父组列表 <BR>memberships列表<BR><BR>q个cM要用来解析XML中的用?l?父组 以及会员{等操作的?/P><img src ="http://www.aygfsteel.com/javaora/aggbug/13456.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/javaora/" target="_blank">java世界畅谈</a> 2005-09-19 21:51 <a href="http://www.aygfsteel.com/javaora/archive/2005/09/19/13456.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Token-ProcessInstance-ProcessDefinition-ContextInstance-TaskInstance杂记http://www.aygfsteel.com/javaora/archive/2005/09/19/13377.htmljava世界畅谈java世界畅谈Mon, 19 Sep 2005 03:49:00 GMThttp://www.aygfsteel.com/javaora/archive/2005/09/19/13377.htmlhttp://www.aygfsteel.com/javaora/comments/13377.htmlhttp://www.aygfsteel.com/javaora/archive/2005/09/19/13377.html#Feedback0http://www.aygfsteel.com/javaora/comments/commentRss/13377.htmlhttp://www.aygfsteel.com/javaora/services/trackbacks/13377.htmlClass Token
represents one path of execution and maintains a pointer to a node in the ProcessDefinition. Most common way to get a hold of the token objects is with ProcessInstance.getRootToken() or ProcessInstance.findToken(String).
在流E定义中表现一个执行\径和l持一个指C器l一个节炏V?BR>ProcessInstance.getRootToken()
ProcessInstance.findToken(String)

signal()
    provides a signal to the token. this method activates this token and leaves the current state over the default transition.
    准备一个信L标记。这个方法激z这个标记ƈ且离开当前的状态越q缺省的跃迁?BR>------------------------------------
Class ProcessInstance
is one execution of a ProcessDefinition. To create a new process execution of a process definition, just use the ProcessInstance(ProcessDefinition).
是一个流E定义的执行?BR>ProcessInstance(ProcessDefinition)
---------------------------------------
Class ProcssDefinition
创徏一个ProcessDefinition
parseParResource(String parResource)
parseParZipInputStream(ZipInputStream zipInputStream)
parseXmlInputStream(InputStream inputStream)
parseXmlReader(Reader reader)
parseXmlResource(String resource)
parseXmlString(String string)
-----------------------------
Class ContextInstance
maintains all the key-variable pairs for a process instance. You can obtain a ContextInstance from a processInstance from a process instance like this :
 ProcessInstance processInstance = ...;
 ContextInstance contextInstance = processInstance.getContextInstance();
为流E实例维持所有的key-variable寏V?/P>

ContextInstance  contextInstance = ProcessInstance.getContextInstance();
contextInstance.setVariable("amount",new Integer(500));
contextInstance.setVariable("reason","I met my deadline");

--------------------------
d节点Q?BR><task-node name="t">
  <task name="change nappy">
    <assignment  class="org.jbpm.tutorial.taskmgmt.NappyAssignmentHandler"/>
  </task>
  <transition to="end">
</task-node>

TaskInstance taskInstance = (TaskInstance)processInstance.getTaskMgmtInstance().getTaskInstances().iterator().next();

taskInstance.end(); //标志q个d已经l束

--------------------------------------------



]]>
org.jbpm.identity.security?/title><link>http://www.aygfsteel.com/javaora/archive/2005/09/18/13311.html</link><dc:creator>java世界畅谈</dc:creator><author>java世界畅谈</author><pubDate>Sun, 18 Sep 2005 13:26:00 GMT</pubDate><guid>http://www.aygfsteel.com/javaora/archive/2005/09/18/13311.html</guid><wfw:comment>http://www.aygfsteel.com/javaora/comments/13311.html</wfw:comment><comments>http://www.aygfsteel.com/javaora/archive/2005/09/18/13311.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/javaora/comments/commentRss/13311.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/javaora/services/trackbacks/13311.html</trackback:ping><description><![CDATA[<P>security安全包应该是identityw䆾模块中很重要的组成部分,其中主要包含以下c:<BR>一、AuthenticatedUser认证用户c:其中很简单,是gettter和setter ҎQ设|和获取authenticatedUser?BR>   其中的authenticatedUser是一个ThreadLocal?BR>二、IdentityLoginModulew䆾登陆模块c:<BR>  实现LoginModule接口。这个类和javax.security.auth.*{包l合非常紧密?BR>三、IdentityPolicyw䆾政策c:扩展PolicycR?BR>四、IdentityServicew䆾服务接口Q验证用户和获取User<BR>五、Password和Usename JavaBean<BR>------------------------------------------------------------<BR><BR>补充知识Q?BR>Q?<STRONG>ThreadLocal<BR>This class provides thread-local variables. These variables differ from their normal counterparts in that each thread that accesses one (via its <TT>get</TT> or <TT>set</TT> method) has its own, independently initialized copy of the variable. <TT>ThreadLocal</TT> instances are typically private static fields in classes that wish to associate state with a thread (e.g., a user ID or Transaction ID). <BR></STRONG>q支持支持thread-local 变量。这些变量不同于它们常用的对应物Q在那每一个线E获得一?依靠get或setҎ)拥有它自qQ独立地初始化复制这个变量。ThreadLocal实例是典型地U有静态字D,它希望联pȝ态用线E?例如Q一个用户ID或事务ID)?BR><STRONG><BR></STRONG></P><img src ="http://www.aygfsteel.com/javaora/aggbug/13311.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/javaora/" target="_blank">java世界畅谈</a> 2005-09-18 21:26 <a href="http://www.aygfsteel.com/javaora/archive/2005/09/18/13311.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>org.jbpm.identity.assignment包分?/title><link>http://www.aygfsteel.com/javaora/archive/2005/09/18/13307.html</link><dc:creator>java世界畅谈</dc:creator><author>java世界畅谈</author><pubDate>Sun, 18 Sep 2005 06:08:00 GMT</pubDate><guid>http://www.aygfsteel.com/javaora/archive/2005/09/18/13307.html</guid><wfw:comment>http://www.aygfsteel.com/javaora/comments/13307.html</wfw:comment><comments>http://www.aygfsteel.com/javaora/archive/2005/09/18/13307.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/javaora/comments/commentRss/13307.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/javaora/services/trackbacks/13307.html</trackback:ping><description><![CDATA[<P>JBpm赋值包Q?BR>一、ExpressionAssignmentExceptionc:表达式赋值异常类 扩展了RuntimeException<BR>二、ExpressionAssignmentHandlerc: 表达式赋值处理器c?实现AssignmentHandler接口?BR>  主要字段Q?BR>   1.String expression;<BR>            2.ExecutionContext executionContext<BR>      3.TermTokenizer tokenizer<BR>            4.Entity entity<BR>   语法Qsyntax : first-term --> next-term --> next-term --> ... --> next-term<BR>   first-term ::= previous |<BR> *                swimlane(swimlane-name) |<BR> *                variable(variable-name) |<BR> *                user(user-name) |<BR> *                group(group-name)<BR><BR>* next-term ::= group(group-type) |<BR> *               member(role-name)<BR><BR>三、ExpressionSession接口<BR>四、TermTokenizerc:"-->"</P><img src ="http://www.aygfsteel.com/javaora/aggbug/13307.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/javaora/" target="_blank">java世界畅谈</a> 2005-09-18 14:08 <a href="http://www.aygfsteel.com/javaora/archive/2005/09/18/13307.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>org.jbpm.identity.hibernate包之PermissionUserTypec?/title><link>http://www.aygfsteel.com/javaora/archive/2005/09/18/13304.html</link><dc:creator>java世界畅谈</dc:creator><author>java世界畅谈</author><pubDate>Sun, 18 Sep 2005 05:45:00 GMT</pubDate><guid>http://www.aygfsteel.com/javaora/archive/2005/09/18/13304.html</guid><wfw:comment>http://www.aygfsteel.com/javaora/comments/13304.html</wfw:comment><comments>http://www.aygfsteel.com/javaora/archive/2005/09/18/13304.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.aygfsteel.com/javaora/comments/commentRss/13304.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/javaora/services/trackbacks/13304.html</trackback:ping><description><![CDATA[PermissionUserTypecL一个Hibernatel合用户自定义数据类型:<BR>实现了抽象接口CompositeUserTypeQ?BR>其中实现的是一个String[] 数据cdQ其中将Java的Permission对象和这个数据类型绑定在一赗?BR><BR>hbm.xml影射文g?BR><set name="permissions" cascade="all" table="JBPM_ID_PERMISSIONS"><BR>      <key column="ENTITY_" foreign-key="none" /><BR>      <element type="org.jbpm.identity.hibernate.PermissionUserType"><BR>        <column name="CLASS_"/><BR>        <column name="NAME_"/><BR>        <column name="ACTION_"/><BR>      </element><BR>    </set>   <BR>一些特D的l合Q用Hibernate的组合用戯定义cdQ在使用上还是很方便的。目前的开发中gq个用的比较,可是在特定场合下可能用的比较多的?img src ="http://www.aygfsteel.com/javaora/aggbug/13304.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/javaora/" target="_blank">java世界畅谈</a> 2005-09-18 13:45 <a href="http://www.aygfsteel.com/javaora/archive/2005/09/18/13304.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>org.jbpm.indentity.hibernate包之IdentitySessionFactoryc?/title><link>http://www.aygfsteel.com/javaora/archive/2005/09/18/13302.html</link><dc:creator>java世界畅谈</dc:creator><author>java世界畅谈</author><pubDate>Sun, 18 Sep 2005 04:16:00 GMT</pubDate><guid>http://www.aygfsteel.com/javaora/archive/2005/09/18/13302.html</guid><wfw:comment>http://www.aygfsteel.com/javaora/comments/13302.html</wfw:comment><comments>http://www.aygfsteel.com/javaora/archive/2005/09/18/13302.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/javaora/comments/commentRss/13302.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/javaora/services/trackbacks/13302.html</trackback:ping><description><![CDATA[IdentitySessionFactorycd本上cM于Hibernate 的SessionFactoryQJbpm中很多采用了cM于SessionFactory的机制。其中有获取IndentitySession的几个方法。其中还有一个evictCachedIdentities()也不知道有什么用法,可能是将~存中的数据q行清空的操作?img src ="http://www.aygfsteel.com/javaora/aggbug/13302.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/javaora/" target="_blank">java世界畅谈</a> 2005-09-18 12:16 <a href="http://www.aygfsteel.com/javaora/archive/2005/09/18/13302.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>org.jbpm.identity.hibernate包之IdentitySessionc?/title><link>http://www.aygfsteel.com/javaora/archive/2005/09/18/13301.html</link><dc:creator>java世界畅谈</dc:creator><author>java世界畅谈</author><pubDate>Sun, 18 Sep 2005 04:05:00 GMT</pubDate><guid>http://www.aygfsteel.com/javaora/archive/2005/09/18/13301.html</guid><wfw:comment>http://www.aygfsteel.com/javaora/comments/13301.html</wfw:comment><comments>http://www.aygfsteel.com/javaora/archive/2005/09/18/13301.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/javaora/comments/commentRss/13301.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/javaora/services/trackbacks/13301.html</trackback:ping><description><![CDATA[一、这个类实现了IndentityService接口和ExpressionSession接口Q?BR>1.IndentityService接口Q?BR>校验用户ҎQObject verify(String userName, String pwd);<BR>Ҏ用户id获得UserQUser getUserById(Object userId);<BR>2.ExpressionSession接口Q?BR> Group getGroupByName(String groupName);<BR>User getUserByName(String userName);<BR>二、包含字D:<BR>  Session session<BR>        Transaction transaction<BR>三、方法:<BR>Q?其中的verify(String userName,String pwd)的处理是通过传递用户名和密码获得一个User列表Q如果ؓI或者size()为0Q返回异常,否则get(0)获得对象QUserQ?BR>Q?采用了Session的getҎ获取一个User<BR>Q?其中实现事务的开始、确认、回滚方?BR>Q?实现了用戗组、实体的保存加蝲{方?BR>Q?q有一堆的获得List的方法:<BR><img src ="http://www.aygfsteel.com/javaora/aggbug/13301.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/javaora/" target="_blank">java世界畅谈</a> 2005-09-18 12:05 <a href="http://www.aygfsteel.com/javaora/archive/2005/09/18/13301.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>org.jbpm.identity.hibernate包之一cIdentitySchema.javahttp://www.aygfsteel.com/javaora/archive/2005/09/18/13298.htmljava世界畅谈java世界畅谈Sun, 18 Sep 2005 03:42:00 GMThttp://www.aygfsteel.com/javaora/archive/2005/09/18/13298.htmlhttp://www.aygfsteel.com/javaora/comments/13298.htmlhttp://www.aygfsteel.com/javaora/archive/2005/09/18/13298.html#Feedback0http://www.aygfsteel.com/javaora/comments/commentRss/13298.htmlhttp://www.aygfsteel.com/javaora/services/trackbacks/13298.html  delimiter 定界W?BR>FieldsQ?BR>  private static final String IDENTITY_TABLE_PREFIX = "JBPM_ID_";
  Configuration configuration = null;
  Properties properties = null;
  Dialect dialect = null;
  Mapping mapping = null; 
  String[] createSql = null; //创徏SQL脚本
  String[] dropSql = null; //删除SQL脚本
  String[] cleanSql = null; //清除SQL脚本

  通过q个cd以创建数据库表结构,通过Hibernate的configuration.generateSchemaCreationScript(dialect)来创建SQL表结构schema的SQL脚本Q通过Jbpm特定的executeҎQJDBCQ,传入的SQL脚本执行executeUpdate执行表结构的操作?BR>  要完成这个操作,要先修改hibernate.cfg.xml配置文g?BR>

]]>
org.jbpm.identity?/title><link>http://www.aygfsteel.com/javaora/archive/2005/09/17/13256.html</link><dc:creator>java世界畅谈</dc:creator><author>java世界畅谈</author><pubDate>Sat, 17 Sep 2005 13:33:00 GMT</pubDate><guid>http://www.aygfsteel.com/javaora/archive/2005/09/17/13256.html</guid><wfw:comment>http://www.aygfsteel.com/javaora/comments/13256.html</wfw:comment><comments>http://www.aygfsteel.com/javaora/archive/2005/09/17/13256.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/javaora/comments/commentRss/13256.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/javaora/services/trackbacks/13256.html</trackback:ping><description><![CDATA[<P>(org.jbpm.identity)w䆾包包含有如下几个c:<BR>一、Entity 实体c:q个cM为users<用户>groups<l?gt;和memberships<成员>的超c,用来理名称和权限的增加删除和获取。其中用Cjdk的PermissioncR目前还不知道这个对具体权限的控制有什么作用?<BR>二、Groupl类Q这个类是Entity的承子c,q个cM要用于区分层ơ组、安全角色和其他?nbsp; <BR>  (1)主要包含以下几个FiledQ?BR>     protected String type = null;<BR>     protected Group parent = null; //父就是自?BR>     protected Set children = null; //子是一个集合,其中的元素也是Group<BR>     protected Set memberships = null; //会员<BR>   (2)JBpm的类内部Ҏ的命名还是很不错的:<BR>    public Set getUsersForMembershipName(String membershipName) 很容易理解ؓ通过membershipName来获得所有的用户?q个内不仅仅是简单的JavaBean的setter和getterQ而是q行一些引申的操作Q例如获取用户以及addXXX{操作?BR>   (3)与之相对应的hibernate Mapping文gGroup.hbm.xml其中也有几个地方Q值得注意Q其实这个在Jbpm中是大量使用的:<BR>  <CLASS <BR name="org.jbpm.identity.Group">         table="JBPM_ID_GROUP"<BR>         discriminator-value="G"><BR>    ....<BR>  <DISCRIMINATOR column="CLASS_" type="char" /><BR>  q里表示的是在JBPM_ID_GROUP表中的CLASS_字段{于G的ؓGroup的媄对象。这里我们在使用一个表的不同类?一个字D对应不同的?可以表CZ同的cd对象。这一点很值得我们学习的。其他值得我们x的是它采用的集合cd的操作方式,在我们以前的开发中q种做法q值得采用的?BR>三、Membership成员c:它是用户和组之间的一个联pȝ桥梁。会员的名称代表角色的名U。一个会员可能是一个组l的位置Q所以权限往往于会员联pR会员的名字能用来做角色的名字。不同的会员来担当不同的角色?BR>protected  String role = null;<BR>protected Group group = null;<BR>protected User user = null;<BR> q个cL有采用传l的构造子复用的方式,而是用很了很多的create()ҎQ有些方法让人感觉有些茫然不知所措,不过直接相关的代码,也就明白了?BR>  其中影射文g也用了discriminator(鉴别?的功能,以及many-to-one和set集合的做?BR>四、Userc:包含有三个字D:password email  以及Set memeberships?BR>  以下是通过两种方式获得Groups的方法,一个是通过l的cdQ一U是通过成员名称Q角色名Uͼ<BR>  public Set getGroupsForGroupType(String groupType)<BR>  public Set getGroupsForMembershipName(String membershipName)<BR><BR>  通过观察Q我们发现这里其实有以下几个对象QEntity Group Memebership User Permission。其中Group、Memebership、User都是Entity都是子类和父cȝ关系。Entity和Permission是一对多的关p,表示一个实体拥有各U不同的权限Q同样其他的Group{子c,也与Permission都是一对多的关pRGroup 和Memeber是一对多的,一个组h不同的角Ԍ成员Q。Membership与User和Group是多对一的关pRUser和Membership之间是一对多的关pR?BR><BR>其中涉及的表有:<BR>jbpm_id_group;<BR>jbpm_id_membership;<BR>jbpm_id_user;<BR><BR></P><img src ="http://www.aygfsteel.com/javaora/aggbug/13256.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/javaora/" target="_blank">java世界畅谈</a> 2005-09-17 21:33 <a href="http://www.aygfsteel.com/javaora/archive/2005/09/17/13256.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <a href="http://www.aygfsteel.com/" title="狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频">狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频</a> </div> </footer> վ֩ģ壺 <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">˫</a>| <a href="http://" target="_blank">Ͻ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ɽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">̳</a>| <a href="http://" target="_blank">Ϫ</a>| <a href="http://" target="_blank">̫</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">Ͽ</a>| <a href="http://" target="_blank">ױ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ʡ</a>| <a href="http://" target="_blank">绯</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ɾ</a>| <a href="http://" target="_blank">¤</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">º</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ʡ</a>| <a href="http://" target="_blank">з</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ˮ</a>| <a href="http://" target="_blank">ɽ</a>| <a href="http://" target="_blank">޶</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ɽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>