Oracle神谕

  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  284 随笔 :: 9 文章 :: 106 评论 :: 0 Trackbacks

Class 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).
在流程定义中表现一个执行路径和维持一个指示器给一个节点。
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.
    准备一个信号给标记。这个方法激活这个标记并且离开当前的状态越过缺省的跃迁。
------------------------------------
Class ProcessInstance
is one execution of a ProcessDefinition. To create a new process execution of a process definition, just use the ProcessInstance(ProcessDefinition).
是一个流程定义的执行。
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();
为流程实例维持所有的key-variable对。

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

--------------------------
任务节点:
<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(); //标志这个任务已经结束

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

posted on 2005-09-19 11:49 java世界畅谈 阅读(941) 评论(0)  编辑  收藏 所属分类: JBPM

只有注册用户登录后才能发表评论。


网站导航: