龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > 软件开发 > JAVA开发 >

PowerFolder 工作流服务器版本0.5 试驾之旅(6)

时间:2009-12-23 15:42来源:未知 作者:admin 点击:
分享到:
Developing Scripts and Script Tags 开发脚本和脚本的标签 4.1 Overview概述 To create or edit existing scripts, from the PowerFolder Console click Develop, then Scripts. You can script by entering its name in the box next to New Sc

  Developing Scripts and Script Tags
  开发脚本和脚本的标签

   4.1 Overview概述
  To create or edit existing scripts, from the PowerFolder Console click 'Develop', then 'Scripts'.
  You can script by entering its name in the box next to 'New Script' and clicking 'Create'.
  Remember, new and editted scripts do not take affect until they are deployed under the
  'Administer' section.
  为了创建脚本或编辑已存在的脚本,从PowerFolder控制台中单击'Develop',然后
  'Scripts'。你可以在New Script旁边的文本框中输入脚本的名称,单击'Create'来创建
  脚本。记住,新的和编辑的脚本不会发生作用,直到他们在'Administer'部分被发布。

  Scripts consist a hierarchy of tags. Tags have names, can have properties, and contain other tags.
  脚本包括一系列的标签。标签有名字,可以有属性,而且可以包括其他标签。

  There are two types of tags - core and returnable. Core tags represent workflow framework (e.g.
  states, transitions, attributes, etc.). Returnable tags either evaluate (e.g. get an attribute's value,
  add two values, get trigger text) or 'do something' (e.g. set an attribute, send an email, print to the
  console).
  有两种标签—核心标签和可运行标签。核心标签表示了工作流的框架结构(例如,状
  态,转变,属性等等)。可运行标签或者求值(例如,得到一个属性的值,两个值相加,
  得到触发器文本),或者做某些事情(例如,设置一个属性,发送一份电子邮件,打印到
  控制台).

  Core tags form the foundation of a script. 'Process Map' is at the base of this foundation, no tag
  contains 'Process Map'. It contains the 'Attributes', 'Starts', 'States', and 'Stops' of the script. These
  tags in turn hold other core tags. Some core tags, however, contain returnable tags. 'Execute'
  needs one or more tags to evaluate or 'do something', 'If Transition' needs to evaluate whether its
  path is taken, etc.
  核心标签形成了脚本的基础。路线图是在这个基础之上,没有标签包含路线图。路线图包
  括脚本的属性,开始,状态,结束。这些标签又可以包含其它核心标签。然而,一些核心
  标签包含可运行标签。'Execute'标签需要一个或多个标签来求值或者做某些事情。'If
  Transition'标签需要计算采用那条路径等等。

  Returnable tags cannot contain core tags, but may contain other returnable tags.
  可运行标签不能包括核心标签,但可以包含其他可运行标签。
   4.2 Core Tags核心标签

   4.2.1 Attribute属性
  An attribute is a variable that can be set and read from within a script and externally using the
  Web Client API. It has a type. This type can be a Boolean (true or false), Decimal (a number), a
  String (character data), or a Java class.
  属性是一个变量,它可以在一个脚本内被设置和读取,也可以使用web client
  API来设置和读取。它有一个类型。这个类型可以是Boolean,Decimal,String,或者一个Jav
  a类 。
   4.2.2 Attributes属性集合
  Attributes, or attribute set, holds all script-specific Attributes and Interal Attributes.
  属性集合,保持了所有脚本特定属性和内部属性 。
   4.2.3 Branch分支
  A Branch allows a workflow to go in two or more directions simultaneously.
  一个分支容许一个工作流同时进入两个或更多的方向。
   4.2.4 Default Transition默认转换
  The path a workflow will take unless it is preempted by an If Transition.
  一个工作流所采用的默认路径,除非它被IfTransition所截获。
   4.2.5 Execute执行
  Execute holds all actions that take place at a State.
  
  

精彩图集

赞助商链接