the fully qualified classname of an implementation of org.jbpm.taskmgmt.def.AssignmentHandler
config-type配置類型
attribute
optional
{field|bean|constructor|configuration-property}. Specifies how the assignment-handler-object should be constructed and how the content of this element should be used as configuration information for that assignment-handler-object.
{content}
optional
the content of the assignment-element can be used as configuration information for your AssignmentHandler implementations. This allows the creation of reusable delegation classes. for more about delegation configuration, see Section?16.2.3, “Configuration of delegations”.
五、任務實例TaskInstance 1,TaskNode的任務,默認情況下,會在TaskNode的execute方法中自動創(chuàng)建所有任務的實例。 TaskNode可以有多個任務。 2,Start-state也可以有Task,但只能有一個。這叫做開始任務。 這個開始任務,必須由用戶創(chuàng)建。它的參與者是當前JbpmContext的參與者。 TaskInstance taskInstance = null;??? jbpmContext.setActorId("cookie monster");??? // create a task to start the websale process??? taskInstance = processInstance.getTaskMgmtInstance().createStartTaskInstance(); 3,沒有開始任務,不創(chuàng)建開始任務都是可以的。 正文:?? JPDL specifies an xml schema and the mechanism to package all the process definition related files into a process archive. JPDL指定了一個XML模式,這個機制打包所有的業(yè)務程序定義相關文件進一個業(yè)務程序存檔文件。 16.1.?The process archive業(yè)務程序存檔文件 A process archive is a zip file. The central file in the process archive is processdefinition.xml. The main information in that file is the process graph. The processdefinition.xml also contains information about actions and tasks. A process archive can also contain other process related files such as classes, ui-forms for tasks, ... processdefinition.xml文件中的主要信息是業(yè)務程序圖表。也包含動作和任務的相關信息。一個業(yè)務程序存檔文件也能包含其它業(yè)務程序相關文件,例如:類,任務的UI窗體等。(一般不必包含,打包文件實際上是一個目錄*.par) 16.1.1.?Deploying a process archive部署一個業(yè)務程序存檔文件 Deploying process archives can be done in 3 ways: with the process designer tool, with an ant task or programatically. 有3種方法: 1,業(yè)務程序設計工具; 2,ant任務 3,編程方式。 Deploying a process archive with the designer tool is still under construction. 設計工具還在開發(fā)中。 Deploying a process archive with an ant task can be done as follows: <target name="deploy.par"> ?<taskdef name="deploypar" classname="org.jbpm.ant.DeployParTask"> ???<classpath --make sure the jbpm-[version].jar is in this classpath--/>? ??</taskdef>? ??<deploypar par="build/myprocess.par" /> </target> To deploy more process archives at once, use the nested fileset elements. The file attribute itself is optional. Other attributes of the ant task are: 要一次打包和發(fā)布多個業(yè)務程序定義,需要嵌套地使用fileset元素。File屬性是可選的。Ant任務的其他屬性是:
cfg: cfg is optional, the default value is 'hibernate.cfg.xml'. The hibernate configuration file that contains the jdbc connection properties to the database and the mapping files.
Cfg:這個是Hibernate數(shù)據(jù)源的配置文件。
properties: properties is optional and overwrites *all* hibernate properties as found in the hibernate.cfg.xml
createschema: if set to true, the jbpm database schema is created before the processes get deployed.
創(chuàng)建模式(數(shù)據(jù)庫表):如果設為true,那么每一次部署業(yè)務程序之前,都會重新創(chuàng)建jBPM初始化的數(shù)據(jù)庫表! Process archives can also be deployed programmatically with the class org.jbpm.jpdl.par.ProcessArchiveDeployer 16.1.2.?Process versioning業(yè)務程序版本 Process definitions should never change because it is extremely difficult (if not, impossible) to predict all possible side effects of process definition changes. 業(yè)務程序定義應該從不改變。因為它是非常重要的。無法預知定義改變可能帶來哪些意想不到的問題。 To get around this problem, jBPM has a sophicticated process versioning mechanism. The versioning mechanism版本機制allows multiple process definitions of the same name to coexist in the database. A process instance can be started in the latest version available at that time and it will keep on executing in that same process definition for its complete lifetime. When a newer version is deployed, newly created instances will be started in the newest version, while older process instances keep on executing in the older process defintions. 圍繞這個問題,jBPM提供了一個版本機制。版本機制允許多個同名的業(yè)務程序定義在數(shù)據(jù)庫中共存。舊版本業(yè)務程序定義的實例將按照舊的定義執(zhí)行。新版本業(yè)務程序定義的實例,將始終依照新的定義執(zhí)行。 Process definitions are a combination of a declaratively specified process graph and optionally, a set of related java classes. The java classes can be made available to the jBPM runtime environment in 2 ways : by making sure these classes are visible to the jBPM classloader. This usually means that you can put your delegation classes in a .jar file next to the jbpm-[version].jar. The java classes can also be included in the process archive. When you include your delegation classes in the process archive (and they are not visible to the jbpm classloader), jBPM will also apply versioning版本on these classes. More information about process classloading can be found in Section?16.2, “Delegation” 業(yè)務程序定義是特定的業(yè)務程序圖表(.xml定義文件)和一系列相關的java類(可以沒有)的結合。這些Java類都是在.xml文件中指定的。當然,還有支持jPDL的jBPM引擎。 對jBPM運行時環(huán)境可用的Java類有2種方法: 1,確信這些類對于jBPM類載入器是可用的。 Java類能夠和jBPM的jar包放在一起?;蛘?#xff0c;java類能夠放在業(yè)務程序存檔文件中。 總之,在classpath中,就對程序的類載入器可見。 When a process archive gets deployed, it creates a process definition in the jBPM database. Process definitions can be versioned on the basis of the process definition name. When a named process archive gets deployed, the deployer will assign a version number. To assign this number, the deployer will look up the highest version number for process definitions with the same name and adds 1. Unnamed process definitions will always have version number -1. 當一個業(yè)務程序存檔文件部署以后,它在JBPM數(shù)據(jù)庫中創(chuàng)建一個業(yè)務程序定義。部署器將分配一個版本號給業(yè)務程序定義。未命名的業(yè)務程序定義的版本號是-1。 16.1.3.?Changing deployed process definitions更改已部署的業(yè)務程序定義 Changing process definitions after they are deployed into the jBPM database has many potential pitfalls. Therefor, this is highly discouraged. 更改已經(jīng)部署在jBPM數(shù)據(jù)庫中的業(yè)務程序定義有許多潛在的風險,強烈建議你不這樣做。應該重新部署新版本的業(yè)務程序定義。 Actually實際上, there is a whole variety of possible changes that can be made to a process definition. Some of those process definitions are harmless, but some other changes have implications far beyond the expected and desirable. So please consider migrating process instances to a new definition over this approach. In case you would consider it, these are the points to take into consideration: 需要考慮的事項: Use hibernate's update: You can just load a process definition, change it and save it with the hibernate session. The hibernate session can be accessed with the method JbpmContext.getSession(). 使用Hibernate的更新:得到Hibernate Session,修改數(shù)據(jù)庫中的業(yè)務程序定義。 The second level cache: A process definition would need to be removed from the second level cache after you've updated an existing process definition. See also Section?7.10, “Second level cache” 二級緩存:更改后,必須將業(yè)務程序定義從二級緩存中刪除。原來使用二級緩存是因為基本上業(yè)務程序定義很少更改。 16.1.4.?Migrating process instances移植業(yè)務程序實例(尚未開發(fā)) An alternative approach to changing process definitions might be to convert the executions to a new process definition. Please take into account that this is not trivial due to the long-lived nature of business processes. Currently, this is an experimental area so for which there are not yet much out-of-the-box support. 一種可選的改變業(yè)務程序定義的方法,可能是把原來業(yè)務程序實例轉變?yōu)橐勒招碌臉I(yè)務程序定義。這樣做的理由是,長生命周期的業(yè)務程序實例。 如,CMS系統(tǒng)的新聞采集、提交、歸檔。所有發(fā)布中的文檔,都是未結束的工作流管理的對象。如果該條工作流的定義發(fā)生了變化。那么,非常有可能需要把執(zhí)行中的大量業(yè)務程序實例都發(fā)出去。 這是一個實驗領域,還沒有很多經(jīng)驗。 As you know there is a clear distinction between process definition data, process instance data (the runtime data) and the logging data. With this approach, you create a separate new process definition in the jBPM database (by e.g. deploying a new version of the same process). 業(yè)務程序定義數(shù)據(jù)、業(yè)務程序實例數(shù)據(jù)和日志數(shù)據(jù)之間有清晰的區(qū)別。你創(chuàng)建一個新版本的業(yè)務程序定義。 Then the runtime information is converted to the new process definition. This might involve a translation cause tokens in the old process might be pointing to nodes that have been removed in the new version. So only new data is created in the database. But one execution of a process is spread over two process instance objects. 業(yè)務程序實例轉換到新的業(yè)務程序定義。這可能造成這樣的情況,token中的節(jié)點指針指向了一個新版本中已經(jīng)刪除的節(jié)點。把一個業(yè)務程序實例劃分為多個業(yè)務程序實例對象。 This might become a bit tricky for the tools and statistics calculations. When resources permit us, we are going to add support for this in the future. E.g. a pointer could be added from one process instance to it's predecessor。 未來我們可能提供:業(yè)務程序實例中增加一個能夠指向前輩實例的指針。 16.1.5.?Process conversion業(yè)務程序轉化 A conversion class has been made available to assist you with converting your jBPM 2.0 process archives into jBPM 3.0 compatible process archives. Create an output directory to hold the converted process archives. Enter the following command line from the build directory of the jBPM 3.0 distribution: java -jar converter.jar indirectory outdirectory Substitute the input directory where your jBPM 2.0 process archives reside for "indirectory". Substitute the output directory for the one you created to hold the newly converted process archives for "outdirectory". 16.2.?Delegation委派 Delegation is the mechanism used to include the users' custom code in the execution of processes. 委派是一個機制,用來在業(yè)務程序的執(zhí)行中包含用戶的定制代碼。 委派類是指,在業(yè)務程序實例的執(zhí)行過程中被調用的用戶自定義的Java類。 委派類,應該是指jPDL定義中需要用到的Java類。如,ActionHandler,執(zhí)行動作、業(yè)務邏輯。 AssignmentHandler,執(zhí)行任務分派。把任務或泳道分配給用戶或用戶池。 條件等。 這些都使用了參數(shù)回調模式。用戶提供的這些類,會被jBPM所調用。這些類可以使用jBPM傳入的業(yè)務程序實例和任務等的信息。 委派模式,就是把任務交給下層助手類去處理。jBPM中之所以叫我們自定義的類為委派類。就是jBPM把任務交給了這些助手類。通過接口調用這些助手類。ActionHandler等實現(xiàn)類,實際上還是委派模式的委派者。它們可能還會繼續(xù)把任務委派給助手類! 16.2.1.?The jBPM class loaderjBPM類載入器 The jBPM class loader is the class loader that loads the jBPM classes. Meaning, the classloader that has the library jbpm-3.x.jar in its classpath. To make classes visible to the jBPM classloader, put them in a jar file and put the jar file besides the jbpm-3.x.jar. E.g. in the WEB-INF/lib folder in the case of webapplications. 16.2.2.?The process class loader業(yè)務程序類載入器 Delegation classes are loaded with the process class loader of their respective process definition. The process class loader is a class loader that has the jBPM classloader as a parent. The process class loader adds all the classes of one particular process definition. You can add classes to a process definition by putting them in the /classes folder in the process archive. Note that this is only useful when you want to version the classes that you add to the process definition. If versioning is not necessary, it is much more efficient to make the classes available to the jBPM class loader. 在業(yè)務程序存檔文件的/classes目錄中的類,增加到了業(yè)務程序定義中。每個業(yè)務程序定義可以有一個類載入器。他們的父類載入器是jBPM的類載入器。 注意,這僅僅在你要版本化你的業(yè)務程序定義的委派類時,才值得這么做。 即,一個業(yè)務程序定義,需要一種委派類。 16.2.3.?Configuration of delegations委派的配置 Delegation classes contain user code that is called from within the execution of a process. The most common example is an action. In the case of action, an implementation of the interface ActionHandler can be called on an event in the process. Delegations are specified in the processdefinition.xml. 3 pieces of data can be supplied when specifying a delegation : 委派類是指,在業(yè)務程序實例的執(zhí)行過程中被調用的用戶自定義的Java類。 最普通的例子是Action。委派的Java類在processdefinition.xml中被指定。 指定一個委派的Java類需要提供3塊數(shù)據(jù): //這是通過字段實現(xiàn)的 <action class="org.test.MyAction"> ?<city>Atlanta</city> ?<rounds>5</rounds> </action>
1) the class name (required) : the fully qualified class name of the delegation class.
1,類名:委派類的全名 <action class="org.test.MyAction">
2) configuration type (optional) : specifies the way to instantiate and configure the delegation object. By default the default constructor is used and the configuration information is ignored.
3) configuration (optional) : the configuration of the delegation object in the format as required by the configuration type.
3,配置 Atlanta Next is a description of all the configuration types: 配置類型 16.2.3.1.?config-type field配置類型字段 This is the default configuration type. The config-type field will first instantiate an object of the delegation class and then set values in the fields of the object as specified in the configuration. The configuration is xml, where the elementnames have to correspond with the field names of the class. The content text of the element is put in the corresponding field. If necessary and possible, the content text of the element is converted to the field type. 這是默認的配置類型。不配置,也會使用默認無參構造器生成對象。 config-type="field",或者不設置屬性,那么會首先實例化委派/回調java類的對象。然后用配置中的值設置對象的字段的值。字段的配置是xml格式的。xml元素名和類的字段名相同。xml元素的文本內(nèi)容,賦值給這個字段。Xml的文本元素能夠被正確的轉換為字段所需的類型。(Spring也可以。是特殊的類型,在Spring中一般是另一個Spring管理的對象) Supported type conversions: 支持的類型轉換:
String doesn't need converting, of course. But it is trimmed.
String不需要轉換,但會2邊切除空格。
primitive types such as int, long, float, double, ...
原生類型
and the basic wrapper classes for the primitive types.
原生類型的包裝類
lists, sets and collections. In that case each element of the xml-content is consitered as an element of the collection and is parsed, recursively applying the conversions. If the type of the elements is different from java.lang.String this can be indicated by specifying a type attribute with the fully qualified type name. For example, following snippet will inject an ArrayList of Strings into field 'numbers':
List,Set,Collection這些集合類。Xml內(nèi)容的每一個元素被認為是集合的一個元素。這些元素被分別遞歸轉換類型。 如果元素的類型不是String。可以通過指出類型的全類名來進行轉換。 ·??????????????? <numbers> ·??????????????? ??<element>one</element> ·??????????????? ??<element>two</element> ·??????????????? ??<element>three</element> </numbers> 如,指定元素的屬性 ·??????????????? <numbers> ·??????????????? ??<element type="com.withub.cms.jbpm.assignmenthandler.WriteNewsAssignmentHandler">one</element> ·??????????????? ??<element>two</element> ·??????????????? ??<element>three</element> </numbers> ? ? The text in the elements can be converted to any object that has a String constructor. To use another type then String, specify the element-type in the field element ('numbers' in this case). Here's another example of a map: <numbers> ?<entry><key>one</key><value>1</value></entry> ?<entry><key>two</key><value>2</value></entry> ?<entry><key>three</key><value>3</value></entry> </numbers>
maps. In this case, each element of the field-element is expected to have one subelement key and one element value. The key and element are both parsed using the conversion rules recursively. Just the same as with collections, a conversion to java.lang.String is assumed if no type attribute is specified.
org.dom4j.Element
for any other type, the string constructor is used.
任何使用了String構造器的類。(String唯一參數(shù)的構造器) For example in the following class... public class MyAction implements ActionHandler { ?// access specifiers can be private, default, protected or public ?private String city; ?Integer rounds; ?... } ...this is a valid configuration: 這是有效的配置: ... <action class="org.test.MyAction"> ?<city>Atlanta</city> ?<rounds>5</rounds> </action> ... 16.2.3.2.?config-type bean配置類型Bean Same as config-type field but then the properties are set via setter methods, rather then directly on the fields. The same conversions are applied. 類似于配置類型字段,但它是通過set方法設置的。而不是直接作用于字段。 必有set方法,是屬性(可以沒有get方法)。 16.2.3.3.?config-type constructor配置類型構造器 This instantiator will take the complete contents of the delegation xml element and passes this as text in the delegation class constructor. 把參數(shù)作為String傳入到構造器中。類必須有這樣的構造器: Class(String string){ };//這樣的構造器。 16.2.3.4.?config-type configuration-property配置類型----配置屬性 First, the default constructor is used, then this instantiator will take the complete contents of the delegation xml element, and pass it as text in method void configure(String);. (as in jBPM 2) 第一,使用默認構造器創(chuàng)建對象。會把xml元素定義的內(nèi)容傳遞到類的方法: configure(String) ??? 這個已經(jīng)不大使用了! 16.3.?Expressions表達式 For some of the delegations, there is support for a JSP/JSF EL like expression language. In actions, assignments and decision conditions, you can write an expression like e.g. 在一些委派Java中,支持EL語言。類似于EL表達式。在action,任務分配,決定條件,你能寫一個表達式: expression="#{myVar.handler[assignments].assign}" 注意,jBPM的Web應用頁面也使用這種EL。 如:<h:commandButton action="#{taskBean.save}" value="Save"/> Save是方法名。也可以跟屬性名。、 <h2><h:outputText value="#{taskBean.taskInstance.name}" /></h2> JSP的EL語言只能通過建立表達式${exp1}來進行調用。 The basics of this expression language can be found in the J2EE tutorial. The jPDL expression language is similar to the JSF expression language. Meaning that jPDL EL is based on JSP EL, but it uses #{...} notation and that it includes support for method binding. jPDL表達式語言類似于JSF表達式語言。這意味著,jPDL EL基于JSP EL。但它使用#{?}符號,包括對方法綁定的支持。 Depending on the context, the process variables or task instance variables can be used as starting variables along with the following implicit objects: 依靠上下文,業(yè)務程序變量和任務變量連同下面的對象能夠被用作EL表達式的開始變量:?? 也就是說可以直接在EL表達式#{…}中使用!
the leaving transitions. Each transition leaving a node *must* have a distinct name. A maximum of one of the leaving transitions is allowed to have no name. The first transition that is specifed is called the default transition. The default transition is taken when the node is left without specifying a transition.
event事件 支持事件類型:進入節(jié)點,離開節(jié)點
element
[0..*]
supported event types: {node-enter|node-leave}
exception-handler
element
[0..*]
a list of exception handlers that applies to all exceptions thrown by delegation classes thrown in this process node.
timer定時器 監(jiān)控這個節(jié)點的執(zhí)行
element
[0..*]
specifies a timer that monitors the duration of an execution in this node.
{unsynchronized異步|never從不|first第一個任務|first-wait|last全部任務|last-wait}, default is last. signal specifies the effect of task completion on the process execution continuation.
{yes|no|true|false}, default is true. can be set to false when a runtime calculation has to determine which of the tasks have to be created. in that case, add an action on node-enter, create the tasks in the action and set create-tasks to false.
specifies how data should be copied from the super process to the sub process at the start and from the sub process to the super process upon completion of the sub process.
the leaving transitions. The leaving transitions of a decision can be extended with a condition. The decision will look for the first transition for which the condition evaluates to true. A transition without a condition is considered to evaluate to true (to model the 'otherwise' branch). See the condition element
common node elements
See common node elements
16.4.14.?event事件Table?16.13.?
Name
Type
Multiplicity
Description
Type類型(事件的類型)
attribute
required
the event type that is expressed relative to the element on which the event is placed
the actions to be executed upon taking this transition. Note that the actions of a transition do not need to be put in an event (because there is only one)
exception-handler
element
[0..*]
a list of exception handlers that applies to all exceptions thrown by delegation classes thrown in this process node.
16.4.16.?action動作Table?16.15.?
Name
Type
Multiplicity
Description
Name名字 有名字的動作,可以被在業(yè)務程序定義中尋找。
attribute
Optional 可選
the name of the action. When actions are given names, they can be looked up from the process definition. This can be useful for runtime actions and declaring actions only once.
Class全類名 (action需要3者之一:全類名class,引用名ref-name,表達式)
attibute
either, a ref-name or an expression
the fully qualified class name of the class that implements the org.jbpm.graph.def.ActionHandler interface.
ref-name引用名 引用的動作的名字(讓被引用的action處理)
attibute
either this or class
the name of the referenced action. The content of this action is not processed further if a referenced action is specified.
Expression表達式 類EL表達式指定方法
attibute
either this, a class or a ref-name
A jPDL expression that resolves to a method. See also Section?16.3, “Expressions”
{yes|no|true|false}. Default is yes|true. If set to false, the action will only be executed on events that were fired on this action's element. for more information, see Section?9.5.4, “Event propagation”
{field|bean|constructor|configuration-property}. Specifies how the action-object should be constructed and how the content of this element should be used as configuration information for that action-object.
Default is false, which means that the action is executed in the thread of the execution. If set to true, a message will be sent to the command executor and that component will execute the action asynchonously in a separate transaction.
the content of the action can be used as configuration information for your custom action implementations. This allows the creation of reusable delegation classes. For more about delegation configuration, see Section?16.2.3, “Configuration of delegations”.
16.4.17.?script腳本(BeanShell)Table?16.16.?
Name
Type
Multiplicity
Description
Name腳本類型的動作的名字 有名字的腳本,可被查找。 (action的ref-name)
attribute
optional
the name of the script-action. When actions are given names, they can be looked up from the process definition. This can be useful for runtime actions and declaring actions only once.
accept-propagated-events 接受傳播事件
attribute
optional [0..*]
{yes|no|true|false}. Default is yes|true. If set to false, the action will only be executed on events that were fired on this action's element. for more information, see Section?9.5.4, “Event propagation”
the beanshell script. If you don't specify variable elements, you can write the expression as the content of the script element (omitting the expression element tag).
in variable for the script. If no in variables are specified, all the variables of the current token will be loaded into the script evaluation. Use the in variables if you want to limit the number of variables loaded into the script evaluation.
this defaults to the variable name. it specifies a name to which the variable name is mapped. the meaning of the mapped-name is dependent on the context in which this element is used. for a script, this will be the script-variable-name. for a task controller, this will be the label of the task form parameter and for a process-state, this will be the variable name used in the sub-process.
A jPDL expression. The returned result is transformed to a string with the toString() method. The resulting string should match one of the leaving transitions. See also Section?16.3, “Expressions”.
Class類名 如果使用DecisionHandler而不是EL表達式。
attibute
either this or ref-name
the fully qualified class name of the class that implements the org.jbpm.graph.node.DecisionHandler interface.
config-type配置類型 (和ActionHandler中一樣)
attribute
optional
{field|bean|constructor|configuration-property}. Specifies how the action-object should be constructed and how the content of this element should be used as configuration information for that action-object.
{content}
optional
the content of the handler can be used as configuration information for your custom handler implementations. This allows the creation of reusable delegation classes. For more about delegation configuration, see Section?16.2.3, “Configuration of delegations”.
the duration (optionally expressed in business hours) that specifies the time period between the creation of the timer and the execution of the timer. See Section?14.1, “Duration” for the syntax.
{duration | 'yes' | 'true'}after a timer has been executed on the duedate, 'repeat' optionally specifies duration between repeating timer executions until the node is left. If yes or true is specified, the same duration as for the due date is taken for the repeat. See Section?14.1, “Duration” for the syntax.
this attribute is only to be used in timers of tasks. it specifies the event on which the timer should be cancelled. by default, this is the task-end event, but it can be set to e.g. task-assign or task-start. The cancel-event types can be combined by specifying them in a comma separated list in the attribute.
an action that should be executed when this timer fires
16.4.22.?create-timer創(chuàng)建定時器Table?16.21.?
Name
Type
Multiplicity
Description
Name定時器的名字
attribute
optional
the name of the timer. The name can be used for cancelling the timer with a cancel-timer action.
Duedate延期時間 創(chuàng)建定時器和執(zhí)行定時器的時間間隔
attribute
required
the duration (optionally expressed in business hours) that specifies the the time period between the creation of the timer and the execution of the timer. See Section?14.1, “Duration” for the syntax.
{duration | 'yes' | 'true'}after a timer has been executed on the duedate, 'repeat' optionally specifies duration between repeating timer executions until the node is left. If yes of true is specified, the same duration as for the due date is taken for the repeat. See Section?14.1, “Duration” for the syntax.
{yes|no|true|false}, default is false. If blocking is set to true, the node cannot be left when the task is not finished. If set to false (default) a signal on the token is allowed to continue execution and leave the node. The default is set to false, because blocking is normally forced by the user interface.
{yes|no|true|false}, default is true. If signalling is set to false, this task will never have the capability of trigering the continuation of the token.
Duedate延遲時間(任務執(zhí)行的的延遲時間)
attribute
optional
is a duration expressed in absolute or business hours as explained in Chapter?14, Business calendar
supported event types: {task-create|task-start|task-assign|task-end}. Especially for the task-assign we have added a non-persisted property previousActorId to the TaskInstance
exception-handler
element
[0..*]
a list of exception handlers that applies to all exceptions thrown by delegation classes thrown in this process node.
timer
element
[0..*]
specifies a timer that monitors the duration of an execution in this task. special for task timers, the cancel-event can be specified. by default the cancel-event is task-end, but it can be customized to e.g. task-assign or task-start.
specifies how the process variables are transformed into task form parameters. the task form paramaters are used by the user interface to render a task form to the user.
For historical reasons, this attribute expression does not refer to the jPDL expression, but instead, it is an assignment expression for the jBPM identity component. For more information on how to write jBPM identity component expressions, see Section?11.11.2, “Assignment expressions”. Note that this implementation has a dependency on the jbpm identity component.
actor-id 參與者id 這是一個beanshell表達式。屬性或方法返回一個String
attribute
optional
An actorId. Can be used in conjunction with pooled-actors. The actor-id is resolved as an expression. So you can refer to a fixed actorId like this actor-id="bobthebuilder". Or you can refer to a property or method that returns a String like this: actor-id="myVar.actorId", which will invoke the getActorId method on the task instance variable "myVar".
A comma separated list of actorIds. Can be used in conjunction with actor-id. A fixed set of pooled actors can be specified like this: pooled-actors="chicagobulls, pointersisters". The pooled-actors will be resolved as an expression. So you can also refer to a property or method that has to return, a String[], a Collection or a comma separated list of pooled actors.
Class全類名
attribute
optional
the fully qualified classname of an implementation of org.jbpm.taskmgmt.def.AssignmentHandler
config-type配置類型
attribute
optional
{field|bean|constructor|configuration-property}. Specifies how the assignment-handler-object should be constructed and how the content of this element should be used as configuration information for that assignment-handler-object.
{content}
optional
the content of the assignment-element can be used as configuration information for your AssignmentHandler implementations. This allows the creation of reusable delegation classes. for more about delegation configuration, see Section?16.2.3, “Configuration of delegations”.
the fully qualified classname of an implementation of org.jbpm.taskmgmt.def.TaskControllerHandler
config-type配置類型
attribute
optional
{field|bean|constructor|configuration-property}. Specifies how the assignment-handler-object should be constructed and how the content of this element should be used as configuration information for that assignment-handler-object.
{content}
either the content of the controller is the configuration of the specified task controller handler (if the class attribute is specified. if no task controller handler is specified, the content must be a list of variable elements.
{content} or attribute expression 內(nèi)容,或者屬性EL表達式。 條件元素的內(nèi)容是jPDL的EL表達式,返回true/false。 Decision將執(zhí)行第一個表達式值為true的轉向(次序依照processdefinition.xml中出現(xiàn)的先后順序)。如果沒有條件是真的轉向,那么就會執(zhí)行默認轉向(第一個)
required
The contents of the condition element is a jPDL expression that should evaluate to a boolean. A decision takes the first transition (as ordered in the processdefinition.xml) for which the expression resolves to true. If none of the conditions resolve to true, the default leaving transition (== the first one) will be taken.
specifies the fully qualified name of the java throwable class that should match this exception handler. If this attribute is not specified, it matches all exceptions (java.lang.Throwable).
action動作 當異常處理器處理異常時,執(zhí)行的動作。
element
[1..*] 1或多
a list of actions to be executed when an exception is being handled by this exception handler.