H3 BPM接口说明文档

 

 

     

    

 

 

 

H3 BPM接口说明文档

 

二〇一七年四月

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1 引擎接口唯一入口:OThinker.H3.IEngine 3

1.1 构造Engine对象 3

1.2 属性 4

2 类:OThinker.H3.Acl.IBizRuleAclManager 6

3 类:OThinker.H3.Acl.IFunctionAclManager 8

4 类:OThinker.H3.Acl.ISystemOrgAclManager 12

5 类:OThinker.H3.Acl.ISystemAclManager 15

6 类:OThinker.H3.Acl.IWorkflowAclManager 17

7 类:OThinker.H3.Apps.IAppNavigationManager 20

8 类:OThinker.H3.BizBus.IBizBus 22

9 类:OThinker.H3.Sheet.IBizSheetManager 30

10 类:OThinker.H3.SNS.ISNSManager 32

11 类:OThinker.H3.Site.ISiteManager 37

12 类:OThinker.H3.Apps.IAppPackageManager 43

13 类:OThinker.H3.WorkflowTemplate.IWorkflowConfigManager 46

14 类:OThinker.H3.Notification.IWeChatAdapter 48

15 类:OThinker.H3.Instance.IHeapDataManager 50

16 类:OThinker.H3.DataModel.IBizObjectManager 54

17 类:OThinker.H3.DataModel.IBizObjectTrackManager 68

18 类:OThinker.H3.DataModel.IFilePolicyManager 70

19 类:OThinker.H3.Analytics.IAnalyzer 72

20 类:OThinker.H3.WorkItem.IAgencyManager 75

21 类:OThinker.H3.WorkItem.IConsultancyManager 78

22 类:OThinker.H3.Exceptions.IExceptionManager 80

23 类:OThinker.H3.Instance.IInstanceManager 83

24 类:OThinker.H3.Instance.IInstanceSimulationManager 86

25 类:OThinker.H3.Data.IMetadataRepository 89

26 类:OThinker.H3.Notification.INotifier 94

27 类:OThinker.H3.Settings.ISettingManager 95

28 类:OThinker.H3.WorkItem.IUrgencyManager 99

29 类:OThinker.H3.Tracking.IUserLogWriter 100

30 类:OThinker.H3.WorkflowTemplate.IWorkflowManager 101

31 类:OThinker.H3.Calendar.IWorkingCalendarManager 107

32 类:OThinker.H3.WorkItem.IWorkItemManager 112

33 类:OThinker.H3.EventHandlers.IMessageEventHandler 121

34 类:OThinker.H3.EventHandlers.IEngineEventHandler`1 122

35 类:OThinker.H3.EventHandlers.INotificationEventHandler 124

36 类:OThinker.H3.EventHandlers.IOrganizationEventHandler 125

37 类:OThinker.H3.EventHandlers.IInstanceEventHandler 126

38 类:OThinker.H3.EventHandlers.IWorkItemEventHandler 127

39 常用方法示例 129

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1 引擎接口唯一入口OThinker.H3.IEngine

说明:流程引擎,通过该接口来访问流程服务。

示例1:获取组织机构对象

this.Engine.Organization.GetUnit("组织ID");

示例2:获取流程实例

this.Engine.InstanceManager.GetInstanceContext("流程实例ID");

示例3:获取已发布的默认流程模板对象

this.Engine.WorkflowManager.GetDefaultWorkflow("流程模板编码");

示例4:获取已发布的默认流程模板对象

this.Engine.WorkItemManager.GetWorkItem("工作任务ID");

示例5:获取工作日历

this.Engine.WorkingCalendarManager.GetCalendar("工作日历ID");

1.1 构造Engine对象

方法1:

            OThinker.H3.Connection conn = new Connection();

            conn.Open("Servers=127.0.0.1:8211;User=administrator;Password=000000;Engine=DefaultEngine");

            IEngine _Engine = conn.Engine;

            // 调用示例(获取组织对象)

            OThinker.Organization.Unit unit = _Engine.Organization.GetUnit("组织ID");

方法2:

            OThinker.H3.Connection conn = new Connection();

            conn.Open("127.0.0.1", 8211, "DefaultEngine", "Administrator", "000000");

            IEngine _Engine = conn.Engine;

            // 调用示例(获取组织对象)

            OThinker.Organization.Unit unit = _Engine.Organization.GetUnit("组织ID");

注:如果继承至OThinker.H3.Portal.PortalPage或者 SheetPage 类,均已经存在 Engine对象可以直接访问。

1.2 属性

名称

说明

EngineConfig

流程引擎的基础配置

SettingManager

配置管理器

LogWriter

用于写日志

AppNavigationManager

应用程序管理器

WorkflowConfigManager

流程模板设计管理器

WorkflowManager

流程管理器

BizObjectManager

数据模型管理器

BizSheetManager

表单管理器

HeapDataManager

堆数据管理器

MetadataRepository

元数据管理器

Notifier

用于通知

WeChatAdapter

微信

SimulationManager

流程模拟管理器

InstanceManager

流程实例管理器

WorkItemManager

工作项管理器

ConsultancyManager

征询意见关系管理器

AgencyManager

委托管理器

UrgencyManager

催办

ExceptionManager

异常管理器,用于管理异常信息

TimerManager

定时器

Organization

组织结构管理器

BizRuleAclManager

业务规则权限控制器

WorkflowAclManager

流程模板权限控制器

SystemAclManager

系统权限控制器

SystemOrgAclManager

系统权限控制器

FunctionAclManager

功能权限控制器

WorkingCalendarManager

工作日历

BizBus

业务服务总线

AppPackageManager

流程包

Analyzer

分析器,用于分析报表

Query

查询器,用于直接查询数据库,这是一个特殊的属性,客户端调用Query的时候,并不通过Engine,而是直接访问数据库,所以在这里没有标记为服务器集群模块

BPAQuery

查询器,用于直接查询数据库,这是一个特殊的属性,客户端调用Query的时候,并不通过Engine,而是直接访问数据库,所以在这里没有标记为服务器集群模块

UserLogWriter

用户操作日志

SNSManager

企业社交管理器

Interactor

交互服务。外部系统与引擎交互,有的时候为了完成某一项工作,需要与引擎多次交互,为了提高这种交互效率,我们在这里将多个接口封装成一个接口,一次调用即可完成所有工作

PerformanceTrackManager

性能监控日志

Exceptional

是否出现了异常

SiteManager

门户管理器

 

2 类:OThinker.Organization.IOrganization

说明:组织结构接口,用于增删改查组织结构信息,整个组织结构的索引是完全建立在内存索引的基础上的,所以相应会非常快

 

方法名称:Reload

方法说明

装载必须装载全部数据,因为其他的判断包括Alias是否存在的判断都是判断内存中的数据

输入参数

名称

类型

说明

返回值

 

方法名称:GetUnit(System.String)

方法说明

根据ID获得Unit

输入参数

名称

类型

说明

ID

System.String

组织的ID

返回值

组织对象

 

方法名称:GetUnits(System.String[])

方法说明

通过ID批量获得组织

输入参数

名称

类型

说明

Ids

System.String[]

组织的ID

返回值

组织对象

 

方法名称:GetUnitsByCodes(System.String[])

方法说明

通过Code批量获得组织

输入参数

名称

类型

说明

Codes

System.String[]

组织的Code

返回值

组织对象

 

方法名称:GetUnitFullNameTable(System.String[])

方法说明

通过ID批量获得组织的全名。执行该方法不需要锁定组织结构服务。

输入参数

名称

类型

说明

Ids

System.String[]

组织的ID

返回值

如果参数是Null,那么返回Null;否则按照每个ID获得名称,不获取重复的记录,然后返回一个(ID, 全名称)的表

 

方法名称:GetUnitPathTable(System.String[])

方法说明

通过ID批量获得组织的全名。执行该方法不需要锁定组织结构服务。

输入参数

名称

类型

说明

Ids

System.String[]

组织的ID

返回值

如果参数是Null,那么返回Null;否则按照每个ID获得名称,不获取重复的记录,然后返回一个(ID, 全路径)的表

 

方法名称:GetUnitCopy(System.String)

方法说明

根据ID获得Unit的一个副本,这个副本中的属性跟Unit本身完全一样,只是并不在组织结构的缓存中,外部程序可以对这个副本进行编辑,然后再通过UpdateUnit方法,更新到系统缓存和数据库中。如果不使用副本直接进行编辑的话,那么可能会影响内存中的对象。

输入参数

名称

类型

说明

ID

System.String

组织的ID

返回值

组织对象

 

方法名称:GetCompanyUnits(OThinker.Organization.State)

方法说明

获得公司下的所有单元

输入参数

名称

类型

说明

State

OThinker.Organization.State

组织的状态条件

返回值

公司下面的所有符合状态条件的组织对象

 

方法名称:AddUnit(System.String,OThinker.Organization.Unit)

方法说明

添加一个Unit

输入参数

名称

类型

说明

Modifier

System.String

请求变更的人

Unit

OThinker.Organization.Unit

要添加的对象

返回值

返回ID

 

方法名称:UpdateUnit(System.String,OThinker.Organization.Unit)

方法说明

更新一个Unit

输入参数

名称

类型

说明

Modifier

System.String

请求变更的人

Unit

OThinker.Organization.Unit

具有新属性的Unit

返回值

错误代码

 

方法名称:RemoveUnit(System.String,System.String)

方法说明

删除一个组织

输入参数

名称

类型

说明

Modifier

System.String

请求变更的人

ID

System.String

要删除的组织的ID

返回值

删除的Unit的数量

 

方法名称:Sync(System.String,System.String[],System.String,System.String,System.DateTime,OThinker.Organization.RootMode,OThinker.Organization.ADUserRemovingPolicy,System.Boolean)

方法说明

同步AD

输入参数

名称

类型

说明

Modifier

System.String

修改人员

ADPathes

System.String[]

AD路径

ADUser

System.String

AD登录名

ADPassword

System.String

AD密码

UTCLastSyncTime

System.DateTime

上一次同步时间

RootMode

OThinker.Organization.RootMode

根目录模式。如果要同步的对象是某一个OU,那么允许两种模式:1、将OU作为一个节点同步到公司节点下面;2、将OU下面的子对象直接同步到公司下面。

ADUserRemovingPolicy

OThinker.Organization.ADUserRemovingPolicy

AD用户被删除之后的同步策略

LoginNameIncludeDomain

System.Boolean

用户的登陆名是否包含域名

返回值

 

 

方法名称:CreateUser(System.String,System.String[],System.String,System.String,System.String,System.Boolean,OThinker.Organization.HandleResult@)

方法说明

根据活动目录中的用户信息新建一个用户对象

输入参数

名称

类型

说明

ADPath

System.String

AD路径

ReferenceADPathes

System.String[]

 

ADUser

System.String

AD登录名

ADPassword

System.String

AD密码

UserAlias

System.String

要创建的用户的登录名

LoginNameIncludeDomain

System.Boolean

用户的登陆名是否包含域名

Result

OThinker.Organization.HandleResult@

如果成功则返回SUCCESS,否则返回错误代码

返回值

新建的用户

 

方法名称:QueryADUsers(System.String[],System.String,System.String,System.String)

方法说明

按照登陆名前缀条件来查找AD用户

输入参数

名称

类型

说明

ADPathes

System.String[]

所有需要遍历的LADP

ADUser

System.String

登陆名

ADPassword

System.String

登陆密码

UserAlias

System.String

账号前缀

返回值

(LDAP, 用户不带域前缀的登陆名数组)

 

方法名称:QueryADUsersByDate(System.String[],System.String,System.String,System.DateTime)

方法说明

按照修改日期条件来查找AD用户

输入参数

名称

类型

说明

ADPathes

System.String[]

所有需要遍历的LADP

ADUser

System.String

登陆名

ADPassword

System.String

登陆密码

UTCBenchDate

System.DateTime

基准时间

返回值

(LDAP, 用户不带域前缀的登陆名数组)

 

方法名称:QueryLog(System.DateTime,System.DateTime)

方法说明

用于查找修改日志,取的日志范围是小于To并且大于等于From

输入参数

名称

类型

说明

From

System.DateTime

查询的开始时间

To

System.DateTime

查询的结束时间

返回值

搜索到的日志

 

方法名称:IsAdministrator(System.String)

方法说明

判断该用户是否是管理员

输入参数

名称

类型

说明

ID

System.String

 

返回值

 

 

方法名称:IsAdministratorByIds(System.String[])

方法说明

如果其中任何一个对象是管理员,那么返回true

输入参数

名称

类型

说明

Ids

System.String[]

组织的ID

返回值

如果其中任何一个对象是管理员,那么返回true,否则返回false

 

方法名称:GetManager(System.String)

方法说明

获得用户/组/OU/公司的经理。但是不能获得群的经理

输入参数

名称

类型

说明

ID

System.String

组织的ID

返回值

这个组织的经理

 

方法名称:GetManagers(System.String[])

方法说明

获得用户/组/OU/公司/群的经理,如果是群的话,那么需要自动展开,然后分别获得每个组织的经理

输入参数

名称

类型

说明

Units

System.String[]

用户/组/OU/公司/群的ID数组

返回值

组织的经理

 

方法名称:GetDirectManager(System.String)

方法说明

获得用户的直接经理

输入参数

名称

类型

说明

ID

System.String

组织的ID

返回值

组织的经理经理的ID

 

方法名称:GetRecursiveManagers(System.String)

方法说明

获得用户的递归的经理,从直接经理依次往上递归

输入参数

名称

类型

说明

ID

System.String

组织的ID

返回值

组织的经理的ID数组

 

方法名称:GetManagerByInterval(System.String,System.Int32)

方法说明

获得某个组织的跨级经理。

输入参数

名称

类型

说明

UnitId

System.String

组织ID。如果组织是群,那么获得群的子对象,并针对各个子对象获得相应的跨级经理;如果是非群,那么直接获得跨级经理

Interval

System.Int32

跨级的级别,0表示自己,1表示父对象,依次类推

返回值

返回的经理没有重复值

 

方法名称:GetUnitsManagersByInterval(System.String[],System.Int32)

方法说明

获得某个组织的跨级经理。

输入参数

名称

类型

说明

Units

System.String[]

组织ID。如果组织是群,那么获得群的子对象,并针对各个子对象获得相应的跨级经理;如果是非群,那么直接获得跨级经理

Interval

System.Int32

跨级的级别,0表示自己,1表示父对象,依次类推

返回值

返回的经理没有重复值

 

方法名称:GetManagerByLevel(System.String,System.Int32)

方法说明

获得某个级别的经理

输入参数

名称

类型

说明

UnitId

System.String

组织ID。如果组织是群,那么获得群的子对象,并针对各个子对象获得相应的跨级经理;如果是非群,那么直接获得跨级经理

Level

System.Int32

级别,0表示公司,1表示公司的直接下属OU,依次类推

返回值

如果对象不存在或者不存在那么多的级别父对象,那么返回Null

 

方法名称:GetManagerByEmployeeRank(System.String,System.Int32)

方法说明

获取指定员工级别的经理

输入参数

名称

类型

说明

UnitId

System.String

组织ID。如果组织是群,那么获得群的子对象,并针对各个子对象获得相应的跨级经理;如果是非群,那么直接获得跨级经理

Level

System.Int32

级别,0表示公司,1表示公司的直接下属OU,依次类推

返回值

如果对象不存在或者不存在那么多的级别父对象,那么返回Null

 

方法名称:GetManagersByLevel(System.String[],System.Int32)

方法说明

获得某个组织的跨级经理。

输入参数

名称

类型

说明

Units

System.String[]

组织ID。如果组织是群,那么获得群的子对象,并针对各个子对象获得相应的跨级经理;如果是非群,那么直接获得跨级经理

Level

System.Int32

级别,0表示公司,1表示公司的直接下属OU,依次类推

返回值

返回的经理没有重复值

 

方法名称:GetManagersByEmployeeRank(System.String[],System.Int32)

方法说明

获取指定员工级别的经理

输入参数

名称

类型

说明

Units

System.String[]

组织ID。如果组织是群,那么获得群的子对象,并针对各个子对象获得相应的跨级经理;如果是非群,那么直接获得跨级经理

Level

System.Int32

员工级别

返回值

如果对象不存在或者不存在那么多的级别父对象,那么返回Null

 

方法名称:GetName(System.String)

方法说明

获得单元的实际名称,比如张三,李四之类的。

输入参数

名称

类型

说明

ID

System.String

组织的ID

返回值

如果返回null,那么表示该单元不存在

 

方法名称:GetFullName(System.String)

方法说明

通过单元ID获得某个单元的全名称

输入参数

名称

类型

说明

ID

System.String

组织的ID

返回值

如果单元为用户,则返回User[Alias];否则,则返回路径形式,比如/Company1/Dept1/Dept1_G1

 

方法名称:GetPath(System.String)

方法说明

获得单元的全路径。注意:路径不能唯一确定某个单元

输入参数

名称

类型

说明

ID

System.String

组织的ID

返回值

返回路径形式,比如/Company1/Dept1/Dept1_G1或者/Company1/User1的形式,路径中所有元素均为单元的名称

 

方法名称:GetParent(System.String)

方法说明

获得父节点ID

输入参数

名称

类型

说明

ID

System.String

组织的ID

返回值

父组织的ID

 

方法名称:GetParentUnit(System.String)

方法说明

获得父对象

输入参数

名称

类型

说明

ID

System.String

组织的ID

返回值

父组织

 

方法名称:GetParentByLevel(System.String,System.Int32)

方法说明

通过层次获得父对象的ID

输入参数

名称

类型

说明

ID

System.String

子对象ID

Level

System.Int32

层次

返回值

父对象

 

方法名称:GetParentByInterval(System.String,System.Int32)

方法说明

获取跨级上级对象

输入参数

名称

类型

说明

ID

System.String

子对象ID

Level

System.Int32

跨度层级,0表示自己

返回值

父对象

 

方法名称:GetParentUnitByLevel(System.String,System.Int32)

方法说明

通过层次获得父对象

输入参数

名称

类型

说明

ID

System.String

子对象ID

Level

System.Int32

层次

返回值

父对象

 

方法名称:GetUnitLevel(System.String)

方法说明

获取组织层级

输入参数

名称

类型

说明

ID

System.String

组织ID

返回值

 

 

方法名称:GetParents(System.String,OThinker.Organization.UnitType,System.Boolean,OThinker.Organization.State)

方法说明

获得父/祖先Unit数组

输入参数

名称

类型

说明

ID

System.String

子Unit

ParentUnitType

OThinker.Organization.UnitType

要获得的父/祖先的类型

Recursive

System.Boolean

是否递归

State

OThinker.Organization.State

状态条件,如果要所有状态的组织,可以使用Unspecified

返回值

父/祖先集合

 

方法名称:GetParentUnits(System.String,OThinker.Organization.UnitType,System.Boolean,OThinker.Organization.State)

方法说明

获得父/祖先Unit数组

输入参数

名称

类型

说明

ID

System.String

子Unit

ParentUnitType

OThinker.Organization.UnitType

要获得的父/祖先的类型

Recursive

System.Boolean

是否递归

State

OThinker.Organization.State

状态条件,如果要所有状态的组织,可以使用Unspecified

返回值

父/祖先集合

 

方法名称:GetMembers(System.String[])

方法说明

如果Parents的某个Parent为用户,则返回他自己,如果Receiver为组或组织单元,则返回他下面的递归用户列表。

输入参数

名称

类型

说明

Parents

System.String[]

父组织的ID

返回值

隶属于父组织的成员

 

方法名称:GetMembersByState(System.String[],OThinker.Organization.State)

方法说明

如果Parents的某个Parent为用户,则返回他自己,如果Receiver为组或组织单元,则返回他下面的递归用户列表。

输入参数

名称

类型

说明

Parents

System.String[]

父组织的ID

State

OThinker.Organization.State

状态条件,如果要所有状态的组织,可以使用Unspecified

返回值

隶属于父组织的成员

 

方法名称:GetMemberUsers(System.String[])

方法说明

获得用户成员。;如果Unit为Company、OrganizationUnit,则递归获得他们下面的所有User成员;如果Unit为Group,则获得该Group下的所有User成员;如果Unit为User,则直接返回string[]{ User }

输入参数

名称

类型

说明

Units

System.String[]

父组织的ID

返回值

父组织中的所有用户子成员

 

方法名称:GetChildren(System.String,OThinker.Organization.UnitType,System.Boolean,OThinker.Organization.State)

方法说明

获得子Unit

输入参数

名称

类型

说明

ID

System.String

祖先的ID

ChildUnitType

OThinker.Organization.UnitType

作为一个过滤条件,只返回这种类型的Unit

Recursive

System.Boolean

是否递归

State

OThinker.Organization.State

状态条件,如果要所有状态的组织,可以使用Unspecified

返回值

如果祖先是Company或者OrganizationUnit类型,那么递归/不递归返回下面的所有ChildUnitType类型的Unit;如果是Group,则不递归只返回他的下属成员;如果是User,则不递归返回Manager指向该User的Unit

 

方法名称:GetChildUnits(System.String,OThinker.Organization.UnitType,System.Boolean,OThinker.Organization.State)

方法说明

获得子Unit

输入参数

名称

类型

说明

ID

System.String

祖先的ID

ChildUnitType

OThinker.Organization.UnitType

作为一个过滤条件,只返回这种类型的Unit

Recursive

System.Boolean

是否递归

返回值

如果祖先是Company或者OrganizationUnit类型,那么递归/不递归返回下面的所有ChildUnitType类型的Unit;如果是Group,则不递归只返回他的下属成员;如果是User,则不递归返回Manager指向该User的Unit

 

方法名称:GetChildUnitsByIds(System.String[],OThinker.Organization.UnitType,System.Boolean,OThinker.Organization.State)

方法说明

获得子Unit

输入参数

名称

类型

说明

IDs

System.String[]

祖先的ID

ChildUnitType

OThinker.Organization.UnitType

作为一个过滤条件,只返回这种类型的Unit

Recursive

System.Boolean

是否递归

State

OThinker.Organization.State

状态条件,如果要所有状态的组织,可以使用Unspecified

返回值

如果祖先是Company或者OrganizationUnit类型,那么递归/不递归返回下面的所有ChildUnitType类型的Unit;如果是Group,则不递归只返回他的下属成员;如果是User,则不递归返回Manager指向该User的Unit

 

方法名称:GetChildrenByLevel(System.String,OThinker.Organization.UnitType,System.Int32,OThinker.Organization.State)

方法说明

根据层级获得子对象

输入参数

名称

类型

说明

ID

System.String

父对象

ChildUnitType

OThinker.Organization.UnitType

子对象类型

Level

System.Int32

层级

State

OThinker.Organization.State

状态条件,如果要所有状态的组织,可以使用Unspecified

返回值

该层级的子组织

 

方法名称:GetChildUnitsByLevel(System.String,OThinker.Organization.UnitType,System.Int32,OThinker.Organization.State)

方法说明

根据层级获得子对象

输入参数

名称

类型

说明

ID

System.String

父对象

ChildUnitType

OThinker.Organization.UnitType

子对象类型

Level

System.Int32

层级

State

OThinker.Organization.State

状态条件,如果要所有状态的组织,可以使用Unspecified

返回值

该层级的子组织

 

方法名称:IsAncestor(System.String,System.String)

方法说明

判断某一个单元是否是另外一个单元的祖先

输入参数

名称

类型

说明

ChildID

System.String

子孙ID

AncestorID

System.String

祖先ID

返回值

如果是祖先关系则返回true,否则返回false

 

方法名称:GetUserManagedUnits(System.String,OThinker.Organization.UnitType)

方法说明

用户的直接下属

输入参数

名称

类型

说明

UserID

System.String

用户

UnitType

OThinker.Organization.UnitType

单元的类型

返回值

该用户管理的对象

 

方法名称:GetUserEmail(System.String)

方法说明

获得用户的电子邮件地址

输入参数

名称

类型

说明

UserID

System.String

用户ID

返回值

用户的邮件地址

 

方法名称:GetUserAddress(System.String)

方法说明

获得用户的地址

输入参数

名称

类型

说明

UserID

System.String

用户ID

返回值

用户的地址

 

方法名称:GetUserTitle(System.String)

方法说明

获得用户头衔

输入参数

名称

类型

说明

UserID

System.String

 

返回值

 

 

方法名称:GetUserMobile(System.String)

方法说明

获得用户的移动电话

输入参数

名称

类型

说明

UserID

System.String

用户ID

返回值

用户的移动电话

 

方法名称:GetUserOfficePhone(System.String)

方法说明

获得用户的办公电话

输入参数

名称

类型

说明

UserID

System.String

用户ID

返回值

用户的办公电话

 

方法名称:GetUserIpPhone(System.String)

方法说明

获得用户的IP电话

输入参数

名称

类型

说明

UserID

System.String

用户ID

返回值

用户的IP电话

 

方法名称:GetParentGroups(System.String,OThinker.Organization.VisibleType,OThinker.Organization.State)

方法说明

获得用户所属于的组

输入参数

名称

类型

说明

ID

System.String

组成员的ID

Type

OThinker.Organization.VisibleType

可见类型

State

OThinker.Organization.State

状态过滤条件

返回值

用户隶属于的组

 

方法名称:Sort(System.String[])

方法说明

通过排序键升序排序

输入参数

名称

类型

说明

Units

System.String[]

组织的ID

返回值

排序号的组织的ID,按照排序码升序排列

 

方法名称:GetUserDept(System.String)

方法说明

获得用户所属于的部门

输入参数

名称

类型

说明

UserID

System.String

用户ID

返回值

用户所属于的部门

 

方法名称:QueryUser(System.String,OThinker.Organization.State)

方法说明

查找用户

输入参数

名称

类型

说明

Keyword

System.String

要查询的关键字

State

OThinker.Organization.State

状态条件,如果要所有状态的组织,可以使用Unspecified

返回值

查询出的用户表

 

方法名称:QueryByName(System.String,OThinker.Organization.UnitType,OThinker.Organization.State)

方法说明

获得所有以某个字符串为开头的组织,其中对于用户会匹配用户名和登录名两个字段,其他类型的组织只匹配名称

输入参数

名称

类型

说明

StartWith

System.String

打头的字符串,禁止为Null,不区分大小写

UnitType

OThinker.Organization.UnitType

要求返回的类型

State

OThinker.Organization.State

状态条件,如果要所有状态的组织,可以使用Unspecified

返回值

返回的对象

 

方法名称:AddSignature(OThinker.Organization.Signature)

方法说明

添加签章

输入参数

名称

类型

说明

Signature

OThinker.Organization.Signature

签章

返回值

如果添加成功,则返回true,否则返回false

 

方法名称:RemoveSignature(System.String)

方法说明

删除签章

输入参数

名称

类型

说明

SignatureId

System.String

签章的ID

返回值

 

方法名称:SetSignatureState(System.String,OThinker.Organization.State)

方法说明

设置签章的状态

输入参数

名称

类型

说明

SignatureId

System.String

签章ID

State

OThinker.Organization.State

状态

返回值

 

方法名称:GetSignature(System.String)

方法说明

获得签章

输入参数

名称

类型

说明

SignatureId

System.String

签章的ID

返回值

签章信息

 

方法名称:GetSignatures(System.String[])

方法说明

获得签章

输入参数

名称

类型

说明

SignatureIds

System.String[]

签章的ID

返回值

签章

 

方法名称:GetSignaturesByUnit(System.String)

方法说明

获得用户的所有签章

输入参数

名称

类型

说明

UnitId

System.String

组织的ID

返回值

签章

 

方法名称:GetSignatureByName(System.String,System.String)

方法说明

通过名字获得签章

输入参数

名称

类型

说明

UnitId

System.String

组织的ID

Name

System.String

签章名称

返回值

签章

 

方法名称:GetSignatureNames(System.String)

方法说明

获得用户所有签章的名称

输入参数

名称

类型

说明

UnitId

System.String

组织的ID

返回值

签章

 

方法名称:GetDefaultSignature(System.String)

方法说明

获得默认的签章

输入参数

名称

类型

说明

UnitId

System.String

组织的ID

返回值

默认签章的ID

 

方法名称:SetDefaultSignature(System.String,System.Boolean)

方法说明

设置为默认的签章

输入参数

名称

类型

说明

SignatureId

System.String

签章的ID

Default

System.Boolean

是否是默认的

返回值

 

方法名称:AddCategory(OThinker.Organization.Category)

方法说明

添加类型定义

输入参数

名称

类型

说明

Category

OThinker.Organization.Category

类型定义

返回值

如果添加成功,则返回true,否则返回false

 

方法名称:RemoveCategory(System.String)

方法说明

删除类型

输入参数

名称

类型

说明

CategoryId

System.String

类型定义的ID

返回值

 

方法名称:GetCategory(System.String)

方法说明

根据类型定义的ID获得类型

输入参数

名称

类型

说明

CategoryId

System.String

类型的ID

返回值

类型定义

 

方法名称:GetCategoryNames

方法说明

获得用户所有类型的名称

输入参数

名称

类型

说明

返回值

类型的名称

 

方法名称:GetCategoryCodes

方法说明

获得用户所有类型的编码

输入参数

名称

类型

说明

返回值

所有类型的编码

 

方法名称:GetCategoryByCode(System.String)

方法说明

通过编码获得分类

输入参数

名称

类型

说明

Code

System.String

类型的编码

返回值

类型定义

 

方法名称:GetByUnitType(OThinker.Organization.UnitType)

方法说明

通过类型获得可选择的分类

输入参数

名称

类型

说明

Type

OThinker.Organization.UnitType

组织的类型

返回值

支持这种组织类型的类型定义

 

方法名称:SaveCategory(OThinker.Organization.Category)

方法说明

保存类型

输入参数

名称

类型

说明

Category

OThinker.Organization.Category

类型定义

返回值

如果保存成功,则返回true,否则返回false

 

方法名称:UpdateCategory(OThinker.Organization.Category)

方法说明

保存类型

输入参数

名称

类型

说明

Category

OThinker.Organization.Category

类型定义

返回值

如果保存成功,则返回true,否则返回false

 

方法名称:GetCategoryByUnitId(System.String)

方法说明

通过单元ID获得分类

输入参数

名称

类型

说明

UnitId

System.String

组织的ID

返回值

类型定义

 

方法名称:GetCategoryIdsByCodes(System.String[])

方法说明

通过分类的编码获得分类的ID

输入参数

名称

类型

说明

Codes

System.String[]

类型编码

返回值

类型的ID

 

方法名称:GetUnitCategoryCode(System.String)

方法说明

获得单元的类型编码

输入参数

名称

类型

说明

UnitId

System.String

组织的ID

返回值

类型编码

 

方法名称:GetUnitCategoryName(System.String)

方法说明

获得单元的类型名称

输入参数

名称

类型

说明

UnitId

System.String

组织的ID

返回值

类型名称

 

方法名称:FilterByCategoryCodes(System.String[],System.String[])

方法说明

通过分类的编码过滤组织

输入参数

名称

类型

说明

Units

System.String[]

组织

Codes

System.String[]

类型编码

返回值

过滤的组织的ID

 

方法名称:FindRole(System.String,System.String,System.Boolean)

方法说明

通过名称查找某个组织对应的角色。应用场景比如查找张三对应的报销审批专员。先在该组织的直接子成员上查找,如果找到则返回第一个;否则检查是否遍历父节点,如果需要遍历父节点,则遍历父节点;否则返回Null。

输入参数

名称

类型

说明

StartUnit

System.String

起始组织。必须是用户/组/OU

UnitName

System.String

名称

LookForAnsestor

System.Boolean

如果没有找到,是否是向父节点遍历

返回值

返回找到的第一个组织的ID

 

方法名称:FindRoles(System.String,System.String)

方法说明

通过名称查找某个组织对应的角色。应用场景比如查找张三对应的报销审批专员。先在该组织的直接子成员上查找,如果找到则返回第一个;否则检查是否遍历父节点,如果需要遍历父节点,则遍历父节点;否则返回Null。

输入参数

名称

类型

说明

StartUnit

System.String

起始组织。必须是用户/组/OU/群

UnitName

System.String

名称

返回值

返回找到的第一个组织的ID

 

方法名称:FindRolesByUnits(System.String[],System.String)

方法说明

查找组织对应的角色。比如要查找“研发部门”对应的“审计”人员

输入参数

名称

类型

说明

StartUnits

System.String[]

要查找的组织的ID。如果是群,那么会自动展开下面的子对象

RoleName

System.String

名称

返回值

每个组织会返回第一个找到的对象

 

方法名称:FindRoleUnits(System.String[],System.String)

方法说明

查找组织对应的角色。比如要查找“研发部门”对应的“审计”人员

输入参数

名称

类型

说明

StartUnits

System.String[]

要查找的组织的ID。如果是群,那么会自动展开下面的子对象

RoleName

System.String

角色的名称

返回值

找到的组织

 

方法名称:GetReferences(System.String)

方法说明

获得某个对象的引用。注意:该方法是逐一遍历所有组织对象,会非常占用服务器CPU,但是不会锁定组织结构服务对象

输入参数

名称

类型

说明

UnitId

System.String

被引用的对象的ID

返回值

如果参数为Null或者"",那么返回False;如果参数为this.UnitId,那么返回true;否则检查其他属性是否等于该值。

 

方法名称:GetWorkflowCode(System.String)

方法说明

获得某个组织对应的流程编码

输入参数

名称

类型

说明

UnitId

System.String

组织的ID

返回值

流程实例的流水号的编码

 

方法名称:GetUnitByCode(System.String)

方法说明

通过编码来查找组织对象

输入参数

名称

类型

说明

Code

System.String

编码

返回值

编号相匹配的组织对象

 

方法名称:GetUserByEmployeeNumber(System.String)

方法说明

通过员工编号来查找组织对象

输入参数

名称

类型

说明

EmployeeNumber

System.String

员工编号

返回值

员工编号相匹配的用户对象

 

方法名称:AddOrgJob(System.String,OThinker.Organization.OrgJob)

方法说明

添加一个职务

输入参数

名称

类型

说明

Modifier

System.String

请求变更的用户

Job

OThinker.Organization.OrgJob

要添加的职务

返回值

 

方法名称:RemoveOrgJob(System.String,System.String)

方法说明

删除一个职务

输入参数

名称

类型

说明

Modifier

System.String

请求变更的用户

OrgJobId

System.String

职务ID

返回值

 

方法名称:GetOrgJobById(System.String)

方法说明

根据职务ID获得职务

输入参数

名称

类型

说明

OrgJobId

System.String

职务Id

返回值

职务

 

方法名称:GetOrgJobByCode(System.String)

方法说明

根据职务编码获得职务

输入参数

名称

类型

说明

OrgJobCode

System.String

职务编码

返回值

职务

 

方法名称:GetOrgJobs

方法说明

获得所有的职务

输入参数

名称

类型

说明

返回值

所有的职务

 

方法名称:UpdateOrgJob(System.String,OThinker.Organization.OrgJob)

方法说明

更新一个职务

输入参数

名称

类型

说明

Modifier

System.String

更新用户

Job

OThinker.Organization.OrgJob

职务

返回值

如果出现重复的编码或者空的编码,则返回false;否则返回true

 

方法名称:FindPost(System.String,System.String,System.Boolean)

方法说明

找到某个组织机构下面最直接的

输入参数

名称

类型

说明

OrgId

System.String

组织的ID,这个不能使群

OrgJobCode

System.String

职务

Recursive

System.Boolean

是否递归查找

返回值

岗位

 

方法名称:FindPosts(System.String[],System.String)

方法说明

找到某个组织机构下面最直接的岗位

输入参数

名称

类型

说明

OrgIds

System.String[]

组织的ID

OrgJobCode

System.String

职务

返回值

岗位

 

方法名称:FindPostMembers(System.String[],System.String)

方法说明

找到某个组织机构下面最直接的岗位的成员

输入参数

名称

类型

说明

OrgIds

System.String[]

组织的ID

OrgJobCode

System.String

职务编码

返回值

岗位人员

 

方法名称:FindPostMembersByCode(System.String[],System.String)

方法说明

找到某个组织机构下面最的岗位成员(包含编制中的用户)

输入参数

名称

类型

说明

OrgIds

System.String[]

组织的ID

PostCode

System.String

岗位编码

返回值

岗位人员

 

方法名称:GetPostsByOrgJobCode(System.String)

方法说明

根据职位的编码获得所有的岗位

输入参数

名称

类型

说明

OrgJobCode

System.String

职位编码

返回值

某个职位的所有岗位

 

方法名称:FindSuperiorPost(System.String,System.Boolean)

方法说明

获得岗位的上级岗位,当上级岗位不存在的时候,自动向上遍历更高的上级岗位

输入参数

名称

类型

说明

PostId

System.String

岗位ID

RequiredMembers

System.Boolean

是否要求返回的岗位必须包含至少一名成员

返回值

上级岗位

 

方法名称:FindSuperiorPostMembers(System.String)

方法说明

获得岗位的上级岗位

输入参数

名称

类型

说明

PostId

System.String

岗位ID

返回值

上级岗位的成员,如果直接上级岗位不存在成员,则自动向上遍历

 

方法名称:FindRecursiveParentPost(System.String,System.Int32)

方法说明

查找上级岗位到满足某个指定的级别,返回该岗位中的用户

输入参数

名称

类型

说明

PostId

System.String

查找的起始岗位ID

Rank

System.Int32

岗位级别

返回值

 

 

方法名称:GetPostStaffByPost(System.String)

方法说明

根据岗位编码获取所有的编制信息

输入参数

名称

类型

说明

PostId

System.String

 

返回值

 

 

方法名称:GetParentPostByLevel(System.String,System.Int32)

方法说明

获取指定岗位级别的上级岗位

输入参数

名称

类型

说明

PostId

System.String

起始岗位ID

Level

System.Int32

岗位级别

返回值

 

 

方法名称:GetParentPost(System.String)

方法说明

获取指定岗位的上级岗位用户

输入参数

名称

类型

说明

PostId

System.String

岗位ID

返回值

 

 

方法名称:GetCalendarId(System.String)

方法说明

获得某个组织机构的工作日历

输入参数

名称

类型

说明

UnitId

System.String

组织结构对象ID

返回值

该组织结构对象对应的工作日历,如果该组织结构对象引用的工作日历为空,则自动向上遍历

 

方法名称:GetCalendarReferences(System.String)

方法说明

获得哪些组织结构对象引用了该工作日历

输入参数

名称

类型

说明

CalendarId

System.String

工作日历的对象ID,不区分大小写

返回值

引用该工作日历的组织结构对象

 

方法名称:FindManagersByLevelRange(System.String,System.Int32)

方法说明

查找上级经理到满足某个指定的级别 例如职级是从小到大,当A职级是3时,找到职级是6的经理,那么会返回用户上级经理中职级是4、5、6的人员,当6级经理不存在,则返回职级是7的经理 职级是从大到小时,那么A的职级是3,找到职级是1的经理时,返回上级经理中职级是2和1的经理,如果1没有找到,那么返回职级是0的经理

输入参数

名称

类型

说明

UserId

System.String

查找的组织范围起点

EndLevel

System.Int32

用户职级

返回值

 

 

方法名称:InitOrganizationDim

方法说明

/初始化平铺

输入参数

名称

类型

说明

返回值

 

方法名称:it.Update(OThinker.Organization.IOrganization,System.DirectoryServices.DirectoryEntry,System.DirectoryServices.DirectoryEntry[],System.DirectoryServices.DirectoryEntry,System.Boolean)

方法说明

更新属性

输入参数

名称

类型

说明

Organization

OThinker.Organization.IOrganization

组织结构对象

Root

System.DirectoryServices.DirectoryEntry

AD中的根目录

Entry

System.DirectoryServices.DirectoryEntry[]

AD中的对象

LoginNameIncludeDomain

System.DirectoryServices.DirectoryEntry

登陆名中是否包含域名称

返回值

 

方法名称:it.Validate(OThinker.Organization.IOrganization)

方法说明

验证是否合法

输入参数

名称

类型

说明

Organization

OThinker.Organization.IOrganization

组织结构接口,用来获得人员、OU、组等信息

返回值

如果合法则返回SUCCESS,否则返回错误代码

 

方法名称:hinker.Organization.IOrganization,System.DirectoryServices.DirectoryEntry,System.DirectoryServices.DirectoryEntry[],System.DirectoryServices.DirectoryEntry,System.Boolean)

方法说明

跟活动目录同步的时候,调用更新属性方法,以活动目录中用户的属性为准

输入参数

名称

类型

说明

Organization

hinker.Organization.IOrganization

组织结构对象

Root

System.DirectoryServices.DirectoryEntry

AD中的根目录

Entry

System.DirectoryServices.DirectoryEntry[]

AD中的对象

LoginNameIncludeDomain

System.DirectoryServices.DirectoryEntry

登陆名中是否包含域名称,如果包含的话,那么登录名的格式是domain1\user2这样的形式

返回值

 

方法名称:OThinker.Organization.IOrganization)

方法说明

验证是否合法

输入参数

名称

类型

说明

Organization

OThinker.Organization.IOrganization

组织结构接口,用来获得人员、OU、组等信息

返回值

如果合法则返回SUCCESS,否则返回错误代码

 

类:OThinker.H3.Acl.IBizRuleAclManager

说明:规则定义权限控制器

访问入口:Engine.BizRuleAclManager

示例:

Engine.BizRuleAclManager.Add(new Acl.BizRuleAcl());

 

方法名称:Check(System.String[],System.String,System.String,OThinker.H3.Acl.AclType)

方法说明

查询指定的用户/组/组织单元中是否存在用户/组/组织单元具有某个规则的某种权限

输入参数

名称

类型

说明

Users

System.String[]

用户/组/组织单元ID数组

BizRuleCode

System.String

业务规则编码

DecisionMatrixCode

System.String

决策表编码

AclType

OThinker.H3.Acl.AclType

权限类型

返回值

如果存在某个用户/组/组织单元具有该权限,则返回true;否则返回false

 

方法名称:QueryDataTable(System.String[],System.String,System.String)

方法说明

获得当前规则定义的权限控制表

输入参数

名称

类型

说明

Users

System.String[]

用户/组/组织单元ID数组,如果为空,则不将该参数作为搜索条件

BizRuleCode

System.String

业务规则编码

DecisionMatrixCode

System.String

决策表编码

返回值

查询到的表

 

方法名称:Add(OThinker.H3.Acl.BizRuleAcl)

方法说明

添加一个权限控制单元

输入参数

名称

类型

说明

Acl

OThinker.H3.Acl.BizRuleAcl

权限控制单元

返回值

如果添加成功,则返回true,否则返回false

 

方法名称:GetBizRuleAcl(System.String)

方法说明

获得规则的权限控制单元

输入参数

名称

类型

说明

AclID

System.String

权限ID

返回值

流程模板权限

 

方法名称:GetUserAcls(System.String[])

方法说明

获得用户拥有的所有权限

输入参数

名称

类型

说明

Users

System.String[]

用户范围,实际上,这里也可以是组织单元ID或者其他组织类型的ID

返回值

拥有权限的功能权限

 

方法名称:Update(OThinker.H3.Acl.BizRuleAcl[])

方法说明

更新

输入参数

名称

类型

说明

Acls

OThinker.H3.Acl.BizRuleAcl[]

要更新的权限对象

返回值

 

方法名称:Delete(System.String)

方法说明

删除

输入参数

名称

类型

说明

AclID

System.String

权限控制单元的ID

返回值

类:OThinker.H3.Acl.IFunctionAclManager

说明:功能权限管理

访问入口:Engine.FunctionAclManager

示例:

Engine.FunctionAclManager.Add(new Acl.FunctionAcl());

 

方法名称:Add(OThinker.H3.Acl.FunctionAcl)

方法说明

添加权限,并不检查功能编码是否存在,即允许添加没有定义过的功能的权限

输入参数

名称

类型

说明

Acl

OThinker.H3.Acl.FunctionAcl

权限对象

返回值

返回添加权限是否成功

 

方法名称:Delete(System.String)

方法说明

删除权限

输入参数

名称

类型

说明

AclID

System.String

权限对象ID

返回值

 

方法名称:GetAcl(System.String)

方法说明

获得权限

输入参数

名称

类型

说明

AclID

System.String

权限对象ID

返回值

返回权限对象

 

方法名称:GetAclTable(System.String)

方法说明

获得用户的权限表

输入参数

名称

类型

说明

UnitId

System.String

组织对象ID

返回值

返回指定组织对象的权限集合

 

方法名称:GetFunctionNodes

方法说明

获得所有权限的定义

输入参数

名称

类型

说明

返回值

 

 

方法名称:GetFunctionNode(System.String)

方法说明

根据菜单节点ID获取功能节点对象

输入参数

名称

类型

说明

NodeId

System.String

菜单节点ID

返回值

返回菜单节点对象

 

方法名称:GetFunctionNodeByCode(System.String)

方法说明

根据Code获取功能节点

输入参数

名称

类型

说明

Code

System.String

菜单节点编码

返回值

返回菜单节点对象

 

方法名称:GetFunctionNodesByParentCode(System.String)

方法说明

根据父节点编码获取子节点集合

输入参数

名称

类型

说明

ParentCode

System.String

父节点编码

返回值

返回子菜单节点集合

 

方法名称:GetFunctionRoot

方法说明

获取所有的根节点

输入参数

名称

类型

说明

返回值

返回所有的根节点

 

方法名称:GetUserAcls(System.String[])

方法说明

获得用户拥有的所有权限

输入参数

名称

类型

说明

Users

System.String[]

用户ID集合

返回值

返回用户权限的集合

 

方法名称:RemoveFunctionNodeByCode(System.String,System.Boolean)

方法说明

删除树节点

输入参数

名称

类型

说明

NodeCode

System.String

节点编码

RemoveChildren

System.Boolean

是否移除子节点

返回值

返回节点移除是否成功

 

方法名称:RemoveFunctionNode(System.String,System.Boolean)

方法说明

删除树节点

输入参数

名称

类型

说明

NodeId

System.String

节点ID

RemoveChildren

System.Boolean

是否移除子节点

返回值

返回节点移除是否成功

 

方法名称:AddFunctionNode(OThinker.H3.Acl.FunctionNode)

方法说明

添加功能节点

输入参数

名称

类型

说明

FunctionNode

OThinker.H3.Acl.FunctionNode

功能节点对象

返回值

返回添加是否成功

 

方法名称:UpdateFunctionNode(OThinker.H3.Acl.FunctionNode)

方法说明

更新功能节点

输入参数

名称

类型

说明

FunctionNode

OThinker.H3.Acl.FunctionNode

功能节点对象

返回值

返回添加是否成功

 

方法名称:Update(OThinker.H3.Acl.FunctionAcl)

方法说明

更新权限

输入参数

名称

类型

说明

Acl

OThinker.H3.Acl.FunctionAcl

菜单权限对象

返回值

 

方法名称:GetFunctionNodesByNodeType(OThinker.H3.Acl.FunctionNodeType)

方法说明

根据类型获取所有的节点

输入参数

名称

类型

说明

NodeType

OThinker.H3.Acl.FunctionNodeType

节点类型

返回值

返回指定节点类型的集合

 

方法名称:GetFunctionAclByCode(System.String)

方法说明

获取流程目录的权限列表

输入参数

名称

类型

说明

FunctionCode

System.String

节点编码

返回值

返回指定节点的权限集合

 

方法名称:LockNodeByUserId(System.String,System.String)

方法说明

锁定节点操作

输入参数

名称

类型

说明

FunctionCode

System.String

节点编码

UserId

System.String

用户ID

返回值

返回锁定节点操作是否成功

 

方法名称:UnlockNodeByUserId(System.String,System.String)

方法说明

解除锁定节点操作

输入参数

名称

类型

说明

FunctionCode

System.String

节点编码

UserId

System.String

用户ID

返回值

返回解除锁定节点操作是否成功

类:OThinker.H3.Acl.ISystemOrgAclManager

说明:系统权限接口

访问入口:this.Engine.SystemOrgAclManager

示例:

this.Engine.SystemOrgAclManager.Add(new Acl.SystemOrgAcl());

 

 

方法名称:OThinker.H3.Acl.FunctionAcl

方法说明

构造函数

输入参数

名称

类型

说明

返回值

 

方法名称:OThinker.H3.Acl.FunctionAcl(System.String,System.String,System.Boolean,System.String)

方法说明

构造函数

输入参数

名称

类型

说明

UserID

System.String

用户ID,实际上,这个也可以使一个OU ID或者其他组织结构的ID

FunctionCode

System.String

功能代码

Run

System.Boolean

是否可以运行

CreatedBy

System.String

创建人

返回值

 

方法名称:OThinker.H3.Acl.SystemOrgAcl

方法说明

构造函数

输入参数

名称

类型

说明

返回值

 

方法名称:OThinker.H3.Acl.SystemOrgAcl(System.String,System.String,System.Boolean,System.Boolean,System.Boolean)

方法说明

构造函数

输入参数

名称

类型

说明

UserId

System.String

被授权的用户ID

OrgScope

System.String

管理的组织结构范围

EditOrg

System.Boolean

编辑组织结构权限

View

System.Boolean

查看权限

Admin

System.Boolean

管理权限

返回值

 

方法名称:Check(System.String[],System.String[],OThinker.H3.Acl.AclType)

方法说明

检查用户是否具有某种权限

输入参数

名称

类型

说明

Users

System.String[]

用户ID数组

AclType

System.String[]

权限类型

返回值

如果具备该权限,则返回true,否则返回false

示例:
Check(new string[]{"114b59cc-b2ce-11dc-8314-0800200c9a66"}, AclType.Admin)

 

方法名称:GetUserAcls(System.String[])

方法说明

获得用户拥有的所有权限

输入参数

名称

类型

说明

Users

System.String[]

用户/OU/Group/Segment ID数组

返回值

这些组织拥有的系统-组织权限

 

方法名称:GetAllAcls

方法说明

获取所有权限

输入参数

名称

类型

说明

返回值

 

 

方法名称:Add(OThinker.H3.Acl.SystemOrgAcl)

方法说明

添加权限

输入参数

名称

类型

说明

Acl

OThinker.H3.Acl.SystemOrgAcl

系统权限控制单元

返回值

如果添加成功则返回true,否则返回false

 

方法名称:GetAcl(System.String)

方法说明

获得权限信息

输入参数

名称

类型

说明

AclID

System.String

系统权限控制单元ID

返回值

系统-组织权限对象

 

方法名称:Update(OThinker.H3.Acl.SystemOrgAcl[])

方法说明

更新权限信息

输入参数

名称

类型

说明

Acls

OThinker.H3.Acl.SystemOrgAcl[]

要更新的系统权限控制单元数组

返回值

 

方法名称:Delete(System.String)

方法说明

删除权限

输入参数

名称

类型

说明

AclID

System.String

要删除的系统权限控制单元ID

返回值

类:OThinker.H3.Acl.ISystemAclManager

说明:系统权限接口

访问入口:this.Engine.SystemAclManager

示例:

this.Engine.SystemAclManager.Add(new Acl.SystemAcl());

 

方法名称:Check(System.String[],OThinker.H3.Acl.AclType)

方法说明

检查用户是否具有某种权限

输入参数

名称

类型

说明

Users

System.String[]

用户ID数组

AclType

OThinker.H3.Acl.AclType

权限类型

返回值

如果具备权限,则返回true,否则返回false

示例:
Check(new string[]{"114b59cc-b2ce-11dc-8314-0800200c9a66"}, AclType.Admin)

 

方法名称:Add(OThinker.H3.Acl.SystemAcl)

方法说明

添加权限

输入参数

名称

类型

说明

Acl

OThinker.H3.Acl.SystemAcl

系统权限控制单元

返回值

如果添加成功,则返回true,否则返回false

 

方法名称:GetSystemAcl(System.String)

方法说明

获得权限信息

输入参数

名称

类型

说明

AclID

System.String

系统权限控制单元ID

返回值

系统权限

 

方法名称:GetAllAcls

方法说明

获得所有的权限信息

输入参数

名称

类型

说明

返回值

权限信息

 

方法名称:Update(OThinker.H3.Acl.SystemAcl[])

方法说明

更新权限信息

输入参数

名称

类型

说明

Acls

OThinker.H3.Acl.SystemAcl[]

要更新的系统权限控制单元数组

返回值

 

方法名称:Delete(System.String)

方法说明

删除权限

输入参数

名称

类型

说明

AclID

System.String

要删除的系统权限控制单元ID

返回值

类:OThinker.H3.Acl.IWorkflowAclManager

说明:工作流模板权限控制器

访问入口:this.Engine.WorkflowAclManager

示例:

this.Engine.WorkflowAclManager.Add(new Acl.WorkflowAcl());

 

方法名称:OThinker.H3.Acl.WorkflowAcl

方法说明

构造函数

输入参数

名称

类型

说明

返回值

 

方法名称:OThinker.H3.Acl.SystemAcl

方法说明

构造函数

输入参数

名称

类型

说明

返回值

 

方法名称:OThinker.H3.Acl.BizObjectAcl

方法说明

构造函数

输入参数

名称

类型

说明

返回值

 

方法名称:GetAclCount(System.String)

方法说明

用于获得已定义的权限的数量

输入参数

名称

类型

说明

WorkflowCode

System.String

流程模板编码

返回值

权限控制单元的数量

 

方法名称:Check(System.String[],System.String,OThinker.H3.Acl.AclType)

方法说明

查询指定的用户/组/组织单元中是否存在用户/组/组织单元具有某个流程模板的某种权限

输入参数

名称

类型

说明

Users

System.String[]

用户/组/组织单元ID数组

WorkflowCode

System.String

流程模板编码

AclType

OThinker.H3.Acl.AclType

权限类型

返回值

如果存在某个用户/组/组织单元具有该权限,则返回true;否则返回false

 

方法名称:QueryDataTable(System.String[],System.String)

方法说明

获得当前工作流模板的权限控制表

输入参数

名称

类型

说明

Users

System.String[]

用户/组/组织单元ID数组,如果为空,则不将该参数作为搜索条件

WorkflowCode

System.String

流程模板编码,如果为空,则不将该参数作为搜索条件

返回值

查询到的表

 

方法名称:GetWorkflowAcls(System.String)

方法说明

获得一个流程模板的全部权限配置

输入参数

名称

类型

说明

WorkflowCode

System.String

流程模板编码,如果为空,则不将该参数作为搜索条件

返回值

全部的权限配置

 

方法名称:Add(OThinker.H3.Acl.WorkflowAcl)

方法说明

添加一个权限控制单元

输入参数

名称

类型

说明

Acl

OThinker.H3.Acl.WorkflowAcl

权限控制单元

返回值

如果添加成功,则返回true,否则返回false

 

方法名称:GetWorkflowAcl(System.String)

方法说明

获得工作流模板的权限控制单元

输入参数

名称

类型

说明

AclID

System.String

权限ID

返回值

流程模板权限

 

方法名称:Update(OThinker.H3.Acl.WorkflowAcl[])

方法说明

更新

输入参数

名称

类型

说明

Acls

OThinker.H3.Acl.WorkflowAcl[]

要更新的权限对象

返回值

 

方法名称:Delete(System.String)

方法说明

删除

输入参数

名称

类型

说明

AclID

System.String

权限控制单元的ID

返回值

 

方法名称:RemoveByWorkflow(System.String)

方法说明

删除流程模板

输入参数

名称

类型

说明

WorkflowCode

System.String

流程模板编码

返回值

 

方法名称:GetUserAcls(System.String[])

方法说明

获得用户拥有的所有权限

输入参数

名称

类型

说明

Users

System.String[]

 

返回值

 

类:OThinker.H3.Apps.IAppNavigationManager

说明:应用程序管理

访问入口:this.Engine.AppNavigationManager

示例:

this.Engine.AppNavigationManager.AddApp(new Apps.AppNavigation());

 

方法名称:

OThinker.H3.BizBus.Transaction.DbExecutionContext(System.String,OThinker.Data.Database.ICommand)

方法说明

新建的时候构造函数

输入参数

名称

类型

说明

DbCode

System.String

数据库编号

DbCommand

OThinker.Data.Database.ICommand

数据库命令

返回值

 

方法名称:OThinker.H3.BizBus.Transaction.TransactionContext(System.String)

方法说明

事务构造函数

输入参数

名称

类型

说明

Creator

System.String

 

返回值

 

方法名称:OThinker.H3.BizBus.Transaction.TransactionExecution(System.String,System.String,System.String,OThinker.H3.BizBus.BizService.BizStructure,OThinker.H3.BizBus.BizService.BizStructure)

方法说明

新建事务

输入参数

名称

类型

说明

UserId

System.String

用户的ID

BizServiceCode

System.String

业务服务的编码

MethodName

System.String

调用的方法

Params

OThinker.H3.BizBus.BizService.BizStructure

调用的参数

ReturnObject

OThinker.H3.BizBus.BizService.BizStructure

调用的返回值

返回值

 

方法名称:GetApp(System.String)

方法说明

获得应用程序定义

输入参数

名称

类型

说明

AppCode

System.String

应用程序编码

返回值

应用程序定义

 

方法名称:GetAllApps

方法说明

获得所有应用程序定义

输入参数

名称

类型

说明

返回值

返回应用程序对象集合

 

方法名称:AddApp(OThinker.H3.Apps.AppNavigation)

方法说明

添加应用程序: 添加应用时需要同时初始化FunctionNode,请改用AppPackageManager.AddApp

输入参数

名称

类型

说明

App

OThinker.H3.Apps.AppNavigation

应用程序对象

返回值

返回天津是否成功

 

方法名称:RemoveApp(System.String)

方法说明

移除应用程序: 移除应用时需要同时删除FunctionNode及其子菜单,请改用AppPackageManager.RemoveApp

输入参数

名称

类型

说明

AppCode

System.String

应用程序编码

返回值

 

方法名称:UpdateApp(OThinker.H3.Apps.AppNavigation)

方法说明

更新应用程序

输入参数

名称

类型

说明

App

OThinker.H3.Apps.AppNavigation

应用程序对象

返回值

返回更新应用程序对象是否成功

类:OThinker.H3.BizBus.IBizBus

说明:业务总线接口

访问入口:this.Engine.BizBus

示例:

this.Engine.BizBus.AddBizService(new BizBus.BizService.BizService(), false);

 

方法名称:OThinker.H3.Analytics.AnalyticalQuery(OThinker.H3.Configs.EngineConfig)

方法说明

构造函数

输入参数

名称

类型

说明

返回值

 

方法名称:OThinker.H3.Analytics.AnalyticalQuery(OThinker.Data.Database.DatabaseType,System.String)

方法说明

构造函数

输入参数

名称

类型

说明

DBType

OThinker.Data.Database.DatabaseType

 

DBConnString

System.String

 

返回值

 

方法名称:OThinker.H3.Client.AppNavigationManagerClient(OThinker.Clusterware.LogicUnitConnectionPool)

方法说明

构造函数

输入参数

名称

类型

说明

ConnectionPool

OThinker.Clusterware.LogicUnitConnectionPool

 

返回值

 

方法名称:RegisterAssembly(System.String,System.Byte[],System.Boolean)

方法说明

注册一个Assembly

输入参数

名称

类型

说明

FileName

System.String

文件名

Content

System.Byte[]

文件内容

Overwrite

System.Boolean

是否覆盖以前的文件

返回值

如果成功则返回true;否则返回false

 

方法名称:GetBizAdapterAttributes(OThinker.H3.BizBus.BizAdapters.AdapterType)

方法说明

获得系统中所有的Adapter的描述

输入参数

名称

类型

说明

AdapterType

OThinker.H3.BizBus.BizAdapters.AdapterType

适配器类型

返回值

返回系统加载的所有适配器描述

 

方法名称:GetBizAdapterAttribute(System.String)

方法说明

获得系统中所有的Adapter的描述

输入参数

名称

类型

说明

返回值

适配器的描述

 

方法名称:GetBizServices

方法说明

获得系统中所有的业务服务

输入参数

名称

类型

说明

返回值

类的全名称

 

方法名称:GetBizServicesByAdapter(System.String)

方法说明

获得系统中所有的业务服务

输入参数

名称

类型

说明

返回值

类的全名称

 

方法名称:GetBizService(System.String)

方法说明

获得系统中所有的业务服务

输入参数

名称

类型

说明

BizServiceCode

System.String

业务服务编码

返回值

实例的配置

 

方法名称:RemoveBizService(System.String)

方法说明

删除一个业务服务的实例

输入参数

名称

类型

说明

BizServiceCode

System.String

业务服务编码

返回值

如果删除成功,则返回true,否则返回false

 

方法名称:AddBizService(OThinker.H3.BizBus.BizService.BizService,System.Boolean)

方法说明

更新一个业务服务的设置

输入参数

名称

类型

说明

Service

OThinker.H3.BizBus.BizService.BizService

业务服务的相关配置

Validate

System.Boolean

在保存前是否调用验证的函数来做验证

返回值

如果更新成功,那么返回true;如果要更新的信息不合法,那么,返回false

 

方法名称:UpdateBizService(OThinker.H3.BizBus.BizService.BizService,System.Boolean)

方法说明

更新一个业务服务的设置

输入参数

名称

类型

说明

Service

OThinker.H3.BizBus.BizService.BizService

业务服务的相关配置

Validate

System.Boolean

在保存前是否调用验证的函数来做验证

返回值

如果更新成功,那么返回true;如果要更新的信息不合法,那么,返回false

 

方法名称:GetBizServicesByFolderCode(System.String)

方法说明

根据目录获取业务服务

输入参数

名称

类型

说明

FolderCode

System.String

目录编码

返回值

 

 

方法名称:QueryInvokingLog(System.DateTime,System.DateTime)

方法说明

查询调用日志

输入参数

名称

类型

说明

From

System.DateTime

开始日期

To

System.DateTime

结束日期

返回值

调用日志

 

方法名称:GetInvokingLog(System.String)

方法说明

获得某个调用日志

输入参数

名称

类型

说明

LogId

System.String

日志的ID

返回值

调用日志

 

方法名称:GetMethods(System.String)

方法说明

获得所有可以调用的方法

输入参数

名称

类型

说明

BizServiceCode

System.String

业务服务的编码

返回值

可调用的方法的名称和Schema

 

方法名称:GetMethod(System.String,System.String)

方法说明

获得所有可以调用的方法

输入参数

名称

类型

说明

BizServiceCode

System.String

业务服务的编码

MethodName

System.String

方法的名称

返回值

可调用的方法的名称和Schema

 

方法名称:Invoke(OThinker.H3.BizBus.BizService.BizServiceInvokingContext)

方法说明

以事务的方式调用一个方法

输入参数

名称

类型

说明

InvokingContext

OThinker.H3.BizBus.BizService.BizServiceInvokingContext

调用的接口的上下方

返回值

自描述的对象。注意:对于同一个方法,无论方法的参数是什么,返回的对象的Schema必须是同一个,这里是不允许重构的,如果需要重构,则需要使用另外的方法名称

 

方法名称:GetFilterSchemas(System.String)

方法说明

获得支持的搜索的模式

输入参数

名称

类型

说明

BizServiceCode

System.String

业务服务的编码

返回值

支持的搜索的模式

 

方法名称:GetFilterSchema(System.String,System.String)

方法说明

获得搜索的模式

输入参数

名称

类型

说明

BizServiceCode

System.String

业务服务的编码

FilterCode

System.String

过滤条件的编码

返回值

搜索模式

 

方法名称:GetList(System.String,System.String,OThinker.H3.BizBus.Filter.Filter,System.Int32@)

方法说明

查询对象

输入参数

名称

类型

说明

BizServiceCode

System.String

业务服务的编码

FilterCode

System.String

搜索的编号

Filter

OThinker.H3.BizBus.Filter.Filter

搜索条件

Count

System.Int32@

如果做了分页,就会要求返回总数

返回值

符合条件的记录

 

方法名称:GetAccountCategories

方法说明

获得所有的账户映射分类

输入参数

名称

类型

说明

返回值

所有的账户映射分类

 

方法名称:GetAccountCategory(System.String)

方法说明

获得账户映射分类

输入参数

名称

类型

说明

CategoryCode

System.String

分类编码

返回值

业务账户分类

 

方法名称:AddAccountCategory(OThinker.H3.BizBus.BizService.BizAccountCategory)

方法说明

添加账户映射分类

输入参数

名称

类型

说明

Category

OThinker.H3.BizBus.BizService.BizAccountCategory

业务账户分类

返回值

如果添加成功,则返回true;否则返回false。

 

方法名称:UpdateAccountCategory(OThinker.H3.BizBus.BizService.BizAccountCategory)

方法说明

更新账户分类映射

输入参数

名称

类型

说明

Category

OThinker.H3.BizBus.BizService.BizAccountCategory

业务账户分类

返回值

如果更新成功则返回true,否则返回false

 

方法名称:RemoveAccountCategory(System.String)

方法说明

删除账户映射分类

输入参数

名称

类型

说明

CategoryCode

System.String

业务账户分类编码

返回值

 

方法名称:GetAccountMappings(System.String)

方法说明

获得某个账户映射分类下的所有账户映射

输入参数

名称

类型

说明

CategoryCode

System.String

账户映射分类的编码

返回值

账户映射

 

方法名称:GetAccountMapping(System.String)

方法说明

获得账户映射

输入参数

名称

类型

说明

MappingId

System.String

账户映射的ID

返回值

账户映射

 

方法名称:AddAccountMapping(OThinker.H3.BizBus.BizService.BizAccountMapping)

方法说明

添加账户映射

输入参数

名称

类型

说明

Mapping

OThinker.H3.BizBus.BizService.BizAccountMapping

账户映射定义

返回值

如果添加成功则返回true;否则返回false

 

方法名称:RemoveAccountMapping(System.String)

方法说明

删除账户映射

输入参数

名称

类型

说明

MappingId

System.String

账户映射ID

返回值

 

方法名称:UpdateAccountMapping(OThinker.H3.BizBus.BizService.BizAccountMapping)

方法说明

更新账户映射

输入参数

名称

类型

说明

Mapping

OThinker.H3.BizBus.BizService.BizAccountMapping

账户映射

返回值

 

方法名称:GetAccountMappingByUnitId(System.String,System.String)

方法说明

根据源组织ID获得账户映射

输入参数

名称

类型

说明

AccountCategory

System.String

账户映射的类型

UnitId

System.String

组织ID

返回值

如果存在账户映射则返回账户映射,否则返回Null

 

方法名称:AddBizRule(OThinker.H3.BizBus.BizRule.BizRuleTable,System.String)

方法说明

添加一个业务对象模式。添加前需要先检查是否模式编码是否存在,该检查是不区分大小写的,如果不存在则添加

输入参数

名称

类型

说明

Rule

OThinker.H3.BizBus.BizRule.BizRuleTable

业务对象模式

返回值

如果添加成功则返回true;否则返回false

 

方法名称:GetBizRule(System.String)

方法说明

根据模式编码获得业务对象模式

输入参数

名称

类型

说明

RuleCode

System.String

业务对象模式编码,不区分大小写

返回值

业务对象模式

 

方法名称:UpdateBizRule(OThinker.H3.BizBus.BizRule.BizRuleTable)

方法说明

更新业务对象模式

输入参数

名称

类型

说明

Rule

OThinker.H3.BizBus.BizRule.BizRuleTable

业务对象模式

返回值

如果更新成功,则返回true;否则返回false

 

方法名称:RemoveBizRule(System.String)

方法说明

删除一个业务对象模式,不区分大小写

输入参数

名称

类型

说明

RuleCode

System.String

业务对象模式编码

返回值

如果删除成功,则返回true;否则返回false

 

方法名称:ValidateBizRule(System.String)

方法说明

验证业务规则的合法性

输入参数

名称

类型

说明

RuleCode

System.String

业务规则的编码

返回值

验证结果

 

方法名称:WriteLog(System.String)

方法说明

写入日志

输入参数

名称

类型

说明

Log

System.String

日志

返回值

10 类:OThinker.H3.Sheet.IBizSheetManager

说明:表单对象管理接口

访问入口:this.Engine.BizSheetManager

示例:

this.Engine.BizSheetManager.AddBizSheet(new Sheet.BizSheet());

 

方法名称:OThinker.H3.Client.BizSheetManagerClient(OThinker.Clusterware.LogicUnitConnectionPool)

方法说明

构造函数

输入参数

名称

类型

说明

ConnectionPool

OThinker.Clusterware.LogicUnitConnectionPool

 

返回值

 

方法名称:GetBizSheetByID(System.String)

方法说明

根据表单ID获取表单对象

输入参数

名称

类型

说明

ObjectId

System.String

表单ID

返回值

返回表单对象

 

方法名称:GetBizSheetByCode(System.String)

方法说明

根据表单编码获取表单对象

输入参数

名称

类型

说明

SheetCode

System.String

表单编码

返回值

 

 

方法名称:GetBizSheetBySchemaCode(System.String)

方法说明

根据数据模型编码获取表单集合

输入参数

名称

类型

说明

SchemaCode

System.String

数据模型编码

返回值

表单对象的集合

 

方法名称:AddBizSheet(OThinker.H3.Sheet.BizSheet)

方法说明

添加一个表单

输入参数

名称

类型

说明

BizSheet

OThinker.H3.Sheet.BizSheet

表单对象

返回值

返回操作是否成功

 

方法名称:DeleteBizSheet(System.String)

方法说明

删除一个表单

输入参数

名称

类型

说明

SheetCode

System.String

表单编码

返回值

返回操作是否成功

 

方法名称:RemoveSheetBySchemaCode(System.String)

方法说明

根据数据模型编码删除所有表单

输入参数

名称

类型

说明

SchemaCode

System.String

数据模型编码

返回值

返回操作是否成功

 

方法名称:UpdateBizSheet(OThinker.H3.Sheet.BizSheet)

方法说明

更新一个表单

输入参数

名称

类型

说明

BizSheet

OThinker.H3.Sheet.BizSheet

表单对象

返回值

返回操作是否成功

11 类:OThinker.H3.SNS.ISNSManager

说明:社交管理器

访问入口:this.Engine.SNSManager

示例:

this.Engine.SNSManager.AddPost(new SNS.SNSPost(),string.Empty);

 

方法名称:SetRelationship(OThinker.H3.SNS.SNSRelationship)

方法说明

设置业务对象的关注关系

输入参数

名称

类型

说明

Relationship

OThinker.H3.SNS.SNSRelationship

业务对象的关注关系

返回值

 

方法名称:GetRelationships(System.String,System.String[])

方法说明

获得业务对象的关注关系

输入参数

名称

类型

说明

UserId

System.String

用户ID

SchemaCodes

System.String[]

业务对象模式编码

返回值

业务对象模式关注关系

 

方法名称:AddComment(System.String,System.String,System.String,System.String,System.String,System.String,System.String)

方法说明

添加对象的评论

输入参数

名称

类型

说明

ReplyTo

System.String

要回复的评论的ID

SchemaCode

System.String

业务对象模式编码

BizObjectId

System.String

业务对象ID

BizObjectId

System.String

关联对象ID,如workitemid

UserId

System.String

用户ID

Text

System.String

评论的内容

ObjectID

System.String

前端传递过来的评论唯一ID

返回值

 

方法名称:AddLike(System.String,System.String,System.String,System.String,System.String,System.String)

方法说明

点赞

输入参数

名称

类型

说明

ReplyTo

System.String

要回复的评论的ID

SchemaCode

System.String

业务对象模式编码

BizObjectId

System.String

业务对象ID

BizObjectId

System.String

关联对象ID,如workitemid

UserId

System.String

用户ID

ObjectID

System.String

前端传递过来的评论唯一ID

返回值

 

方法名称:DeleteComment(System.String)

方法说明

删除评论

输入参数

名称

类型

说明

CommentId

System.String

评论的ID

返回值

 

方法名称:AddFeedEvent(OThinker.H3.SNS.FeedEvent)

方法说明

添加新闻事件

输入参数

名称

类型

说明

Event

OThinker.H3.SNS.FeedEvent

新闻事件

返回值

 

方法名称:AddToFavorite(System.String,System.String)

方法说明

将新闻添加到收藏中

输入参数

名称

类型

说明

UserId

System.String

用户ID

FeedId

System.String

新闻ID

返回值

 

方法名称:RemoveFromFavorite(System.String)

方法说明

删除收藏的新闻

输入参数

名称

类型

说明

FavoriteFeedId

System.String

新闻的ID

返回值

 

方法名称:SetSharingItem(System.String,OThinker.H3.SNS.SNSTargetType,System.String,System.String,System.String,System.String,System.Boolean,OThinker.H3.SNS.SNSSharingItemPermissionType,System.String[],System.String[],System.String)

方法说明

将某个对象分享给内部/外部用户

输入参数

名称

类型

说明

Sender

System.String

发送分享的人

TargetType

OThinker.H3.SNS.SNSTargetType

要分享的对象的类型

SchemaCode

System.String

要分享的对象的业务对象模式编码

BizObjectId

System.String

要分享的业务对象的ID

TargetId

System.String

要分享的目标对象的ID,如果是WorkItem,则是WorkItemId

TargetName

System.String

要分享的目标对象的名称

IsPublic

System.Boolean

是否是公开的,如果是公开的话,那么意味着只要用户知道SharingItemId,即可打开相应的表单。如果要发送给外部用户,那么必须是IsPublic=true的

Permission

OThinker.H3.SNS.SNSSharingItemPermissionType

要分享的对象的权限

InternalReceivers

System.String[]

内部接收分享的用户

ExternalReceivers

System.String[]

外部接收分享的用户,格式是每个用户的邮箱

Text

System.String

要分享的内容的描述,如果外部接收人员不为空的,则需要填写该字段

返回值

 

方法名称:GetSharingItem(System.String)

方法说明

获得分享的设置

输入参数

名称

类型

说明

SharingItemId

System.String

分享设置的ID

返回值

分享的详细信息

 

方法名称:GetSharingItemBySender(System.String,System.String)

方法说明

根据创建者获得分享设置的信息

输入参数

名称

类型

说明

TargetId

System.String

分享的对象的ID

Sender

System.String

分享的发送者

返回值

分享的设置信息

 

方法名称:CheckSharingItemForInternal(System.String,System.String)

方法说明

验证分享的权限

输入参数

名称

类型

说明

TargetId

System.String

分享的目标对象的ID

Receiver

System.String

接收者的ID

返回值

返回接收者对于该分享项目的权限

 

方法名称:GetSharingItemPermission(System.String,System.String,System.String@)

方法说明

根据业务对象ID获得用户对于这个分享项目的权限,这个验证关系主要通过登录用户自身的权限,这个接口主要是提供给全文搜索的时候使用的,全文搜索的时候,搜索出来相关的业务对象,然后根据业务对象打开相应的有权限的业务对象表单或者工作项表单

输入参数

名称

类型

说明

BizObjectId

System.String

业务对象的ID

Receiver

System.String

接受者

WorkItemId

System.String@

分享一个业务对象有可能是通过BizObjectId,也有可能是通过WorkItemId的,如果是通过WorkItemId的,则找到其中一个WorkItemId,并返回回来

返回值

返回接收者对于该分享项目的权限

 

方法名称:CheckSharingItemForExternal(System.String,System.String,System.String[]@)

方法说明

根据业务对象ID/WorkItemId获得用户对于这个分享项目的权限,这个验证关系主要通过SharingItemId的匹配,这里要求SharingItemId必须匹配,SharingItemId相当于是一个秘钥

输入参数

名称

类型

说明

SharingItemId

System.String

分享的设置的ID,这个ID相当于是一个秘钥,必须匹配才能返回权限,否则返回NoAccess

TargetId

System.String

分享的对象的ID

Receivers

System.String[]@

返回出外部的接收者

返回值

返回接收者对于该分享项目的权限

 

方法名称:GetSharingItemReceivers(System.String)

方法说明

根据业务对象ID,或者所有用权限访问的内部用户的ID

输入参数

名称

类型

说明

BizObjectId

System.String

业务对象ID

返回值

分享的接收者

 

方法名称:DeleteSharingItem(System.String)

方法说明

删除一个分享设置

输入参数

名称

类型

说明

SharingItemId

System.String

分享设置

返回值

 

方法名称:SetFeedState(System.String,System.String,OThinker.H3.SNS.SNSFeedState,System.DateTime)

方法说明

设置动态的状态,可以把一个动态标记为完成或者未完成

输入参数

名称

类型

说明

UserId

System.String

 

FeedId

System.String

 

State

OThinker.H3.SNS.SNSFeedState

 

Deadline

System.DateTime

 

返回值

12 类:OThinker.H3.Site.ISiteManager

说明:门户站点管理

访问入口:this.Engine.SiteManager

示例:

this.Engine.SiteManager.AddPage(new Site.SitePage());

 

方法名称:AddPage(OThinker.H3.Site.SitePage)

方法说明

添加门户页面实例

输入参数

名称

类型

说明

Page

OThinker.H3.Site.SitePage

页面实例

返回值

添加不成功(冲突或其他原因)返回false

 

方法名称:UpdatePage(OThinker.H3.Site.SitePage)

方法说明

更新页面实例

输入参数

名称

类型

说明

Page

OThinker.H3.Site.SitePage

页面实例

返回值

更新不成功(实例不存在、冲突或其他原因),则返回false

 

方法名称:DeletePage(OThinker.H3.Site.SitePage)

方法说明

删除页面实例

输入参数

名称

类型

说明

Page

OThinker.H3.Site.SitePage

页面实例

返回值

删除不成功,则返回false

 

方法名称:DeletePageById(System.String)

方法说明

根据页面实例Id删除

输入参数

名称

类型

说明

Id

System.String

页面实例唯一值属性值

返回值

删除不成功,则返回false

 

方法名称:GetPage(System.String)

方法说明

根据页面实例唯一值属性列值查询页面实例

输入参数

名称

类型

说明

Id

System.String

页面实例唯一值属性值

返回值

如果指定属性值的页面实例不存在,则返回false

 

方法名称:GetPagesByOrg(System.String)

方法说明

根据组织结构对查找页面实例

输入参数

名称

类型

说明

OrgId

System.String

组织结构ID

返回值

返回页面类实例数组,如果指定键值对不存在,则返回空数组

 

方法名称:GetAllPages

方法说明

查询所有页面类实例

输入参数

名称

类型

说明

返回值

返回所有的页面类实例,返回类型为实例数组

 

方法名称:AddPageTemplate(OThinker.H3.Site.SitePageTemplate)

方法说明

添加页面模板类实例

输入参数

名称

类型

说明

PageTemplate

OThinker.H3.Site.SitePageTemplate

页面模板实例

返回值

添加不成功(冲突或其他原因)返回false

 

方法名称:UpdatePageTemplate(OThinker.H3.Site.SitePageTemplate)

方法说明

更新页面模板实例

输入参数

名称

类型

说明

PageTemplate

OThinker.H3.Site.SitePageTemplate

页面模板实例

返回值

更新不成功(实例不存在、冲突或其他原因),则返回false

 

方法名称:RemovePageTemplate(OThinker.H3.Site.SitePageTemplate)

方法说明

删除页面模板实例

输入参数

名称

类型

说明

PageTemplate

OThinker.H3.Site.SitePageTemplate

页面模板实例

返回值

删除不成功,则返回false

 

方法名称:RemovePageTemplateById(System.String)

方法说明

根据页面模板实例Id删除

输入参数

名称

类型

说明

Id

System.String

页面模板实例唯一值属性值

返回值

删除不成功,则返回false

 

方法名称:GetPageTemplate(System.String)

方法说明

根据页面模板实例唯一值属性列值查询页面实例

输入参数

名称

类型

说明

Id

System.String

页面模板实例唯一值属性值

返回值

如果指定属性值的页面实例不存在,则返回false

 

方法名称:GetAllPageTemplates

方法说明

查询所有页面类实例

输入参数

名称

类型

说明

返回值

返回所有的页面类实例,返回类型为实例数组

 

方法名称:AddWebPartInst(OThinker.H3.Site.SiteWebPartInstance)

方法说明

添加门户部件实例

输入参数

名称

类型

说明

WebPartInstance

OThinker.H3.Site.SiteWebPartInstance

部件实例

返回值

添加不成功(冲突或其他原因)返回false

 

方法名称:UpdateWebPartInst(OThinker.H3.Site.SiteWebPartInstance)

方法说明

更新部件实例

输入参数

名称

类型

说明

WebPartInstance

OThinker.H3.Site.SiteWebPartInstance

部件实例

返回值

更新不成功(实例不存在、冲突或其他原因),则返回false

 

方法名称:DeleteWebPartInst(OThinker.H3.Site.SiteWebPartInstance)

方法说明

删除部件实例

输入参数

名称

类型

说明

WebPartInstance

OThinker.H3.Site.SiteWebPartInstance

部件实例

返回值

删除不成功,则返回false

 

方法名称:DeleteWebPartInstById(System.String)

方法说明

根据部件实例Id删除

输入参数

名称

类型

说明

Id

System.String

部件实例唯一值属性值

返回值

删除不成功,则返回false

 

方法名称:GetWebPartInst(System.String)

方法说明

根据部件实例唯一值属性列值查询部件模板实例

输入参数

名称

类型

说明

Id

System.String

部件实例唯一值属性值

返回值

如果指定属性值的部件实例不存在,则返回false

 

方法名称:GetWebPartInstancesByPage(System.String)

方法说明

根据关键字键值对查找部件实例

输入参数

名称

类型

说明

Key

System.String

键名称

Value

 

键值

返回值

返回部件实例数组,如果指定键值对不存在,则返回空数组

 

方法名称:GetAllWebPartInsts

方法说明

查询所有部件实例

输入参数

名称

类型

说明

返回值

返回所有的部件实例,返回类型为实例数组

 

方法名称:AddWebPart(OThinker.H3.Site.SiteWebPart)

方法说明

添加门户部件模板实例

输入参数

名称

类型

说明

WebPart

OThinker.H3.Site.SiteWebPart

部件模板实例

返回值

添加不成功(冲突或其他原因)返回false

 

方法名称:UpdateWebPart(OThinker.H3.Site.SiteWebPart)

方法说明

更新部件模板实例

输入参数

名称

类型

说明

WebPart

OThinker.H3.Site.SiteWebPart

部件模板实例

返回值

更新不成功(实例不存在、冲突或其他原因),则返回false

 

方法名称:DeleteWebPart(OThinker.H3.Site.SiteWebPart)

方法说明

删除部件模板实例

输入参数

名称

类型

说明

WebPart

OThinker.H3.Site.SiteWebPart

部件模板实例

返回值

删除不成功,则返回false

 

方法名称:DeleteWebPartById(System.String)

方法说明

根据部件模板实例Id删除

输入参数

名称

类型

说明

Id

System.String

部件模板实例唯一值属性值

返回值

删除不成功,则返回false

 

方法名称:GetWebPart(System.String)

方法说明

根据部件模板实例唯一值属性列值查询部件模板实例

输入参数

名称

类型

说明

Id

System.String

部件模板实例唯一值属性值

返回值

如果指定属性值的部件模板实例不存在,则返回false

 

方法名称:GetAllWebParts

方法说明

查询所有部件模板实例

输入参数

名称

类型

说明

返回值

返回所有的部件模板实例,返回类型为实例数组

 

方法名称:AddWebPartPublicAttr(OThinker.H3.Site.SiteWebPartPublicAttribute)

方法说明

添加门户部件公有属性实例

输入参数

名称

类型

说明

WebPartPublicAttribute

OThinker.H3.Site.SiteWebPartPublicAttribute

部件实例公有属性实例

返回值

添加不成功(冲突或其他原因)返回false

 

方法名称:UpdateWebPartPublicAttr(OThinker.H3.Site.SiteWebPartPublicAttribute)

方法说明

更新部件实例公有属性实例

输入参数

名称

类型

说明

WebPartPublicAttribute

OThinker.H3.Site.SiteWebPartPublicAttribute

部件实例公有属性实例

返回值

更新不成功(实例不存在、冲突或其他原因),则返回false

 

方法名称:DeleteWebPartPublicAttr(OThinker.H3.Site.SiteWebPartPublicAttribute)

方法说明

删除部件实例公有属性实例

输入参数

名称

类型

说明

WebPartPublicAttribute

OThinker.H3.Site.SiteWebPartPublicAttribute

部件实例公有属性实例

返回值

删除不成功,则返回false

 

方法名称:DeleteWebPartPublicAttrById(System.String)

方法说明

根据部件实例公有属性实例Id删除

输入参数

名称

类型

说明

Id

System.String

部件实例公有属性实例唯一值属性值

返回值

删除不成功,则返回false

 

方法名称:GetWebPartPublicAttr(System.String)

方法说明

根据部件实例公有属性实例唯一值属性列值查询部件模板实例

输入参数

名称

类型

说明

Id

System.String

部件实例公有属性实例唯一值属性值

返回值

如果指定属性值的部件实例公有属性实例不存在,则返回false

 

方法名称:GetAllWebPartPublicAttrs

方法说明

查询所有部件实例公有属性实例

输入参数

名称

类型

说明

返回值

返回所有的部件实例公有属性实例,返回类型为实例数组

13 类:OThinker.H3.Apps.IAppPackageManager

说明:流程包管理对象

访问入口:this.Engine.AppPackageManager

示例:

this.Engine.AppPackageManager.AddAppPackage(new Acl.FunctionNode(), DataModel.StorageType.DataList);

 

方法名称:AddAppPackage(OThinker.H3.Acl.FunctionNode,OThinker.H3.DataModel.StorageType)

方法说明

添加流程包

输入参数

名称

类型

说明

FunctionNode

OThinker.H3.Acl.FunctionNode

功能节点对象

Type

OThinker.H3.DataModel.StorageType

存储类型(本地存储/外部数据)

返回值

返回添加应用包是否成功

 

方法名称:DeleteAppPackage(OThinker.H3.Acl.FunctionNode)

方法说明

删除流程包

输入参数

名称

类型

说明

FunctionNode

OThinker.H3.Acl.FunctionNode

功能节点对象

返回值

 

方法名称:ImportAppPackage(System.String,System.String,System.String,System.String,OThinker.H3.DataModel.BizObjectSchema,OThinker.H3.DataModel.BizListenerPolicy,System.Collections.Generic.List{OThinker.H3.DataModel.BizQuery},System.Collections.Generic.List{OThinker.H3.DataModel.ScheduleInvoker},System.Collections.Generic.List{OThinker.H3.Sheet.BizSheet},System.Collections.Generic.List{OThinker.H3.WorkflowTemplate.DraftWorkflowTemplate},System.Collections.Generic.Dictionary{System.String,System.String},System.Boolean,System.String@)

方法说明

流程包导入

输入参数

名称

类型

说明

UserID

System.String

操作用户ID

ParentCode

System.String

父功能节点编码

PackageCode

System.String

应用包编码

PackageName

System.String

应用包名称

Schema

OThinker.H3.DataModel.BizObjectSchema

数据模型对象

BizListenerPolicy

OThinker.H3.DataModel.BizListenerPolicy

监听

BizQueryList

List{OThinker.H3.DataModel.BizQuery}

查询集合

ScheduleInvokerList

List{OThinker.H3.DataModel.ScheduleInvoker}

定时作业集合

BizSheetList

List{OThinker.H3.Sheet.BizSheet}

表单对象集合

WorkflowTemplateList

List{OThinker.H3.WorkflowTemplate.DraftWorkflowTemplate}

流程对象集合

WorkflowNames

System.Collections.Generic.Dictionary{System.String

流程名称集合(编码,名称)

Overwrite

System.String}

是否覆盖模式

ResultStr

System.Boolean

返回结果

返回值

返回流程包导入是否成功

 

方法名称:UpdateDraftAppPackage(OThinker.H3.DataModel.BizObjectSchema,OThinker.H3.Sheet.BizSheet)

方法说明

更新草稿的表单设计

输入参数

名称

类型

说明

Schema

OThinker.H3.DataModel.BizObjectSchema

数据模型对象

BizSheet

OThinker.H3.Sheet.BizSheet

表单对象

返回值

返回更新是否成功

14 类:OThinker.H3.WorkflowTemplate.IWorkflowConfigManager

说明:流程模板管理器,用于管理设计中的流程模板信息

访问入口:this.Engine.WorkflowConfigManager

示例:

this.Engine.WorkflowConfigManager.AddFavoriteWorkflow("","");

 

方法名称:

OThinker.H3.Client.WorkflowConfigManagerClient(OThinker.Clusterware.LogicUnitConnectionPool)

方法说明

 

输入参数

名称

类型

说明

ConnectionPool

OThinker.Clusterware.LogicUnitConnectionPool

 

返回值

 

方法名称:GetAllActivityConfigs

方法说明

获取所有活动模板

输入参数

名称

类型

说明

返回值

 

 

方法名称:SaveActivityTemplate(OThinker.H3.WorkflowTemplate.Activity)

方法说明

保存活动模板

输入参数

名称

类型

说明

Activity

OThinker.H3.WorkflowTemplate.Activity

 

返回值

 

 

方法名称:GetFavoriteWorkflowCodes(System.String)

方法说明

获取用户的常用流程列表

输入参数

名称

类型

说明

UserID

System.String

用户ID

返回值

用户的常用流程

 

方法名称:AddFavoriteWorkflow(System.String,System.String)

方法说明

添加常用流程

输入参数

名称

类型

说明

UserID

System.String

 

WorkflowCode

System.String

 

返回值

 

方法名称:DeleteFavoriteWorkflow(System.String,System.String)

方法说明

删除常用流程

输入参数

名称

类型

说明

UserID

System.String

 

WorkflowCode

System.String

 

返回值

15 类:OThinker.H3.Notification.IWeChatAdapter

说明:用于管理通知的接口

访问入口:this.Engine.WeChatAdapter

示例:

this.Engine.WeChatAdapter.Reload()

 

方法名称:SyncOrgToWeChat

方法说明

将组织同步到微信

输入参数

名称

类型

说明

返回值

组织同步是否成功

 

方法名称:SendNewsMessage(OThinker.H3.WeChat.WeChatNews)

方法说明

发送新闻类消息

输入参数

名称

类型

说明

news

OThinker.H3.WeChat.WeChatNews

微信消息对象

返回值

 

方法名称:GetUserCode(System.String)

方法说明

根据微信返回编码获取用户的帐号(流程中心)

输入参数

名称

类型

说明

WeChatCode

System.String

微信编码

返回值

返回用户登录帐号

 

方法名称:GetAttachmentWeChatViewUrl(System.String,System.String,System.String,System.String)

方法说明

获取文件在微信中查看地址

输入参数

名称

类型

说明

返回值

 

 

方法名称:Reload

方法说明

重置微信状态

输入参数

名称

类型

说明

返回值

16 类:OThinker.H3.Instance.IHeapDataManager

说明:用于管理堆数据,堆数据跟实例数据有如下的不一样: 1. 堆数据没有定义在流程数据中,是显性地通过创建来创建的 2. 堆数据没有Editable和Visible属性,只有值属性 3. 堆数据允许选择创建在Memory中,也允许创建在数据库中,如果创建在内存中,那么当系统重新启动的时候将不会进行记录 4. 实例数据是跟流程的应用逻辑联系比较紧密的数据,堆数据是在运行过程中进行辅助的数据 注意:堆数据的值必须是System.Serializable的

访问入口:this.Engine.HeapDataManager

示例:

this.Engine.HeapDataManager.GetItemValue("流程实例ID", "数据项名称");

 

方法名称:OThinker.H3.Site.SiteWebPartInstance

方法说明

部件实例

输入参数

名称

类型

说明

返回值

 

方法名称:OThinker.H3.Site.SiteWebPartInstanceValue

方法说明

构造函数

输入参数

名称

类型

说明

返回值

 

方法名称:OThinker.H3.WorkflowTemplate.WorkflowNode

方法说明

构造函数

输入参数

名称

类型

说明

返回值

 

方法名称:OThinker.H3.WorkflowTemplate.WorkflowNode(System.Xml.XmlElement)

方法说明

从XML构造

输入参数

名称

类型

说明

XmlElement

System.Xml.XmlElement

 

返回值

 

方法名称:OThinker.H3.WorkflowTemplate.Activity

方法说明

构造函数

输入参数

名称

类型

说明

返回值

 

方法名称:OThinker.H3.WorkflowTemplate.Activity(System.Xml.XmlElement)

方法说明

从XML构造

输入参数

名称

类型

说明

XmlElement

System.Xml.XmlElement

 

返回值

 

方法名称:OThinker.H3.WorkflowTemplate.ClientActivityBase

方法说明

构造函数

输入参数

名称

类型

说明

返回值

 

方法名称:OThinker.H3.WorkflowTemplate.ClientActivityBase(System.Xml.XmlElement)

方法说明

从XML构造

输入参数

名称

类型

说明

XmlElement

System.Xml.XmlElement

 

返回值

 

方法名称:OThinker.H3.WorkflowTemplate.ClientActivity

方法说明

构造函数

输入参数

名称

类型

说明

返回值

 

方法名称:OThinker.H3.WorkflowTemplate.ClientActivity(System.Xml.XmlElement)

方法说明

从XML构造

输入参数

名称

类型

说明

XmlElement

System.Xml.XmlElement

 

返回值

 

方法名称:OThinker.H3.WorkflowTemplate.ParticipativeActivity

方法说明

构造函数

输入参数

名称

类型

说明

返回值

 

方法名称:OThinker.H3.WorkflowTemplate.ParticipativeActivity(System.Xml.XmlElement)

方法说明

从XML构造

输入参数

名称

类型

说明

XmlElement

System.Xml.XmlElement

 

返回值

 

方法名称:ExistItem(System.String,System.String)

方法说明

检查该属性是否存在

输入参数

名称

类型

说明

InstanceId

System.String

流程实例的ID

ItemName

System.String

项名称

返回值

如果项存在,则返回true,否则返回false

 

方法名称:GetItemValue(System.String,System.String)

方法说明

获取一个堆数据项的值

输入参数

名称

类型

说明

InstanceId

System.String

流程实例的ID

ItemName

System.String

项名称

返回值

项值

 

方法名称:SetItemValue(System.String,System.String,System.Object)

方法说明

设置一个堆数据项的值

输入参数

名称

类型

说明

InstanceId

System.String

流程实例的ID

ItemName

System.String

项名称

ItemValue

System.Object

项值

返回值

如果设置成功,则返回0,否则返回错误代码

 

方法名称:GetAllItemNames(System.String)

方法说明

获得所有的数据项名称

输入参数

名称

类型

说明

InstanceId

System.String

流程实例的ID

返回值

所有堆数据项的名称

 

方法名称:GetAllItems(System.String)

方法说明

获得所有的数据项

输入参数

名称

类型

说明

InstanceId

System.String

流程实例的ID

返回值

返回的是一个[ItemName, ItemValue]的表

 

方法名称:RemoveInstance(System.String)

方法说明

根据流程实例ID删除堆数据项的值

输入参数

名称

类型

说明

InstanceId

System.String

流程实例ID

返回值

17 类:OThinker.H3.DataModel.IBizObjectManager

说明:数据模型管理器

访问入口:this.Engine.BizObjectManager

示例:

this.Engine.BizObjectManager.GetBizQuery("查询编码");

 

方法名称:AddDraftSchema(OThinker.H3.DataModel.BizObjectSchema)

方法说明

添加一个草稿业务对象模式。添加前需要先检查是否模式编码是否存在,该检查是不区分大小写的,如果不存在则添加

输入参数

名称

类型

说明

Schema

OThinker.H3.DataModel.BizObjectSchema

业务对象模式

返回值

如果添加成功则返回true;否则返回false

 

方法名称:GetDraftSchema(System.String)

方法说明

获得草稿业务对象模式

输入参数

名称

类型

说明

SchemaCode

System.String

业务对象

返回值

 

 

方法名称:UpdateDraftSchema(OThinker.H3.DataModel.BizObjectSchema)

方法说明

更新业务对象模式

输入参数

名称

类型

说明

Schema

OThinker.H3.DataModel.BizObjectSchema

业务对象模式

返回值

如果更新成功,则返回true;否则返回false

 

方法名称:GetPublishedSchema(System.String)

方法说明

根据模式编码获得已经发布的业务对象模式

输入参数

名称

类型

说明

SchemaCode

System.String

业务对象模式编码,不区分大小写

返回值

业务对象模式

 

方法名称:GetPublishedSchemas

方法说明

获得全部已经发布的业务对象模式

输入参数

名称

类型

说明

返回值

业务对象模式列表

 

方法名称:SetPublishedSchemaState(System.String,OThinker.H3.DataModel.BizObjectSchemaState)

方法说明

设置已经发布的业务对象模式的状态

输入参数

名称

类型

说明

SchemaCode

System.String

业务对象模式编码

State

OThinker.H3.DataModel.BizObjectSchemaState

状态

返回值

如果设置成功则返回true;否则返回false

 

方法名称:PublishSchema(System.String,System.String@)

方法说明

发布一个业务对象模式,实际上,是将业务对象模式从草稿库中读取出来,然后发布到已发布库中,如果新的业务对象模式跟原有的业务对象模式存在冲突,则会回滚到上一次发布的模式中

输入参数

名称

类型

说明

SchemaCode

System.String

业务对象模式编码,不区分大小写

Message

System.String@

返回消息结果

返回值

如果发布成功,则返回true;否则返回false

 

方法名称:GetListenerPolicy(System.String)

方法说明

获得一个已发布的业务对象类型监听器的设置

输入参数

名称

类型

说明

SchemaCode

System.String

业务对象模式编码

返回值

监听器的设置

 

方法名称:SetListenerPolicy(System.String,OThinker.H3.DataModel.BizListenerPolicy)

方法说明

设置一个已发布的业务对象类型监听器的设置

输入参数

名称

类型

说明

SchemaCode

System.String

业务对象模式编码

ListenerPolicy

OThinker.H3.DataModel.BizListenerPolicy

监听器的设置

返回值

如果设置成功,则返回true;否则返回false

 

方法名称:InvokeBizObjectMethod(System.String,OThinker.Data.BoolMatchValue,System.String,OThinker.H3.DataModel.BizObjectType,System.String,System.String,OThinker.H3.BizBus.BizService.BizStructure)

方法说明

调用业务对象方法

输入参数

名称

类型

说明

UserId

System.String

调用该方法的用户ID

Transactional

OThinker.Data.BoolMatchValue

事务的ID

SchemaCode

System.String

业务对象模式编码

BizObjectType

OThinker.H3.DataModel.BizObjectType

业务对象的类型

ObjectId

System.String

业务对象的ID

MethodName

System.String

要执行的方法的名称

Params

OThinker.H3.BizBus.BizService.BizStructure

执行的方法的参数

返回值

执行的参数的返回值

 

方法名称:GetList(System.String,System.String,System.String,OThinker.H3.BizBus.Filter.Filter,System.Int32@)

方法说明

执行Filter方法获取实体结构集合

输入参数

名称

类型

说明

UserId

System.String

用户ID

SchemaCode

System.String

数据模型编码

MethodName

System.String

方法名称

Filter

OThinker.H3.BizBus.Filter.Filter

过滤条件

Count

System.Int32@

获取集合数据量

返回值

实体结构集合

 

方法名称:UpdateComment(System.String,System.String,System.String,System.String,System.String,OThinker.Data.BoolMatchValue,System.String,System.Byte[])

方法说明

更新审批意见

输入参数

名称

类型

说明

SchemaCode

System.String

数据模型编码

ObjectId

System.String

数据实体ID

PropertyName

System.String

意见数据项的名称

CommentID

System.String

审批意见ID

Text

System.String

新的审批意见值

Approval

OThinker.Data.BoolMatchValue

新的审批结果

SignatureId

System.String

新意见采用的签章ID

Signature

System.Byte[]

签章二进制对象

返回值

执行结果:OThinker.H3.ErrorCode

 

方法名称:AddComment(OThinker.H3.Data.Comment)

方法说明

添加审批意见

输入参数

名称

类型

说明

Comment

OThinker.H3.Data.Comment

审批意见对象

返回值

执行结果:OThinker.H3.ErrorCode

 

方法名称:AddComments(OThinker.H3.Data.Comment[])

方法说明

批量添加审批意见

输入参数

名称

类型

说明

Comments

OThinker.H3.Data.Comment[]

审批意见集合

返回值

 

方法名称:GetCommentsByInstance(System.String,System.String,System.String,System.String,System.String,System.String)

方法说明

根据流程实例获取审批意见

输入参数

名称

类型

说明

BizObjectSchemaCode

System.String

数据模型编码

BizObjectId

System.String

数据实体ID

InstanceId

System.String

流程实例ID

PropertyName

System.String

审批意见数据项名称

UserID

System.String

用户ID

Activity

System.String

活动节点编码

返回值

审批意见集合

 

方法名称:GetCommentsByBizObject(System.String,System.String,System.String)

方法说明

根据数据模型获取审批意见

输入参数

名称

类型

说明

BizObjectSchemaCode

System.String

数据模型编码

BizObjectId

System.String

数据实体ID

PropertyName

System.String

审批意见数据项名称

返回值

审批意见集合

 

方法名称:CopyComments(System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.Int64,System.Boolean)

方法说明

复制审核意见

输入参数

名称

类型

说明

SourceBizObjectSchemaCode

System.String

源数据模型编码

SourceBizObjectId

System.String

源数据模型ID

SourceInstanceId

System.String

源流程实例ID

SourceDataField

System.String

源审批类型数据项编码

DestBizObjectSchemaCode

System.String

目标数据模型编码

DestBizObjectId

System.String

目标数据模型ID

DestInstanceId

System.String

目标流程实例ID

DestDataField

System.String

目标审批类型数据项编码

DestTokenId

System.Int64

目标活动节点ID

Override

System.Boolean

是否覆盖模式

返回值

 

方法名称:GetAttachment(System.String,System.String,System.String,System.String)

方法说明

获取附件信息

输入参数

名称

类型

说明

UserId

System.String

用户ID

BizObjectSchemaCode

System.String

数据模型编码

BizObjectId

System.String

数据实体ID

AttachmentID

System.String

附件ID

返回值

附件内容

 

方法名称:GetSingleAttachment(System.String,System.String,System.String,System.String,System.String)

方法说明

根据BizObjectId获取附件内容

输入参数

名称

类型

说明

UserId

System.String

读取附件的用户的ID

BizObjectSchemaCode

System.String

所属于的业务对象的模式的编码

BizObjectId

System.String

所属于的业务对象的ID

DataField

System.String

字段名称

FileName

System.String

文件名称,如果不为空,则表示是获取特定的附件;如果为空,则表示这个字段只能最多有一个附件

返回值

附件的内容

 

方法名称:GetAttachmentHeader(System.String,System.String,System.String)

方法说明

获取附件信息(不包含附件内容)

输入参数

名称

类型

说明

BizObjectSchemaCode

System.String

数据模型编码

BizObjectId

System.String

数据实体ID

AttachmentID

System.String

附件ID

返回值

返回附件信息

 

方法名称:GetAttachmentHeaders(System.String,System.String,System.String[])

方法说明

获取附件信息集合(不包含附件内容)

输入参数

名称

类型

说明

BizObjectSchemaCode

System.String

数据模型编码

BizObjectId

System.String

数据实体ID

AttachmentIds

System.String[]

附件ID集合

返回值

返回附件信息集合

 

方法名称:AddAttachment(OThinker.H3.Data.Attachment)

方法说明

添加附件

输入参数

名称

类型

说明

Attachment

OThinker.H3.Data.Attachment

附件对象

返回值

返回添加后的附件ID

 

方法名称:AddAttachments(System.String,System.String,System.String,OThinker.H3.Data.Attachment[],System.Boolean)

方法说明

批量添加附件

输入参数

名称

类型

说明

BizObjectSchemaCode

System.String

数据模型编码

BizObjectId

System.String

数据实体ID

DataField

System.String

数据项名称

Attachments

OThinker.H3.Data.Attachment[]

附件对象集合

Overwrite

System.Boolean

是否覆盖模式

返回值

 

方法名称:RemoveAttachment(System.String,System.String,System.String,System.String)

方法说明

移除附件

输入参数

名称

类型

说明

UserId

System.String

操作用户ID

BizObjectSchemaCode

System.String

数据模型编码

BizObjectId

System.String

数据实体ID

AttachmentID

System.String

附件ID

返回值

 

方法名称:RemoveAttachmentByFileName(System.String,System.String,System.String,System.String,System.String)

方法说明

根据附件名称移除附件

输入参数

名称

类型

说明

UserId

System.String

操作用户ID

BizObjectSchemaCode

System.String

数据模型编码

BizObjectId

System.String

数据实体ID

DataField

System.String

数据项名称

FileName

System.String

文件名称

返回值

 

方法名称:QueryAttachment(System.String,System.String,System.String,OThinker.Data.BoolMatchValue,System.String)

方法说明

查询附件

输入参数

名称

类型

说明

BizObjectSchemaCode

System.String

数据模型编码

BizObjectId

System.String

数据实体ID

DataField

System.String

数据项名称

LastVersion

OThinker.Data.BoolMatchValue

是否最新版本

FileName

System.String

附件名称

返回值

返回附件头信息集合

 

方法名称:RemoveAttachments(System.String,System.String,System.String)

方法说明

移除附件

输入参数

名称

类型

说明

BizObjectSchemaCode

System.String

数据模型编码

BizObjectId

System.String

数据实体ID

DataField

System.String

数据项名称

返回值

 

方法名称:RemoveAttachmentGarbage

方法说明

附件垃圾回收策略

输入参数

名称

类型

说明

返回值

 

方法名称:CopyAttachments(System.String,System.String,System.String,System.String,System.String,System.String,System.Boolean)

方法说明

将附件从一个数据模型复制到另一个数据模型

输入参数

名称

类型

说明

SourceBizObjectSchemaCode

System.String

源数据模型编码

SourceBizObjectId

System.String

源数据实体ID

SourceDataField

System.String

源附件类型数据项编码

DestBizObjectSchemaCode

System.String

目标数据模型编码

DestBizObjectId

System.String

目标数据实体ID

DestDataField

System.String

目标附件类型数据项编码

Override

System.Boolean

是否覆盖模式

返回值

 

方法名称:AttachBizObject(System.String,System.String[],System.String,System.String,System.String)

方法说明

更新附件

输入参数

名称

类型

说明

UserId

System.String

操作用户ID

Attachments

System.String[]

附件ID集合

BizObjectSchemaCode

System.String

数据模型编码

BizObjectId

System.String

数据实体ID

DataField

System.String

数据项名称

返回值

 

方法名称:UpdateAttachment(System.String,System.String,System.String,System.String,System.String,System.String,System.Byte[],System.Int64)

方法说明

更新附件内容

输入参数

名称

类型

说明

BizObjectSchemaCode

System.String

数据模型编码

BizObjectId

System.String

数据实体ID

AttachmentID

System.String

附件ID

ModifiedBy

System.String

修改人

FileName

System.String

文件名称

ContentType

System.String

文件类型

Content

System.Byte[]

文件内容

FileFlag

System.Int64

附件打开模式

返回值

 

方法名称:UpdateAttachmentWeChatMediaID(System.String,System.String,System.DateTime)

方法说明

更新微信中的多媒体文件ID

输入参数

名称

类型

说明

AttachmentID

System.String

附件ID

WeChatMediaID

System.String

微信多媒体文件ID

WeChatMediaExpireTime

System.DateTime

微信多媒体文件过期时间

返回值

 

方法名称:AddBizQuery(OThinker.H3.DataModel.BizQuery)

方法说明

注册 BizQuery 对象

输入参数

名称

类型

说明

Query

OThinker.H3.DataModel.BizQuery

查询对象

返回值

返回操作是否成功

 

方法名称:UpdateBizQuery(OThinker.H3.DataModel.BizQuery)

方法说明

更新 BizQuery 对象

输入参数

名称

类型

说明

Query

OThinker.H3.DataModel.BizQuery

查询对象

返回值

返回操作是否成功

 

方法名称:SaveBizQuery(OThinker.H3.DataModel.BizQuery)

方法说明

注册 BizQuery 对象(Add/Update)

输入参数

名称

类型

说明

Query

OThinker.H3.DataModel.BizQuery

查询对象

返回值

返回操作是否成功

 

方法名称:RemoveBizQuery(OThinker.H3.DataModel.BizQuery)

方法说明

移除BizQuery对象

输入参数

名称

类型

说明

Query

OThinker.H3.DataModel.BizQuery

查询对象

返回值

 

方法名称:GetBizQuery(System.String)

方法说明

获取BizQuery对象

输入参数

名称

类型

说明

QueryCode

System.String

查询编码

返回值

查询对象

 

方法名称:GetBizQueries(System.String)

方法说明

根据数据模型编码获取查询对象的集合

输入参数

名称

类型

说明

SchemaCode

System.String

数据模型编码

返回值

查询对象的集合

 

方法名称:GetScheduleInvoker(System.String)

方法说明

获得定期调用的设置

输入参数

名称

类型

说明

ScheduleInvokerId

System.String

定期调用的ID

返回值

定期调用的设置

 

方法名称:GetScheduleInvokerList(System.String)

方法说明

获得定期调用的设置

输入参数

名称

类型

说明

SchemaCode

System.String

业务对象模式编码

返回值

定期调用的设置列表

 

方法名称:AddScheduleInvoker(OThinker.H3.DataModel.ScheduleInvoker)

方法说明

注册监听器

输入参数

名称

类型

说明

ScheduleInvoker

OThinker.H3.DataModel.ScheduleInvoker

监听器

返回值

如果成功则返回true;否则返回false

 

方法名称:UpdateScheduleInvoker(OThinker.H3.DataModel.ScheduleInvoker)

方法说明

更新一个监听器

输入参数

名称

类型

说明

ScheduleInvoker

OThinker.H3.DataModel.ScheduleInvoker

监听器

返回值

如果成功则返回true;否则返回false

 

方法名称:RemoveScheduleInvoker(System.String)

方法说明

删除一个监听器

输入参数

名称

类型

说明

ScheduleInvokerId

System.String

监听器ID,不区分大小写

返回值

如果成功则返回true;否则返回false

 

方法名称:RegisterListener(OThinker.H3.DataModel.BizListener)

方法说明

注册一个监听器

输入参数

名称

类型

说明

Listener

OThinker.H3.DataModel.BizListener

监听器

返回值

如果注册成功,则返回true;否则返回false

 

方法名称:RemoveListener(OThinker.H3.DataModel.BizListener)

方法说明

删除一个监听器

输入参数

名称

类型

说明

Listener

OThinker.H3.DataModel.BizListener

监听器

返回值

 

方法名称:GetListenersBySchemaCode(System.String)

方法说明

获得某个业务对象模式下的所有监听

输入参数

名称

类型

说明

SchemaCode

System.String

业务对象模式编码

返回值

所有的监听

 

方法名称:ValidateBizObjectSchema(System.String)

方法说明

检验数据模型

输入参数

名称

类型

说明

SchemaCode

System.String

数据模型编码

返回值

返回检验结果

 

方法名称:SetPropertyValue(System.String,System.String,System.String,System.String,System.Object)

方法说明

设置数据项的值

输入参数

名称

类型

说明

BizObjectSchemaCode

System.String

数据模型编码

BizObjectId

System.String

数据实体ID

UserId

System.String

用户ID

PropertyName

System.String

数据项名称

PropertyValue

System.Object

数据项的值

返回值

返回更新是否成功

 

方法名称:SetPropertyValues(System.String,System.String,System.String,System.Collections.Generic.Dictionary{System.String,System.Object})

方法说明

设置数据项的值

输入参数

名称

类型

说明

BizObjectSchemaCode

System.String

数据模型编码

BizObjectId

System.String

数据实体ID

UserId

System.String

用户ID

PropertyNameValues

System.Collections.Generic.Dictionary{System.String

数据项(名称,值)的集合

返回值

返回更新是否成功

 

方法名称:AddBizObjectAcl(OThinker.H3.Acl.BizObjectAcl)

方法说明

添加数据项模型权限

输入参数

名称

类型

说明

Acl

OThinker.H3.Acl.BizObjectAcl

数据模型权限对象

返回值

返回更新是否成功

 

方法名称:UpdateBizObjectAcl(OThinker.H3.Acl.BizObjectAcl)

方法说明

更新权限

输入参数

名称

类型

说明

Acl

OThinker.H3.Acl.BizObjectAcl

数据模型权限对象

返回值

 

 

方法名称:RemoveBizObjectAcl(System.String,System.String,System.String)

方法说明

删除数据项模型权限

输入参数

名称

类型

说明

SchemaCode

System.String

数据模型编码

FolderId

System.String

文件夹ID

AclID

System.String

权限ID

返回值

 

方法名称:RemoveBizObjectAcls(System.String,System.String,System.String[])

方法说明

删除数据项模型权限

输入参数

名称

类型

说明

SchemaCode

System.String

数据模型编码

FolderId

System.String

文件夹ID

AclIDs

System.String[]

权限ID集合

返回值

 

方法名称:GetBizObjectAcls(System.String,System.String)

方法说明

根据数据模型编码、文件夹获取权限信息

输入参数

名称

类型

说明

SchemaCode

System.String

数据模型编码

FolderId

System.String

文件夹ID

返回值

返回权限对象的集合

 

方法名称:GetBizObjectAcl(System.String,System.String,System.String)

方法说明

根据模型编码、文件夹、ID获取业务权限

输入参数

名称

类型

说明

SchemaCode

System.String

数据模型编码

FolderId

System.String

文件夹ID

AclId

System.String

权限ID

返回值

返回业务权限对象

 

方法名称:GetBizObjectUserAcls(System.String,System.String,System.String[])

方法说明

根据数据模型编码、文件夹、用户获取权限信息

输入参数

名称

类型

说明

SchemaCode

System.String

数据模型编码

FolderId

System.String

文件夹ID

Users

System.String[]

用户集合

返回值

返回权限对象的集合

 

方法名称:CheckSchemaCodeDuplicated(System.String,System.String@)

方法说明

检测数据模型编码是否重复

输入参数

名称

类型

说明

SchemaCode

System.String

数据模型编码

Message

System.String@

返回的错误信息

返回值

重复返回false,没重复返回true

18 类:OThinker.H3.DataModel.IBizObjectTrackManager

说明:数据痕迹管理器

访问入口:this.Engine.BizObjectTrackManager

示例:

this.Engine.BizObjectTrackManager.Query("BizobjectID","ItemName");

 

方法名称:Add(OThinker.H3.DataModel.BizObjectPropertyTrack[])

方法说明

添加痕迹记录

输入参数

名称

类型

说明

Tracks

OThinker.H3.DataModel.BizObjectPropertyTrack[]

要记录的痕迹

返回值

 

方法名称:QueryTable(System.String,System.String)

方法说明

查询痕迹

输入参数

名称

类型

说明

BizObjectId

System.String

业务对象的ID

ItemName

System.String

项名称

返回值

痕迹表,里面会包含修改时间、修改人、活动名称和修改后的值等信息

 

方法名称:Query(System.String,System.String)

方法说明

查询某个数据项的痕迹记录

输入参数

名称

类型

说明

BizObjectId

System.String

业务对象的ID

ItemName

System.String

项名称

返回值

痕迹记录的ID

 

方法名称:GetTrack(System.String)

方法说明

读取一个记录

输入参数

名称

类型

说明

TrackID

System.String

痕迹记录的ID

返回值

痕迹记录

 

方法名称:RemoveBizObject(System.String)

方法说明

删除流程

输入参数

名称

类型

说明

BizObjectId

System.String

业务对象的ID

返回值

19 类:OThinker.H3.DataModel.IFilePolicyManager

说明:文件存储策略管理器

访问入口:this.Engine.FilePolicyManager

示例:

this.Engine.FilePolicyManager.GetFileServer("编码")

 

方法名称:GetFileServers

方法说明

获取所有文件服务器的存储策略集合

输入参数

名称

类型

说明

返回值

返回所有文件存储服务器对象的集合

 

方法名称:UpdateFileServer(OThinker.H3.DataModel.FileServer)

方法说明

更新文件存储服务器

输入参数

名称

类型

说明

Server

OThinker.H3.DataModel.FileServer

文件服务器对象

返回值

返回更新是否成功

 

方法名称:GetFileServer(System.String)

方法说明

根据编码获取文件存储服务器

输入参数

名称

类型

说明

Code

System.String

文件服务器编码

返回值

返回文件服务器对象实例

 

方法名称:AddFileServer(OThinker.H3.DataModel.FileServer)

方法说明

增加文件存储服务器

输入参数

名称

类型

说明

Server

OThinker.H3.DataModel.FileServer

文件服务器对象

返回值

返回添加是否成功

 

方法名称:RemoveFileServer(System.String)

方法说明

移除文件存储服务器

输入参数

名称

类型

说明

Code

System.String

文件服务器编码

返回值

返回移除是否成功

 

方法名称:SetDefault(System.String,System.Boolean)

方法说明

设置指定服务器编码是否为默认存储服务器

输入参数

名称

类型

说明

Code

System.String

文件服务器编码

Default

System.Boolean

是否设置为默认存储服务器

返回值

返回设置是否成功

20 类:OThinker.H3.Analytics.IAnalyzer

说明:BPA服务接口

访问入口:this.Engine.Analyzer

示例:

this.Engine.Analyzer.GetReportSource("SourceID")

 

方法名称:OThinker.H3.Analytics.Reporting.ReportSource

方法说明

构造函数

输入参数

名称

类型

说明

返回值

 

方法名称:AddReportSource(OThinker.H3.Analytics.Reporting.ReportSource)

方法说明

添加报表数据源

输入参数

名称

类型

说明

Source

OThinker.H3.Analytics.Reporting.ReportSource

报表数据源对象

返回值

返回添加是否成功

 

方法名称:GetReportSource(System.String)

方法说明

根据ID获取报表数据源

输入参数

名称

类型

说明

SourceID

System.String

数据源ID

返回值

返回报表数据源

 

方法名称:GetReportSourceByCode(System.String)

方法说明

根据编码获取报表数据源

输入参数

名称

类型

说明

SourceCode

System.String

数据源编码

返回值

返回报表数据源

 

方法名称:GetReportSources

方法说明

获取所有报表数据源

输入参数

名称

类型

说明

返回值

返回报表数据源集合

 

方法名称:RemoveReportSource(System.String)

方法说明

删除报表数据源

输入参数

名称

类型

说明

SourceID

System.String

数据源ID

返回值

返回移除报表数据源是否成功

 

方法名称:UpdateReportSource(OThinker.H3.Analytics.Reporting.ReportSource)

方法说明

更新报表数据源配置

输入参数

名称

类型

说明

Source

OThinker.H3.Analytics.Reporting.ReportSource

报表数据源对象

返回值

返回更新是否成功

 

方法名称:GetReportTemplate(System.String)

方法说明

获取报表模板

输入参数

名称

类型

说明

ObjectID

System.String

报表模板ID

返回值

返回报表模板

 

方法名称:GetReportTemplateByCode(System.String)

方法说明

获取报表模板

输入参数

名称

类型

说明

Code

System.String

报表模板编码

返回值

返回报表模板

 

方法名称:GetReportTemplatesByType(OThinker.H3.Analytics.Reporting.ReportType)

方法说明

根据报表类型,获取报表模板

输入参数

名称

类型

说明

ReportType

OThinker.H3.Analytics.Reporting.ReportType

报表类型

返回值

返回报表模板集合

 

方法名称:GetAllReportTemplates

方法说明

获取所有报表模板

输入参数

名称

类型

说明

返回值

返回报表模板集合

 

方法名称:GetReportTemplateByFolderCode(System.String)

方法说明

根据目录编码,获取报表

输入参数

名称

类型

说明

FolderCode

System.String

目录编码

返回值

返回报表模板集合

 

方法名称:AddReportTemplate(OThinker.H3.Analytics.Reporting.ReportTemplate)

方法说明

添加报表模板

输入参数

名称

类型

说明

ReportTemplate

OThinker.H3.Analytics.Reporting.ReportTemplate

报表模板对象

返回值

返回添加是否成功

 

方法名称:RemoveReportTemplate(System.String)

方法说明

删除报表模板

输入参数

名称

类型

说明

ObjectID

System.String

报表模板对象ID

返回值

返回删除是否成功

 

方法名称:UpdateReportTemplate(OThinker.H3.Analytics.Reporting.ReportTemplate)

方法说明

更新报表模板

输入参数

名称

类型

说明

ReportTemplate

OThinker.H3.Analytics.Reporting.ReportTemplate

报表模板对象

返回值

返回更新是否成功

21 类:OThinker.H3.WorkItem.IAgencyManager

说明:委托关系管理器。当系统向用户A发送一个工作项的时候,会首先检查委托设置,如果存在委托,则发给委托人

访问入口:this.Engine.AgencyManager

示例:

this.Engine.AgencyManager.GetAgency("ID")

 

方法名称:Add(OThinker.H3.WorkItem.Agency)

方法说明

添加一个委托关系

输入参数

名称

类型

说明

Agency

OThinker.H3.WorkItem.Agency

委托关系对象

返回值

返回操作是否成功

 

方法名称:Update(OThinker.H3.WorkItem.Agency)

方法说明

更新一个委托关系对象

输入参数

名称

类型

说明

Agency

OThinker.H3.WorkItem.Agency

委托关系对象

返回值

返回操作是否成功

 

方法名称:GetUserAgencies(System.String)

方法说明

通过委托人ID,获得所有委托给该用户、并且当前已经生效的所有委托设置

输入参数

名称

类型

说明

UserID

System.String

委托人ID

返回值

所有已经生效的委托关系

 

方法名称:GetAgent(System.String,System.String,System.String)

方法说明

通过委托人ID,获得用户的当前生效的、最终的受托人

输入参数

名称

类型

说明

UserID

System.String

委托人ID

WorkflowCode

System.String

流程模板编码

Originator

System.String

流程的发起人

返回值

如果没有找到最终代理人,则返回为Null

 

方法名称:Remove(System.String)

方法说明

删除一个委托关系

输入参数

名称

类型

说明

AgencyID

System.String

委托关系ID

返回值

 

方法名称:RemoveWorkflow(System.String)

方法说明

当流程模板被删除的时候,调用该方法,删除相关的委托关系

输入参数

名称

类型

说明

WorkflowCode

System.String

流程模板编码

返回值

 

方法名称:GetAgency(System.String)

方法说明

读取一个委托关系

输入参数

名称

类型

说明

AgencyID

System.String

委托关系ID

返回值

委托关系

 

方法名称:Exists(System.String,System.String,System.String)

方法说明

检查委托关系定义是否已经存在。请注意,这里不区分是否已经生效,凡事定义的,即使没有生效也算存在。

输入参数

名称

类型

说明

UserID

System.String

委托人ID

WorkflowCode

System.String

流程模板编码

Originator

System.String

流程发起人

返回值

是否存在关系定义

 

方法名称:CheckWorkItemAgency(System.String,System.String,System.String,System.String)

方法说明

检查User与Agent就某个工作流模板是否存在当前已经生效的工作委托关系

输入参数

名称

类型

说明

UserID

System.String

委托人ID

AgentID

System.String

受托人ID

WorkflowCode

System.String

流程模板编码

Originator

System.String

发起人

返回值

是否存在委托关系

 

方法名称:CheckOriginateAgency(System.String,System.String,System.String)

方法说明

检查User与Agent就某个工作流模板是否存在当前已经生效的发起委托关系

输入参数

名称

类型

说明

UserID

System.String

委托人ID

AgentID

System.String

受托人ID

WorkflowCode

System.String

流程模板编码

返回值

是否存在委托关系

 

方法名称:GetOriginateAgencyTable(System.String,System.String,System.Data.DataTable,System.String)

方法说明

将没有发起权限的流程模板去掉

输入参数

名称

类型

说明

UserID

System.String

委托人

AgentID

System.String

被委托人

WorkflowTable

System.Data.DataTable

所有委托人可以发起的流程

ColumnCode

System.String

WorkflowTable的WorkflowCode列的列名称

返回值

被委托人可以帮助委托人发起的所有流程模板的表

 

方法名称:GetOriginateOriginators(System.String)

方法说明

获得发起委托给AgentID的委托人

输入参数

名称

类型

说明

AgentID

System.String

被委托人,禁止为空

返回值

委托关系

22 类:OThinker.H3.WorkItem.IConsultancyManager

说明:自动征询意见的关系管理器

访问入口:this.Engine.ConsultancyManager

示例:

this.Engine.ConsultancyManager.GetConsultancy("ID");

 

方法名称:Save(OThinker.H3.WorkItem.Consultancy)

方法说明

将征询关系信息保存起来

输入参数

名称

类型

说明

Consultancy

OThinker.H3.WorkItem.Consultancy

自动征询意见关系

返回值

 

方法名称:Remove(System.String)

方法说明

删除一个征询关系信息

输入参数

名称

类型

说明

ConsultancyID

System.String

自动征询意见设置的ID

返回值

 

方法名称:RemoveWorkflow(System.String)

方法说明

当流程模板被删除的时候,调用该方法,删除相关的委托关系

输入参数

名称

类型

说明

WorkflowCode

System.String

流程模板编码

返回值

 

方法名称:GetConsultancy(System.String)

方法说明

读取一个征询关系信息

输入参数

名称

类型

说明

ConsultancyID

System.String

自动征询意见设置的ID

返回值

自动征询意见设置

 

方法名称:Exists(System.String,System.String,System.String)

方法说明

检查征询关系信息是否已经存在

输入参数

名称

类型

说明

UserID

System.String

用户ID

WorkflowCode

System.String

流程模板编码

Originator

System.String

发起人范围

返回值

如果征询意见关系已经存在,则返回true,否则返回false

 

方法名称:GetUserConsultancies(System.String)

方法说明

获得某个用户所有当前有效的自动征询意见关系设置

输入参数

名称

类型

说明

UserID

System.String

用户ID

返回值

该用户的所有当前有效的自动征询意见关系

 

方法名称:GetConsultancyByRelationship(System.String,System.String,System.String[])

方法说明

获得用户的征询关系

输入参数

名称

类型

说明

UserID

System.String

用户ID

WorkflowCode

System.String

流程模板编码

OriginatorMemberOfs

System.String[]

发起人所属,包括自己

返回值

如果没有找到最终征询关系人,则返回为Null

23 类:OThinker.H3.Exceptions.IExceptionManager

说明:异常管理器

访问入口:this.Engine.ExceptionManager

示例:

this.Engine.ExceptionManager.NotifyException

 

方法名称:

NotifyException(System.String,System.Int32,System.String,OThinker.H3.Instance.RuntimeObjectType,System.String,System.Boolean,OThinker.H3.Instance.RuntimeObjectAction,System.String,System.String,System.String)

方法说明

通知异常

输入参数

名称

类型

说明

WorkflowCode

System.String

流程模板编码

WorkflowVersion

System.Int32

流程模板版本号

InstanceId

System.String

流程实例的ID

SourceRuntimeObjectType

OThinker.H3.Instance.RuntimeObjectType

异常源对象的类型

SourceElementName

System.String

异常源对象的名称

Block

System.Boolean

是否阻塞流程

SourceRuntimeObjectAction

OThinker.H3.Instance.RuntimeObjectAction

异常源对象造成异常的动作,比如:流程启动、活动结束事件等

Message

System.String

异常信息

SequenceNo

System.String

流水号

Originator

System.String

发起人

返回值

 

方法名称:GetUnfixedExceptions

方法说明

获得未修复的异常记录

输入参数

名称

类型

说明

返回值

 

 

方法名称:GetExceptions(System.DateTime,System.DateTime)

方法说明

获得某个时间段的所有异常记录

输入参数

名称

类型

说明

From

System.DateTime

开始时间

To

System.DateTime

结束时间

返回值

在时间段内发生的异常的记录

 

方法名称:GetExceptionsByInstance(System.String)

方法说明

获得一个实例的所有异常情况

输入参数

名称

类型

说明

InstanceId

System.String

流程实例的ID

返回值

流程实例的所有异常

 

方法名称:FixException(System.String)

方法说明

修复一个异常

输入参数

名称

类型

说明

ExceptionID

System.String

异常信息的ID

返回值

如果修复成功,则返回0,否则返回异常信息

 

方法名称:RemoveInstance(System.String)

方法说明

删除一个实例的异常

输入参数

名称

类型

说明

InstanceId

System.String

流程实例的ID

返回值

 

方法名称:GetException(System.String)

方法说明

获得某个异常的具体信息

输入参数

名称

类型

说明

ExceptionID

System.String

异常记录的ID

返回值

异常信息

 

方法名称:QueryTable(System.String,System.DateTime,System.DateTime,OThinker.H3.Exceptions.ExceptionState)

方法说明

查询当前存在的异常

输入参数

名称

类型

说明

InstanceId

System.String

流程实例的ID

From

System.DateTime

开始时间

To

System.DateTime

结束时间

State

OThinker.H3.Exceptions.ExceptionState

异常记录的状态,Unspecified表示不区分异常状态

返回值

异常表

24 类:OThinker.H3.Instance.IInstanceManager

说明:流程实例管理器

访问入口:this.Engine.InstanceManager

示例:

this.Engine.InstanceManager.GetInstanceContext("流程实例ID");

 

方法名称:

CreateInstance(System.String,System.String,System.Int32,System.String,System.String,System.String,System.String,System.String,System.Boolean,System.String,System.String,System.Int32)

方法说明

创建一个流程实例

输入参数

名称

类型

说明

BizObjectId

System.String

业务对象的ID

WorkflowCode

System.String

流程模板编码

WorkflowVersion

System.Int32

流程版本号

InstanceId

System.String

流程实例的ID,如果为空则由Engine自动生成一个

InstanceName

System.String

流程实例的名称

Originator

System.String

发起人

OriginatedGroup

System.String

以哪个组的身份发起流程的

OriginatedPost

System.String

以哪个岗位的身份发起流程的

IsChildInstance

System.Boolean

是否是子实例

ParentInstanceID

System.String

如果是子实例,则该项为父实例的ID

ParentActivityName

System.String

如果是子实例,则该项为发起该实例的父实例的Activity的ID

ParentActivityTokenId

System.Int32

如果是子实例,则该项为发起该实例的父实例的TokenID

返回值

如果创建成功则返回实例的ID,否则返回NullInstanceID

 

方法名称:CreateInstanceByDefault(System.String,System.String,System.String,System.String)

方法说明

创建流程实例

输入参数

名称

类型

说明

BizObjectId

System.String

数据实例ID

WorkflowCode

System.String

流程模板编码

InstanceName

System.String

流程实例名称

Originator

System.String

发起人

返回值

 

 

方法名称:GetInstanceContext(System.String)

方法说明

获得一个实例的状态

输入参数

名称

类型

说明

InstanceId

System.String

流程实例的ID

返回值

流程实例的上下文

 

方法名称:GetInstanceContextsByBizObject(System.String,System.String)

方法说明

根据BizObjectID获取流程实例集合

输入参数

名称

类型

说明

SchemaCode

System.String

数据模型编码

BizObjectId

System.String

业务实例ID

返回值

返回当前数据所有绑定的流程实例的集合

 

方法名称:GetParentInstanceInfo(System.String)

方法说明

获得父流程的工作流信息

输入参数

名称

类型

说明

InstanceId

System.String

流程实例的ID

返回值

父流程实例信息

 

方法名称:SendMessages(OThinker.H3.Messages.Message[])

方法说明

发送消息给流程实例,以驱动流程实例的运行

输入参数

名称

类型

说明

Messages

OThinker.H3.Messages.Message[]

发送给流程实例的消息

返回值

 

方法名称:SendMessage(OThinker.H3.Messages.Message)

方法说明

发送消息给流程实例,以驱动流程实例的运行

输入参数

名称

类型

说明

Message

OThinker.H3.Messages.Message

发送给流程实例的消息

返回值

 

方法名称:SetInstanceName(System.String,System.String)

方法说明

设置流程实例显示名称

输入参数

名称

类型

说明

InstanceId

System.String

流程实例ID

InstanceName

System.String

流程实例名称

返回值

 

 

方法名称:SetInstancePriority(System.String,OThinker.H3.Instance.PriorityType)

方法说明

设置流程实例紧急程度

输入参数

名称

类型

说明

InstanceId

System.String

流程实例ID

Priority

OThinker.H3.Instance.PriorityType

紧急程度

返回值

 

 

方法名称:IncNextInstanceSeqID(System.String)

方法说明

增加一个流水号,并返回一个新的流水号

输入参数

名称

类型

说明

WorkflowCode

System.String

流程模板编码

返回值

新的流程实例的流水号

 

方法名称:ResetSeqNo(System.DateTime)

方法说明

重置流水号,该方法只能每天被调用一次,且最多只能被调用一次。该方法只能由Engine的定时器调用,不能被外部系统调用。

输入参数

名称

类型

说明

Now

System.DateTime

当前时间

返回值

 

方法名称:RemoveInstance(System.String,System.Boolean)

方法说明

删除流程实例

输入参数

名称

类型

说明

InstanceId

System.String

要删除的流程实例的ID

AutoUpdateBizObject

System.Boolean

删除之后,是否需要更新BO.RunningInstanceId字段

返回值

25 类:OThinker.H3.Instance.IInstanceSimulationManager

说明:流程模拟管理器

访问入口:this.Engine.SimulationManager

示例:

this.Engine.SimulationManager.AddSimulation(new Instance.InstanceSimulation());

 

方法名称:GetSimulation(System.String)

方法说明

获取单个流程案例

输入参数

名称

类型

说明

ObjectID

System.String

流程模拟ID

返回值

返回流程模拟对象

 

方法名称:GetSimulations(System.String[])

方法说明

获取单个流程案例

输入参数

名称

类型

说明

ObjectID

System.String[]

流程模拟ID

返回值

返回流程模拟对象

 

方法名称:GetSimulationList(System.String)

方法说明

获取单个测试集

输入参数

名称

类型

说明

ObjectID

System.String

测试集ID

返回值

返回流程模拟对象

 

方法名称:AddSimulationList(OThinker.H3.Instance.InstanceSimulationList)

方法说明

新增一个流程案例

输入参数

名称

类型

说明

SimulationList

OThinker.H3.Instance.InstanceSimulationList

测试集对象

返回值

返回添加是否成功

 

方法名称:AddSimulation(OThinker.H3.Instance.InstanceSimulation)

方法说明

新增一个流程案例

输入参数

名称

类型

说明

Simulation

OThinker.H3.Instance.InstanceSimulation

流程模拟对象

返回值

返回添加是否成功

 

方法名称:UpdateSimulation(OThinker.H3.Instance.InstanceSimulation)

方法说明

更新流程案例

输入参数

名称

类型

说明

Simulation

OThinker.H3.Instance.InstanceSimulation

流程模拟对象

返回值

返回更新是否成功

 

方法名称:UpdateSimulationList(OThinker.H3.Instance.InstanceSimulationList)

方法说明

更新流程测试集

输入参数

名称

类型

说明

SimulationList

OThinker.H3.Instance.InstanceSimulationList

测试集对象

返回值

返回更新是否成功

 

方法名称:RemoveSimulation(System.String[])

方法说明

删除模拟

输入参数

名称

类型

说明

SimulationIDs

System.String[]

流程模拟ID集合

返回值

 

方法名称:RemoveSimulationList(System.String[])

方法说明

删除测试集

输入参数

名称

类型

说明

SimulationListIDs

System.String[]

测试集ID集合

返回值

 

方法名称:RunSimulation(System.String[])

方法说明

运行选定的案例

输入参数

名称

类型

说明

SimulationIds

System.String[]

流程模拟ID集合

返回值

 

方法名称:RunSimulationList(System.String[])

方法说明

运行选定的测试集

输入参数

名称

类型

说明

SimulationListIds

System.String[]

测试集ID集合

返回值

 

方法名称:GetSimulationByWorkflow(System.String)

方法说明

获取指定模板的所有流程案例

输入参数

名称

类型

说明

WorkflowCode

System.String

流程模板编码

返回值

返回流程模拟对象的集合

 

方法名称:GetSimulationListByWorkflow(System.String)

方法说明

获取指定模板的所有流程测试集

输入参数

名称

类型

说明

WorkflowCode

System.String

流程模板编码

返回值

返回流程模拟对象的集合

26 类:OThinker.H3.Data.IMetadataRepository

说明:数据字典接口

访问入口:this.Engine.MetadataRepository

示例:

this.Engine.MetadataRepository.Add(new Data.EnumerableMetadata());

 

方法名称:ExistPrimitiveItem(System.String)

方法说明

检查全局变量名称是否已经存在

输入参数

名称

类型

说明

ItemName

System.String

项目名称

返回值

返回是否存在

 

方法名称:CreatePrimitiveItem(System.String,System.String,System.String)

方法说明

创建一个全局变量

输入参数

名称

类型

说明

ItemName

System.String

变量名称

Description

System.String

描述信息

ItemValue

System.String

变量值

返回值

如果成功,则返回0,否则返回错误代码 OThinker.H3.ErrorCode

 

方法名称:GetPrimitiveItemValue(System.String)

方法说明

获取一个全局变量

输入参数

名称

类型

说明

ItemName

System.String

全局变量名称

返回值

全局变量值

 

方法名称:SetPrimitiveItemValue(System.String,System.String,System.String)

方法说明

设置一个全局变量的值

输入参数

名称

类型

说明

ItemName

System.String

全局变量名称

ItemValue

System.String

全局变量值

返回值

如果成功,则返回0,否则返回错误代码 OThinker.H3.ErrorCode

 

方法名称:GetAllPrimitiveItems

方法说明

获取所有的全局变量名称的集合

输入参数

名称

类型

说明

返回值

全局变量名称集合

 

方法名称:RemovePrimitiveItem(System.String)

方法说明

删除一个全局变量

输入参数

名称

类型

说明

ItemName

System.String

全局变量名称

返回值

 

方法名称:GetPrimitiveItem(System.String)

方法说明

根据名称获取单个全局变量

输入参数

名称

类型

说明

ItemName

System.String

全局变量名称

返回值

全局变量

 

方法名称:ParseText(System.String)

方法说明

解析一段文本,将文本中的{}标记的数据转换为数据的值

输入参数

名称

类型

说明

Text

System.String

解析的公式

返回值

 

 

方法名称:Remove(System.String)

方法说明

删除主数据

输入参数

名称

类型

说明

ObjectId

System.String

要删除的主数据的ID

返回值

 

方法名称:RemoveByCategory(System.String)

方法说明

删除某个类型的主数据

输入参数

名称

类型

说明

Category

System.String

要删除的主数据的类型

返回值

 

方法名称:Add(OThinker.H3.Data.EnumerableMetadata)

方法说明

新增主数据项

输入参数

名称

类型

说明

Data

OThinker.H3.Data.EnumerableMetadata

主数据

返回值

返回是否保存成功

 

方法名称:Update(OThinker.H3.Data.EnumerableMetadata)

方法说明

更新主数据

输入参数

名称

类型

说明

Data

OThinker.H3.Data.EnumerableMetadata

要更新的主数据

返回值

返回是否保存成功

 

方法名称:GetByCategory(System.String)

方法说明

获得某个类型下的所有主数据

输入参数

名称

类型

说明

Category

System.String

类型代码

返回值

所有主数据

 

方法名称:GetValuesByCategory(System.String)

方法说明

获得所有主数据的值

输入参数

名称

类型

说明

Category

System.String

类型代码

返回值

所有主数据的值

 

方法名称:GetById(System.String)

方法说明

通过ID获得主数据

输入参数

名称

类型

说明

ObjectId

System.String

 

返回值

 

 

方法名称:GetByCode(System.String,System.String)

方法说明

通过类型和编码获取单个数据字典对象

输入参数

名称

类型

说明

Category

System.String

数据字典类型

Code

System.String

数据字典编码

返回值

数据字典对象

 

方法名称:GetCategoryTable

方法说明

获取所有的数据字典

输入参数

名称

类型

说明

返回值

返回数据字典类型的集合

 

方法名称:GetChildren(System.String,OThinker.H3.Data.MasterDataState)

方法说明

通过父对象的编码获得子成员

输入参数

名称

类型

说明

ParentCode

System.String

父对象编码

State

OThinker.H3.Data.MasterDataState

状态

返回值

子成员

 

方法名称:GetTreeItemsByCode(System.String[])

方法说明

根据编码获得主数据对象

输入参数

名称

类型

说明

Codes

System.String[]

要读取的主数据的项目的代码

返回值

主数据对象

 

方法名称:GetTreeItemByCode(System.String)

方法说明

根据编码获得主数据对象

输入参数

名称

类型

说明

Code

System.String

要读取的主数据的项目的代码

返回值

主数据对象

 

方法名称:SetTreeItemState(System.String,OThinker.H3.Data.MasterDataState)

方法说明

设置数据的状态

输入参数

名称

类型

说明

Code

System.String

主数据对象编码

State

OThinker.H3.Data.MasterDataState

主数据的状态

返回值

 

方法名称:SaveTreeItem(OThinker.H3.Data.TreeMetadata)

方法说明

保存树状主数据

输入参数

名称

类型

说明

Item

OThinker.H3.Data.TreeMetadata

主数据对象

返回值

如果保存成功,则返回true,否则返回false

 

方法名称:RemoveTreeItem(System.String)

方法说明

删除树型主数据的节点

输入参数

名称

类型

说明

Code

System.String

要删除的节点的编码

返回值

 

方法名称:SetDefaultItem(System.String,System.Boolean)

方法说明

设置默认

输入参数

名称

类型

说明

ObjectID

System.String

 

Default

System.Boolean

 

返回值

 

27 类:OThinker.H3.Notification.INotifier

说明:用于管理通知的接口

访问入口:this.Engine.Notifier

示例:

this.Engine.Notifier.Notify(new Notification.Notification());

 

方法名称:Notify(OThinker.H3.Notification.Notification)

方法说明

通知对外发送的消息

输入参数

名称

类型

说明

Notification

OThinker.H3.Notification.Notification

要发送的通知

返回值

 

方法名称:SetState(System.String,OThinker.H3.Notification.NotificationState)

方法说明

设置为已读

输入参数

名称

类型

说明

NotificationId

System.String

通知的ID

返回值

28 类:OThinker.H3.Settings.ISettingManager

说明:设置管理器,通过这个接口,我们可以获得全局性的设置信息,比如:显示的格式、流水号的格式等

访问入口:this.Engine.SettingManager

示例:

this.Engine.SettingManager.SetCustomSetting("名称","值");

 

方法名称:GetCustomSetting(System.String)

方法说明

获得自定义设置的值

输入参数

名称

类型

说明

SettingName

System.String

设置的名称

返回值

设置的值

 

方法名称:GetDisabledMobiles

方法说明

获得MobileSID

输入参数

名称

类型

说明

返回值

MobileSID

 

方法名称:AddDisabledMobile(System.String)

方法说明

添加MobileSID

输入参数

名称

类型

说明

MobileSID

System.String

MobileSID

返回值

如果设置成功,则返回true,否则返回false

 

方法名称:RemoveDisabledMobile(System.String)

方法说明

移除MobileSID

输入参数

名称

类型

说明

MobileSID

System.String

MobileSID

返回值

如果设置成功,则返回true,否则返回false

 

方法名称:SetCustomSetting(System.String,System.String)

方法说明

设置自定义设置的值

输入参数

名称

类型

说明

SettingName

System.String

设置的名称

SettingValue

System.String

设置的值

返回值

如果设置成功,则返回true,否则返回false

 

方法名称:GetSheetSettings

方法说明

为了提高性能,一次性获得所有跟Portal相关的设置

输入参数

名称

类型

说明

返回值

跟Portal相关的设置

 

方法名称:ResetSeqNo(System.DateTime)

方法说明

重置流水号,该方法只能每天被调用一次,且最多只能被调用一次。该方法只能由Engine的定时器调用,不能被外部系统调用。

输入参数

名称

类型

说明

Now

System.DateTime

当前时间

返回值

 

方法名称:IncNextInstanceSeqID

方法说明

获得当前新的流程ID,然后下一个流程ID自加一

输入参数

名称

类型

说明

返回值

流水号

 

方法名称:GetPageSetting(System.String)

方法说明

获得页面的设置

输入参数

名称

类型

说明

PageLocalPath

System.String

页面的地址

返回值

页面设置

 

方法名称:GetControlSettings(System.String,System.String)

方法说明

获得控件的所有设置

输入参数

名称

类型

说明

PageLocalPath

System.String

页面的地址

ControlID

System.String

空间的ID

返回值

空间的设置

 

方法名称:UpdateSetting(OThinker.H3.Settings.PageSetting)

方法说明

更新设置

输入参数

名称

类型

说明

Setting

OThinker.H3.Settings.PageSetting

页面设置

返回值

 

方法名称:GetIntAndInc(System.String,System.Int32)

方法说明

获得一个数据的值,然后对这个值加1

输入参数

名称

类型

说明

SettingName

System.String

设置的名称

InitialValue

System.Int32

初始值

返回值

如果参数为空则返回-1;如果设置不存在,则创建一个并返回InitialValue;否则,返回当前数值,然后对数值加一保存

 

方法名称:AddBizDbConnectionConfig(OThinker.H3.Settings.BizDbConnectionConfig)

方法说明

添加一个数据库的连接配置

输入参数

名称

类型

说明

Config

OThinker.H3.Settings.BizDbConnectionConfig

配置

返回值

如果添加成功,则返回true;否则返回false

 

方法名称:GetBizDbConnectionConfig(System.String)

方法说明

获得一个数据库连接配置

输入参数

名称

类型

说明

Code

System.String

配置编码

返回值

数据库连接配置

 

方法名称:GetBizDbConnectionConfigList

方法说明

获得数据库连接配置的列表

输入参数

名称

类型

说明

返回值

所有的数据库连接配置

 

方法名称:RemoveBizDbConnectionConfig(System.String)

方法说明

删除一个数据库连接配置,如果正在由事务引用到,则无法删除

输入参数

名称

类型

说明

DbCode

System.String

数据库的编码

返回值

如果数据库连接不存在,或者正在被事务引用,则无法被删除,将返回false;否则返回true

 

方法名称:UpdateBizDbConnectionConfig(OThinker.H3.Settings.BizDbConnectionConfig)

方法说明

更新一个数据库连接配置

输入参数

名称

类型

说明

Config

OThinker.H3.Settings.BizDbConnectionConfig

连接配置

返回值

如果一数据库连接配置存在,并且编码属性没有被修改,则返回true;否则返回false

 

方法名称:GetBizDbTableColumns(System.String,System.String)

方法说明

获得特定表的结构

输入参数

名称

类型

说明

DbCode

System.String

数据库编号

TableName

System.String

表名称

返回值

表结构

 

方法名称:GetBizDbTableNames(System.String)

方法说明

获得业务数据库里的所有数据表名称

输入参数

名称

类型

说明

DbCode

System.String

业务数据库编号

返回值

所有的表名称

 

方法名称:GetBizDbViewNames(System.String)

方法说明

获得业务数据库里的所有视图名称

输入参数

名称

类型

说明

DbCode

System.String

业务数据库编号

返回值

所有的视图名称

29 类:OThinker.H3.WorkItem.IUrgencyManager

说明:催办管理器

访问入口:this.Engine.UrgencyManager

示例:

this.Engine.UrgencyManager.Urge("催办人ID","流程实例ID","催办内容");

 

方法名称:Urge(System.String,System.String,System.String)

方法说明

催办

输入参数

名称

类型

说明

Urger

System.String

催办人

InstanceId

System.String

催办的流程实例ID

Content

System.String

催办的内容

返回值

 

方法名称:GetUrgency(System.String)

方法说明

获得催办信息

输入参数

名称

类型

说明

UrgencyID

System.String

催办记录的ID

返回值

催办的详细信息

30 类:OThinker.H3.Tracking.IUserLogWriter

说明:用户操作日志

访问入口:this.Engine.UserLogWriter

示例:

this.Engine.UserLogWriter.Write(new Tracking.UserLog());

 

方法名称:Write(OThinker.H3.Tracking.UserLog)

方法说明

写入日志

输入参数

名称

类型

说明

Log

OThinker.H3.Tracking.UserLog

要写入的用户操作日志

返回值

 

方法名称:OnUserLogInOut(OThinker.H3.Tracking.UserLog[],System.String,System.Int32)

方法说明

当用户登录/出的时候调用该日志接口

输入参数

名称

类型

说明

Logs

OThinker.H3.Tracking.UserLog[]

要写入的日志

ServerName

System.String

服务器名称

OnlineUserCount

System.Int32

在线用户数的数量

返回值

 

方法名称:ClearPortalOnlineUser(System.String)

方法说明

清空Portal服务器上的在线用户数的记录

输入参数

名称

类型

说明

ServerName

System.String

服务器名称

返回值

31 类:OThinker.H3.WorkflowTemplate.IWorkflowManager

说明:流程模板管理器,用于发布、获得、更新流程模板信息

访问入口:this.Engine.WorkflowManager

示例:

this.Engine.WorkflowManager.GetDefaultWorkflow("流程模板编码");

 

方法名称:GetDraftTemplate(System.String)

方法说明

获取设计中的流程模板

输入参数

名称

类型

说明

WorkflowCode

System.String

流程模板编码

返回值

返回流程模板草稿对象

 

方法名称:SaveDraftTemplate(System.String,OThinker.H3.WorkflowTemplate.DraftWorkflowTemplate)

方法说明

保存设计中的流程模板

输入参数

名称

类型

说明

UserID

System.String

设计人

DraftWorkflowTemplate

OThinker.H3.WorkflowTemplate.DraftWorkflowTemplate

流程模板草稿对象

返回值

返回操作是否成功

 

方法名称:RegisterWorkflow(System.String,System.String,System.Boolean)

方法说明

注册一个流程

输入参数

名称

类型

说明

Publisher

System.String

发布这个流程模板的人员

WorkflowCode

System.String

流程模板编码

SetDefaultVersion

System.Boolean

是否设置为默认版本

返回值

返回注册结果

 

方法名称:GetDefaultWorkflow(System.String)

方法说明

获得默认版本的流程模板

输入参数

名称

类型

说明

WorkflowCode

System.String

流程模板编码

返回值

返回已发布的流程模板对象

 

方法名称:GetDefaultWorkflowHeaders(System.String[])

方法说明

批量获取默认版本的流程模板头信息

输入参数

名称

类型

说明

WorkflowCodes

System.String[]

流程模板编码集合

返回值

获取已发布的流程模板头信息集合

 

方法名称:GetClause(System.String)

方法说明

获得流程模板族定义

输入参数

名称

类型

说明

WorkflowCode

System.String

流程模板编码

返回值

流程模板族

 

方法名称:GetClausesBySchemaCode(System.String)

方法说明

根据数据模型获取流程族

输入参数

名称

类型

说明

SchemaCode

System.String

 

返回值

 

 

方法名称:GetClausesBySchemaCodes(System.String[])

方法说明

根据数据模型数组批量获取流程族

输入参数

名称

类型

说明

SchemaCodes

System.String[]

流程包编码集合

返回值

返回流程模板运行参数集合

 

方法名称:RemoveClause(System.String)

方法说明

移除模板族

输入参数

名称

类型

说明

WorkflowCode

System.String

流程模板编码

返回值

 

方法名称:GetPublishedTemplate(System.String,System.Int32)

方法说明

获取发布后的流程模板

输入参数

名称

类型

说明

WorkflowCode

System.String

流程模板编码

WorkflowVersion

System.Int32

流程版本号

返回值

返回流程模板对象

 

方法名称:GetPublishedTemplateHeader(System.String,System.Int32)

方法说明

获取发布后的流程模板头信息

输入参数

名称

类型

说明

WorkflowCode

System.String

流程模板编码

WorkflowVersion

System.Int32

流程版本号

返回值

返回流程模板头信息

 

方法名称:GetPublishedTemplateHeaders(System.String)

方法说明

获取流程模板的所有已发布历史版本集合

输入参数

名称

类型

说明

WorkflowCode

System.String

流程模板编码

返回值

返回指定流程模板的所有已发布历史版本集合

 

方法名称:GetWorkflowVersions(System.String)

方法说明

获得某个流程编码的所有版本号

输入参数

名称

类型

说明

WorkflowCode

System.String

流程模板编码

返回值

返回指定流程模板的所有版本号集合

 

方法名称:GetWorkflowDefaultVersion(System.String)

方法说明

获得某个流程的当前默认版本号

输入参数

名称

类型

说明

WorkflowCode

System.String

流程模板编码

返回值

流程模板的当前默认版本号

 

方法名称:SetWorkflowDefaultVersion(System.String,System.Int32)

方法说明

设置某个流程的默认版本号

输入参数

名称

类型

说明

WorkflowCode

System.String

流程模板编码

DefaultVersion

System.Int32

 

返回值

如果设置成功,则返回0,否则返回错误代码

 

方法名称:GetWorkflowNewVersion(System.String)

方法说明

获得某个流程的新版本号,这个版本号并不一定能够作为新版本,因为可能获得这个版本的时候其他地方又重新发布了一个新版本

输入参数

名称

类型

说明

WorkflowCode

System.String

流程模板编码

返回值

流程模板的下一个版本号

 

方法名称:SetWorkflowState(System.String,OThinker.H3.WorkflowTemplate.WorkflowState)

方法说明

设置工作流模板的状态

输入参数

名称

类型

说明

WorkflowCode

System.String

流程模板编码

State

OThinker.H3.WorkflowTemplate.WorkflowState

流程模板的状态

返回值

如果设置成功则返回0,否则返回错误代码

 

方法名称:GetWorkflowState(System.String)

方法说明

获得工作流模板的状态

输入参数

名称

类型

说明

WorkflowCode

System.String

流程模板编码

返回值

获得流程模板的状态

 

方法名称:GetWorkflowCount

方法说明

获得工作流模板的数量

输入参数

名称

类型

说明

返回值

流程模板的数量

 

方法名称:RemoveWorkflowTemplate(System.String,System.Int32)

方法说明

移除已发布的流程模板。这里需要指定具体某一个流程模板。

输入参数

名称

类型

说明

WorkflowCode

System.String

流程模板编码

WorkflowVersion

System.Int32

流程模板版本号

返回值

 

方法名称:GetClauseDisplayName(System.String)

方法说明

获得一个流程模板的显示名称的全名称

输入参数

名称

类型

说明

WorkflowCode

System.String

流程模板编码

返回值

流程模板的显示名称

 

方法名称:GetTemplateDisplayName(System.String,System.Int32)

方法说明

获得一个流程模板的显示名称的全名称

输入参数

名称

类型

说明

WorkflowCode

System.String

流程模板编码

WorkflowVersion

System.Int32

流程模板版本号

返回值

流程模板的显示名称

 

方法名称:UpdateClause(OThinker.H3.WorkflowTemplate.WorkflowClause)

方法说明

更新流程模板族

输入参数

名称

类型

说明

WorkflowClause

OThinker.H3.WorkflowTemplate.WorkflowClause

流程模板运行参数对象

返回值

返回修改是否成功,0:表示成功

 

方法名称:AddClause(OThinker.H3.WorkflowTemplate.WorkflowClause)

方法说明

添加流程模板族

输入参数

名称

类型

说明

WorkflowClause

OThinker.H3.WorkflowTemplate.WorkflowClause

流程模板运行参数对象

返回值

返回添加是否成功,0:表示成功

 

方法名称:GetCalendarReferences(System.String)

方法说明

获得哪些流程模板族引用了该工作日历

输入参数

名称

类型

说明

CalendarId

System.String

工作日历ID,不区分大小写

返回值

引用该工作日历的流程模板族

 

方法名称:GetParentNodesByWorkflowCodes(System.Collections.Generic.List{System.String})

方法说明

根据流程编码获取所有的父节点

输入参数

名称

类型

说明

WorkflowCodes

System.Collections.Generic.List{System.String}

流程模板编码集合

返回值

返回所有指定流程包的父节点

32 类:OThinker.H3.Calendar.IWorkingCalendarManager

说明:工作日历接口方法

访问入口:this.Engine.WorkingCalendarManager

示例:

this.Engine.WorkingCalendarManager.GetCalendar("工作日历ID");

 

方法名称:GetCalendar(System.String)

方法说明

获取日历缓存数据

输入参数

名称

类型

说明

CalendarId

System.String

 

返回值

 

 

方法名称:GetCalendarList

方法说明

获取所有的日期类型

输入参数

名称

类型

说明

返回值

 

 

方法名称:GetWorkingDays(System.String)

方法说明

获取日历的日期信息

输入参数

名称

类型

说明

CalendarId

System.String

日历ID

返回值

 

 

方法名称:GetWorkingDaysBySpan(System.String,System.DateTime,System.DateTime)

方法说明

获取日历的日期信息

输入参数

名称

类型

说明

CalendarId

System.String

日历ID

StartDate

System.DateTime

 

EndDate

System.DateTime

 

返回值

 

 

方法名称:AddCalendar(OThinker.H3.Calendar.WorkingCalendar,System.Collections.Generic.Dictionary{System.String,System.Boolean},System.Collections.Generic.List{OThinker.H3.Calendar.WorkingTimeSpan})

方法说明

初始化工作日历

输入参数

名称

类型

说明

Calendar

OThinker.H3.Calendar.WorkingCalendar

日期类型实体类

WeekWorkingDayTable

System.Collections.Generic.Dictionary{System.String

是否工作日期

WorkingTimeSpans

System.Boolean}

工作时间

返回值

 

方法名称:UpdateCalendar(OThinker.H3.Calendar.WorkingCalendar)

方法说明

更新工作日历,不更新日期和工作时间

输入参数

名称

类型

说明

Calendar

OThinker.H3.Calendar.WorkingCalendar

 

返回值

 

方法名称:UpdateCalendarRule(System.String,System.DateTime,System.DateTime,System.Collections.Generic.Dictionary{System.String,System.Boolean},System.Collections.Generic.List{OThinker.H3.Calendar.WorkingTimeSpan})

方法说明

更新工作日历,更新日期和工作时间,每次更新时,只设置当前日期的规则,不删除旧日期规则

输入参数

名称

类型

说明

CalendarId

System.String

日历的ID

StartDate

System.DateTime

要更新的日期的开始日期,如果超过范围会抛出ArgumentOutOfRangeException的异常

EndDate

System.DateTime

要更新的日期的结束日期,如果超过范围会抛出ArgumentOutOfRangeException的异常

DefaultWorkingDayTable

System.Collections.Generic.Dictionary{System.String

是否工作日期

WorkingTimeSpans

System.Boolean}

工作时间

返回值

 

方法名称:GetWorkingDay(System.String,System.DateTime)

方法说明

获取日期信息

输入参数

名称

类型

说明

CalendarId

System.String

 

Date

System.DateTime

 

返回值

 

 

方法名称:UpdateWorkingDay(OThinker.H3.Calendar.WorkingDay)

方法说明

保存日期

输入参数

名称

类型

说明

WorkingDay

OThinker.H3.Calendar.WorkingDay

 

返回值

 

 

方法名称:GetExceptionalDays(System.String,System.DateTime,System.DateTime)

方法说明

查询例外日期

输入参数

名称

类型

说明

CalendarId

System.String

日历ID

FromTime

System.DateTime

开始日期

ToTime

System.DateTime

结束日期

返回值

 

 

方法名称:RemoveCalendar(System.String)

方法说明

删除日历

输入参数

名称

类型

说明

CalendarId

System.String

日历ID

返回值

 

 

方法名称:ExistsDefaultCalendar

方法说明

获取是否存在默认日历

输入参数

名称

类型

说明

返回值

 

 

方法名称:GetOrgCalendar(System.String)

方法说明

获得某个组织结构对应的工作日历

输入参数

名称

类型

说明

OrgId

System.String

组织结构ID

返回值

工作日历

 

方法名称:GetUsedTimeByCompanyCalendar(System.DateTime,System.DateTime)

方法说明

获取集团公司工作日历耗费时间

输入参数

名称

类型

说明

StartTime

System.DateTime

开始时间

EndTime

System.DateTime

结束时间

返回值

 

 

方法名称:GetUsedTimeByOrgCalendar(System.String,System.DateTime,System.DateTime)

方法说明

获取组织工作日历耗费时间

输入参数

名称

类型

说明

OrgId

System.String

当前组织

StartTime

System.DateTime

开始时间

EndTime

System.DateTime

结束时间

返回值

 

 

方法名称:GetUsedTimeByWorkflowCalendar(System.String,System.DateTime,System.DateTime)

方法说明

获取流程模板维度工作日历耗费时间

输入参数

名称

类型

说明

WorkflowCode

System.String

流程模板编码

StartTime

System.DateTime

开始时间

EndTime

System.DateTime

结束时间

返回值

 

 

方法名称:GetUsedTimeByCalendar(System.String,System.DateTime,System.DateTime)

方法说明

获取用户自定义日历的工作时间

输入参数

名称

类型

说明

CalendarId

System.String

自定义日历的ID

StartTime

System.DateTime

开始时间

EndTime

System.DateTime

结束时间

返回值

 

 

方法名称:GetDelayedTimeByCompanyCalendar(System.DateTime,System.TimeSpan)

方法说明

获取集团公司日历的某个时间段后的工作时间

输入参数

名称

类型

说明

StartTime

System.DateTime

输入时间

Delay

System.TimeSpan

延后的时间

返回值

延迟时间段后的工作时间

 

方法名称:GetDelayedTimeByOrgCalendar(System.String,System.DateTime,System.TimeSpan)

方法说明

获取当前组织的某个时间段后的工作时间

输入参数

名称

类型

说明

OrgId

System.String

组织ID

StartTime

System.DateTime

输入时间

Delay

System.TimeSpan

延迟时间段

返回值

延迟时间段后的工作时间

 

方法名称:GetDelayedTimeByWorkflowCalendar(System.String,System.DateTime,System.TimeSpan)

方法说明

获取流程模板日历的某个时间段后的工作时间

输入参数

名称

类型

说明

WorkflowCode

System.String

流程模板编码

StartTime

System.DateTime

输入时间

Delay

System.TimeSpan

延迟时间段

返回值

延迟时间段后的工作时间

 

方法名称:GetDelayedTimeByCalendar(System.String,System.DateTime,System.TimeSpan)

方法说明

获取用户自定义日历某个时间段后的工作时间

输入参数

名称

类型

说明

CalendarId

System.String

日历ID

StartTime

System.DateTime

输入时间

Delay

System.TimeSpan

延迟时间段

返回值

延迟时间段后的工作时间

33 类:OThinker.H3.WorkItem.IWorkItemManager

说明:工作项管理器

访问入口:this.Engine.WorkItemManager

示例:

this.Engine.WorkItemManager.GetWorkItem("工作任务ID");

 

方法名称:OThinker.H3.Configs.License

方法说明

构造函数

输入参数

名称

类型

说明

返回值

 

方法名称:OThinker.Licenses.LicenseException

方法说明

构造函数

输入参数

名称

类型

说明

返回值

 

方法名称:OThinker.Licenses.LicenseException(System.String)

方法说明

构造函数

输入参数

名称

类型

说明

Message

System.String

 

返回值

 

方法名称:OThinker.H3.Configs.LicenseProvider

方法说明

构造函数

输入参数

名称

类型

说明

返回值

 

方法名称:OThinker.H3.Daemons.Daemon(OThinker.H3.IEngine)

方法说明

构造函数

输入参数

名称

类型

说明

Engine

OThinker.H3.IEngine

 

返回值

 

方法名称:OThinker.H3.Data.PrimitiveMetadata

方法说明

从数据库中读取

输入参数

名称

类型

说明

返回值

 

方法名称:OThinker.H3.Data.PrimitiveMetadata(System.String,System.String,System.String)

方法说明

创建的时候使用

输入参数

名称

类型

说明

ItemName

System.String

数据的名称

Description

System.String

数据的描述

Value

System.String

数据的值

返回值

 

方法名称:OThinker.H3.Sheet.BizSheet

方法说明

构造函数

输入参数

名称

类型

说明

返回值

 

方法名称:OThinker.H3.Sheet.BizSheet(System.String,System.String,System.String,OThinker.H3.Sheet.SheetType,System.String,System.String)

方法说明

新建的构造函数

输入参数

名称

类型

说明

BizObjectSchemaCode

System.String

数据模型编码

SheetCode

System.String

表单编码

SheetName

System.String

表单名称

SheetType

OThinker.H3.Sheet.SheetType

表单类型

SheetAddress

System.String

如果是自定义表单的话,这里记录表单的URL地址,可以是相对地址

MobileSheetAddress

System.String

如果是自定义表单的话,这里记录表单的移动终端URL地址,可以是相对地址

返回值

 

方法名称:OThinker.H3.WorkflowTemplate.ActivityConfig

方法说明

从数据库反序列化的构造函数

输入参数

名称

类型

说明

返回值

 

方法名称:AddWorkItem(OThinker.H3.WorkItem.WorkItem)

方法说明

为某个用户添加一项工作。 1、这里需要将该作业直接添加到数据库中,否则无法实时地检索出来 2、添加一个作业的时候,需要在这里设置他的被添加时间,而不能以创建的时间为准,因为创建的时间可能来自于其他服务器或者客户端,这就有可能涉及时区的问题,如果以外部的时间为准就无法统一了。 3、如果WorkItem是发起活动的任务的话,那么不会调用委托关系。

输入参数

名称

类型

说明

WorkItem

OThinker.H3.WorkItem.WorkItem

要添加的工作项

返回值

新添加的对象的ID

 

方法名称:AddWorkItems(OThinker.H3.WorkItem.WorkItem[])

方法说明

添加一组用户作业,这样可以保证事务化,以防有的作业刚刚添加就被完成了。

输入参数

名称

类型

说明

WorkItems

OThinker.H3.WorkItem.WorkItem[]

新增的工作项

返回值

添加的工作项的ID

 

方法名称:InstanceFinished(System.String)

方法说明

流程完成的时候调用。取消掉非传阅类的所有未完成工作项

输入参数

名称

类型

说明

InstanceId

System.String

流程ID

返回值

返回取消的数量

 

方法名称:InstanceCanceld(System.String)

方法说明

流程取消的时候调用。取消掉所有未完成的工作项。

输入参数

名称

类型

说明

InstanceId

System.String

流程ID

返回值

返回取消的数量

 

方法名称:ActivityActivated(System.String,System.Int64)

方法说明

活动被取回的时候调用

输入参数

名称

类型

说明

InstanceId

System.String

流程ID

TokenID

System.Int64

步骤ID

返回值

返回取消的数量

 

方法名称:ActivityFinished(System.String,System.Int64)

方法说明

活动完成的时候调用。取消掉非传阅类的所有未完成工作项。

输入参数

名称

类型

说明

InstanceId

System.String

流程ID

TokenID

System.Int64

步骤ID

返回值

返回取消的数量

 

方法名称:ActivityCanceled(System.String,System.Int64)

方法说明

活动被取消的时候调用。取消掉所有未完成的工作项。

输入参数

名称

类型

说明

InstanceId

System.String

流程ID

TokenID

System.Int64

步骤ID

返回值

返回取消的数量

 

方法名称:CancelWorkItem(System.String,System.Boolean)

方法说明

取消一个工作项。相应的征询意见的工作项也会被取消。

输入参数

名称

类型

说明

WorkItemID

System.String

工作项ID

Force

System.Boolean

是否强制取消。强制取消意味着,如果工作项处于正在工作的状态下也执行取消操作

返回值

执行结果

 

方法名称:ActivityAdjusted(System.String,System.Int64,System.String[])

方法说明

当一个活动被调整活动的时候,取消一组工作项,同时重置过去的锁

输入参数

名称

类型

说明

InstanceId

System.String

流程ID

TokenId

System.Int64

步骤ID

WorkItemsToBeCanceled

System.String[]

工作项ID

返回值

 

方法名称:GetWorkItem(System.String)

方法说明

根据作业的ID获得工作项

输入参数

名称

类型

说明

WorkItemID

System.String

工作项ID

返回值

获得的工作项

 

方法名称:ForwardWorkItem(System.String,System.String)

方法说明

委托一个任务给某人,不能创建新任务,否则引用这些任务的地方无法取消这个任务

输入参数

名称

类型

说明

WorkItemID

System.String

工作项ID

Participant

System.String

接收人

返回值

执行结果

 

方法名称:ActivateWorkItem(System.String)

方法说明

将工作项重新从取消状态激活为等待状态

输入参数

名称

类型

说明

WorkItemID

System.String

工作项ID

返回值

执行结果

 

方法名称:DoWorkItem(System.String)

方法说明

开始工作一个作业

输入参数

名称

类型

说明

WorkItemID

System.String

工作项ID

返回值

执行结果

 

方法名称:FinishWorkItem(System.String,System.String,OThinker.H3.WorkItem.AccessPoint,System.String,System.String,OThinker.Data.BoolMatchValue,System.String,System.String,OThinker.H3.WorkItem.ActionEventType,System.Int32)

方法说明

完成一个作业

输入参数

名称

类型

说明

WorkItemID

System.String

工作项ID

Finisher

System.String

提交人员

FinishAccessPoint

OThinker.H3.WorkItem.AccessPoint

提交人员的接入方式

ParticipateGroup

System.String

提交人员使用的组

ParticipatePost

System.String

提交人员使用的岗位

Approval

OThinker.Data.BoolMatchValue

审批结果

Comment

System.String

审批意见

ActionName

System.String

操作名称

ActionEventType

OThinker.H3.WorkItem.ActionEventType

操作的事件的类型:OThinker.H3.WorkItem.ActionEventType

ActionButtonType

System.Int32

操作的按钮的类型:OThinker.H3.WorkSheet.SheetButtonType,保存:2,驳回:10,提交:11

返回值

执行结果

 

方法名称:UpdateUrged(System.String,System.Boolean)

方法说明

标志一个工作项被催办过

输入参数

名称

类型

说明

WorkItemId

System.String

工作项ID

Urged

System.Boolean

是否被催办过

返回值

执行结果

 

方法名称:ConsultWorkItem(System.String,System.String,System.String[],System.String,System.Boolean)

方法说明

将某个任务发送给多个人以征询意见,这个操作也需要锁定,否则在发送任务完毕前,源任务就已经完成了。请注意:对于以任何形式参与过该步骤的人员,将不会发送征询意见的任务。比如:如果用户A已经参与了该活动,现在B向A发出征询意见的请求,那么将不会创建该征询意见的工作项。

输入参数

名称

类型

说明

Creator

System.String

申请征询意见的人

WorkItemID

System.String

源工作项ID

Consultants

System.String[]

接收征询意见的人员

WorkItemDisplayName

System.String

征询意见时创建的新任务的显示名称

MonitorConsultant

System.Boolean

监听顾问的完成/取消事件

返回值

新征询意见的任务的ID

 

方法名称:Consult(System.String,System.Int64,System.String[],System.String)

方法说明

将某个任务发送给多个人以征询意见,这个操作也需要锁定,否则在发送任务完毕前,源任务就已经完成了。该方法是提供给系统本身使用的,用于在某个活动开始的时候,执行征询意见,所以不需要指定源工作项,也不需要制定请求人。

输入参数

名称

类型

说明

InstanceId

System.String

流程ID

TokenId

System.Int64

步骤

Consultants

System.String[]

接收征询意见的人员

WorkItemDisplayName

System.String

征询意见时创建的新任务的显示名称

返回值

新征询意见的任务的ID

 

方法名称:Circulate(System.String,System.String,System.String[],System.Boolean,System.String)

方法说明

将某个任务传阅给多个人,这个操作也需要锁定,否则在发送任务完毕前,源任务就已经完成了

输入参数

名称

类型

说明

Creator

System.String

请求传阅的人员

WorkItemID

System.String

工作项ID

Receivers

System.String[]

接收传阅的人员

Recirculatable

System.Boolean

是否允许再转传阅

WorkItemDisplayName

System.String

传阅时创建的新任务的显示名称

返回值

新任务的ID

 

方法名称:AssistWorkItem(System.String,System.String,System.String[],System.String,System.Boolean,OThinker.H3.WorkItem.ReturnToType)

方法说明

协办某个工作项

输入参数

名称

类型

说明

Creator

System.String

要协办的人

WorkItemId

System.String

要协办的工作项

Assistants

System.String[]

协办者

WorkItemDisplayName

System.String

工作项名称

MonitorConsultant

System.Boolean

是否监听处理人完成/取消的事件

ReturnTo

OThinker.H3.WorkItem.ReturnToType

指定:任务完成后,返回给哪个任务。true表示返回自己,false表示返回给源任务。

返回值

协办工作项的ID

 

方法名称:Assist(System.String,System.Int64,System.String[],System.String)

方法说明

创建协助工作项。由系统本身调用,不需要指定源协办工作项,也不需要制定创建人。请注意:对于以任何形式参与过该步骤的人员,将不会发送征询意见的任务。比如:如果用户A已经参与了该活动,现在B向A发出征询意见的请求,那么将不会创建该征询意见的工作项。

输入参数

名称

类型

说明

InstanceId

System.String

流程ID

TokenId

System.Int64

步骤

Assistants

System.String[]

协办者

WorkItemDisplayName

System.String

工作项名称

返回值

新创建的工作项ID

 

方法名称:UpdatePriority(System.String,OThinker.H3.Instance.PriorityType)

方法说明

更新工作项的优先级属性

输入参数

名称

类型

说明

WorkItemID

System.String

工作项ID

Priority

OThinker.H3.Instance.PriorityType

优先级

返回值

执行结果

 

方法名称:Transfer(System.String,System.String)

方法说明

转移工作项

输入参数

名称

类型

说明

WorkItemID

System.String

工作项ID

Receiptor

System.String

接收转移的人员

返回值

执行结果

 

方法名称:SetColor(System.String,System.Int32)

方法说明

设置显示颜色

输入参数

名称

类型

说明

WorkItemID

System.String

工作项ID

ColorArgb

System.Int32

颜色

返回值

 

方法名称:UpdateDisplayName(System.String,System.String)

方法说明

更新工作项的显示名称

输入参数

名称

类型

说明

WorkItemID

System.String

工作项ID

DisplayName

System.String

显示名称

返回值

执行结果

 

方法名称:LockActivity(System.String,System.String,System.Boolean)

方法说明

锁定流程

输入参数

名称

类型

说明

LockedByWorkItemId

System.String

请求锁定的工作项的ID

LockedBy

System.String

请求锁定的用户ID

CancelOtherWorkItems

System.Boolean

是否要取消掉其他的工作项。如果为false,则不取消任何工作项,否则取消掉除“请求锁定的工作项”之外的所有工作项

返回值

锁结果

 

方法名称:DropLock(System.String,System.Boolean)

方法说明

放弃自己的锁定。用户可以显示解锁,也可以在用户提交或者取消后系统自动解锁

输入参数

名称

类型

说明

LockedByWorkItemId

System.String

请求锁定的工作项

ActivateOtherWorkItems

System.Boolean

是否重新激活曾经被自己取消的工作项

返回值

锁结果

 

方法名称:GetLocker(System.String,System.Int64)

方法说明

获得锁定的人员

输入参数

名称

类型

说明

InstanceId

System.String

流程ID

TokenId

System.Int64

步骤ID

返回值

锁定该步骤的人员

34 类:OThinker.H3.EventHandlers.IMessageEventHandler

说明:流程引擎Message处理事件接口。

部署方法:创建一个新的类库,引用H3Cloud程序集,将类继承至 IMessageEventHandler,编译成程序集后发布至H3Cloud安装目录 Server/Adapters目录下。

示例程序:

using System;

using System.Data;

using System.Configuration;

using System.Collections;

 

namespace OThinker.Demo

{

    /// <summary>

    /// EventHandler处理程序

    /// 该程序与后台消息同步执行

    /// </summary>

    public class MessageEventHandler : OThinker.H3.EventHandlers.IMessageEventHandler

    {

        /// <summary>

        /// 消息处理完成事件

        /// </summary>

        /// <param name="InstanceContext">流程实例名称</param>

        /// <param name="Message">系统消息</param>

        /// <param name="DisposalType">处理结果</param>

        public void OnInstanceMessageDisposed(H3.Instance.InstanceContext InstanceContext,

            H3.Messages.Message Message,

            H3.Messages.DisposalType DisposalType)

        {

            // TODO:这里增加逻辑代码,在系统每次处理消息完成后同步触发

        }

    }

}

 

35 类:OThinker.H3.EventHandlers.IEngineEventHandler`1

说明:引擎级对象的事件处理接口,比如:新建WorkItem事件等。注意:这里的事件都是滞后的事件,并不是实时的事件,比如:流程实例创建事件,是在新建的流程实例保存进数据库中才被触发的,而且是异步触发的。如果事件处理程序耗用大量的CPU,那么会影响引擎的性能;如果事件处理程序抛出异常,那么引擎会忽略掉这个异常。

部署方法:创建一个新的类库,引用H3Cloud程序集,将类继承至 IMessageEventHandler,编译成程序集后发布至H3Cloud安装目录 Server/Adapters目录下。

示例程序:

using System;

using System.Data;

using OThinker.H3;

 

namespace OThinker.Demo

{

    /// <summary>

    /// 监控流程实例对象的增加、删除、修改事件

    /// </summary>

    public class WorkItemHandler : OThinker.H3.EventHandlers.IEngineEventHandler<OThinker.H3.Instance.InstanceContext>

    {

        /// <summary>

        /// 流程实例创建事件

        /// </summary>

        /// <param name="Engine">引擎实例对象</param>

        /// <param name="Obj">流程实例对象</param>

        public void OnCreated(IEngine Engine, H3.Instance.InstanceContext Obj)

        {

            // TODO:你的逻辑

        }

 

        /// <summary>

        /// 流程实例删除事件

        /// </summary>

        /// <param name="Engine">引擎实例对象</param>

        /// <param name="ObjId">流程实例ID</param>

        public void OnRemoved(IEngine Engine, string ObjId)

        {

            // TODO:你的逻辑

        }

 

        /// <summary>

        /// 流程实例更新事件

        /// </summary>

        /// <param name="Engine">引擎实例对象</param>

        /// <param name="Obj">流程实例对象</param>

        public void OnUpdated(IEngine Engine, H3.Instance.InstanceContext Obj)

        {

            // TODO:你的逻辑

        }

    }

}

 

方法名称:OnCreated(OThinker.H3.IEngine,`0)

方法说明

当对象被创建的时候,调用该接口的事件处理程序

输入参数

名称

类型

说明

Engine

OThinker.H3.IEngine

流程引擎接口

Obj

`0

流程实例的上下文

返回值

 

方法名称:OnUpdated(OThinker.H3.IEngine,`0)

方法说明

当对象被变更的时候,调用该接口的事件处理程序

输入参数

名称

类型

说明

Engine

OThinker.H3.IEngine

流程引擎接口

Obj

`0

流程实例的上下文

返回值

 

方法名称:OnRemoved(OThinker.H3.IEngine,System.String)

方法说明

当对象被删除的时候,调用该接口的事件处理程序

输入参数

名称

类型

说明

Engine

OThinker.H3.IEngine

流程引擎接口

ObjId

System.String

对象的ID

返回值

36 类:OThinker.H3.EventHandlers.INotificationEventHandler

说明:消息通知 EventHandler 接口

37 类:OThinker.H3.EventHandlers.IOrganizationEventHandler

说明:组织的事件处理接口,注意:这里的事件都是滞后的事件,并不是实时的事件,比如:组织创建事件,是在新建的组织保存进数据库中才被触发的,而且是异步触发的。如果事件处理程序耗用大量的CPU,那么会影响引擎的性能;如果事件处理程序抛出异常,那么引擎会忽略掉这个异常。

38 类:OThinker.H3.EventHandlers.IInstanceEventHandler

说明:流程实例的事件处理接口,注意:这里的事件都是滞后的事件,并不是实时的事件,比如:流程实例创建事件,是在新建的流程实例保存进数据库中才被触发的,而且是异步触发的。如果事件处理程序耗用大量的CPU,那么会影响引擎的性能;如果事件处理程序抛出异常,那么引擎会忽略掉这个异常。

39 类:OThinker.H3.EventHandlers.IWorkItemEventHandler

说明:工作项的事件处理接口,注意:这里的事件都是滞后的事件,并不是实时的事件,比如:工作项创建事件,是在新建的工作项保存进数据库中才被触发的,而且是异步触发的。如果事件处理程序耗用大量的CPU,那么会影响引擎的性能;如果事件处理程序抛出异常,那么引擎会忽略掉这个异常。

部署方法:创建一个新的类库,引用H3Cloud程序集,将类继承至 IMessageEventHandler,编译成程序集后发布至H3Cloud安装目录 Server/Adapters目录下。

示例:

using System;

using System.Data;

 

namespace OThinker.Demo

{

    /// <summary>

    /// 工作任务触发事件

    /// </summary>

    public class WorkItemHandler : OThinker.H3.EventHandlers.IWorkItemEventHandler

    {

        /// <summary>

        /// 创建工作任务事件

        /// </summary>

        /// <param name="Engine">引擎实例对象</param>

        /// <param name="Obj">工作任务对象</param>

        public void OnCreated(IEngine Engine, WorkItem.WorkItem Obj)

        {

            // TODO:程序逻辑

        }

 

        /// <summary>

        /// 移除工作任务事件

        /// </summary>

        /// <param name="Engine">引擎实例对象</param>

        /// <param name="ObjId">工作任务ID</param>

        public void OnRemoved(IEngine Engine, string ObjId)

        {

            // TODO:程序逻辑

        }

 

        /// <summary>

        /// 工作任务更新事件

        /// </summary>

        /// <param name="Engine">引擎实例对象</param>

        /// <param name="Obj">工作任务对象</param>

        public void OnUpdated(IEngine Engine, WorkItem.WorkItem Obj)

        {

            // TODO:程序逻辑

        }

    }

}

40 常用方法示例

常用流程示例包含启动流程、提交、驳回、结束流程、激活活动、取消活动、取回、设置流程数据项的值等方法。

using System;

using System.Collections.Generic;

using System.Web;

using System.Web.Services;

using System.Data;

 

namespace OThinker.H3.Portal

{

    /// <summary>

    /// 流程实例操作相关接口

    /// </summary>

    [WebService(Namespace = "http://tempuri.org/")]

    [WebServiceBinding(ConformsTo = WsiProfiles.None)]

    //若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务,请取消对下行的注释。

    // [System.Web.Script.Services.ScriptService]

    public class BPMService : System.Web.Services.WebService

    {

        /// <summary>

        /// 构造函数

        /// </summary>

        public BPMService()

        {

            //如果使用设计的组件,请取消注释以下行

            //InitializeComponent();

        }

 

        private IEngine _Engine = null;

        /// <summary>

        /// 流程引擎的接口,该接口会比this.Engine的方式更快,因为其中使用了缓存

        /// </summary>

        public IEngine Engine

        {

            get

            {

                if (OThinker.H3.WorkSheet.AppConfig.ConnectionMode == ConnectionStringParser.ConnectionMode.Mono)

                {

                    return OThinker.H3.WorkSheet.AppUtility.Engine;

                }

                return _Engine;

            }

            set

            {

                _Engine = value;

            }

        }

 

        /// <summary>

        /// 查询对象

        /// </summary>

        protected Query Query

        {

            get

            {

                return this.Engine.Query;

            }

        }

 

        /// <summary>

        /// 获取用户的待办任务总数

        /// </summary>

        /// <returns></returns>

        [WebMethod(Description = "获取用户未完成的任务总数")]

        [System.Web.Services.Protocols.SoapHeader("authentication")]

        public int GetUserUnfinishedWorkItemCount()

        {

            ValidateSoapHeader();

 

            int recordCounts;

            // 构造查询用户帐号的条件

            string[] conditions = Query.GetWorkItemConditions(

                UserValidator.UserID,

                true,

                H3.WorkItem.WorkItemState.Unfinished,

                H3.WorkItem.WorkItemType.Unspecified,

                OThinker.Data.BoolMatchValue.Unspecified,

                OThinker.Data.BoolMatchValue.Unspecified);

 

            // 获取总记录数,计算页码         

            recordCounts = this.Engine.Query.CountWorkItem(conditions);

            return recordCounts;

        }

 

        /// <summary>

        /// 获取用户的已办任务总数

        /// </summary>

        /// <returns></returns>

        [WebMethod(Description = "获取用户已完成的任务总数")]

        [System.Web.Services.Protocols.SoapHeader("authentication")]

        public int GetUserFinishedWorkItemCount()

        {

            ValidateSoapHeader();

 

            int recordCounts;

            // 构造查询用户帐号的条件

            string[] conditions = Query.GetWorkItemConditions(

                UserValidator.UserID,

                true,

                H3.WorkItem.WorkItemState.Finished,

                H3.WorkItem.WorkItemType.Unspecified,

                OThinker.Data.BoolMatchValue.Unspecified,

                OThinker.Data.BoolMatchValue.Unspecified);

            // 获取总记录数,计算页码

            recordCounts = this.Engine.Query.CountWorkItem(conditions);

            return recordCounts;

        }

 

        /// <summary>

        /// 提交(已阅)工作任务

        /// </summary>

        /// <param name="workItemId"></param>

        /// <param name="commentText"></param>

        /// <returns></returns>

        [WebMethod(Description = "提交(已阅)工作任务")]

        [System.Web.Services.Protocols.SoapHeader("authentication")]

        public bool SubmitWorkItem(string workItemId, string commentText)

        {

            ValidateSoapHeader();

            // 获取操作的用户

 

            WorkItem.WorkItem item = this.Engine.WorkItemManager.GetWorkItem(workItemId);

            SubmitItem(workItemId, OThinker.Data.BoolMatchValue.True, commentText, UserValidator.UserID);

            return true;

        }

 

        /// <summary>

        /// 驳回工作任务

        /// </summary>

        /// <param name="workItemId"></param>

        /// <param name="commentText"></param>

        /// <returns></returns>

        [WebMethod(Description = "驳回工作任务")]

        [System.Web.Services.Protocols.SoapHeader("authentication")]

        public bool ReturnWorkItem(string workItemId, string commentText)

        {

            ValidateSoapHeader();

            // 获取操作的用户

 

            WorkItem.WorkItem item = this.Engine.WorkItemManager.GetWorkItem(workItemId);

            ReturnItem(UserValidator.UserID, workItemId, commentText);

 

            return true;

        }

 

        /// <summary>

        /// 结束流程

        /// </summary>

        /// <param name="instanceId">流程实例ID</param>

        /// <returns></returns>

        [WebMethod(Description = "强制结束流程")]

        [System.Web.Services.Protocols.SoapHeader("authentication")]

        public bool FinishInstance(string instanceId)

        {

            ValidateSoapHeader();

            // 获取操作的用户

 

            Instance.InstanceContext context = this.Engine.InstanceManager.GetInstanceContext(instanceId);

            if (context == null) return false;

 

            WorkflowTemplate.PublishedWorkflowTemplate workflow = this.Engine.WorkflowManager.GetDefaultWorkflow(context.WorkflowCode);

 

            Messages.ActivateActivityMessage activateMessage = new Messages.ActivateActivityMessage(

                    Messages.MessageEmergencyType.High,

                    instanceId,

                    workflow.EndActivityCode,

                    OThinker.H3.Instance.Token.UnspecifiedID,

                    null,

                    null,

                    false,

                    WorkItem.ActionEventType.Adjust

                );

            this.Engine.InstanceManager.SendMessage(activateMessage);

            return true;

        }

 

        /// <summary>

        /// 激活流程

        /// </summary>

        /// <param name="instanceId">流程实例ID</param>

        /// <returns></returns>

        [WebMethod(Description = "激活流程")]

        [System.Web.Services.Protocols.SoapHeader("authentication")]

        public bool ActiveInstance(string instanceId)

        {

            ValidateSoapHeader();

            // 获取操作的用户

 

            OThinker.H3.Messages.ActivateInstanceMessage activateMessage = new OThinker.H3.Messages.ActivateInstanceMessage(instanceId);

            this.Engine.InstanceManager.SendMessage(activateMessage);

 

            return true;

        }

 

        /// <summary>

        /// 激活指定的活动节点

        /// </summary>

        /// <param name="instanceId">流程实例ID</param>

        /// <param name="activityCode">活动节点</param>

        /// <param name="participants">活动参与者,可以指定参与者,如果为空那么取流程默认配置</param>

        /// <returns></returns>

        [WebMethod(Description = "激活指定的活动节点")]

        [System.Web.Services.Protocols.SoapHeader("authentication")]

        public bool ActiveToken(string instanceId, string activityCode, string[] participants)

        {

            ValidateSoapHeader();

 

            // 准备触发后面Activity的消息

            OThinker.H3.Messages.ActivateActivityMessage activateMessage

                = new OThinker.H3.Messages.ActivateActivityMessage(

                    OThinker.H3.Messages.MessageEmergencyType.Normal,

                    instanceId,

                    activityCode,

                    OThinker.H3.Instance.Token.UnspecifiedID,

                    participants,

                    null,

                    false,

                    H3.WorkItem.ActionEventType.Adjust);

            this.Engine.InstanceManager.SendMessage(activateMessage);

            return true;

        }

 

        /// <summary>

        /// 取消指定的活动节点

        /// </summary>

        /// <param name="instanceId">流程实例ID</param>

        /// <param name="activityCode">活动节点</param>

        /// <returns></returns>

        [WebMethod(Description = "取消指定的活动节点")]

        [System.Web.Services.Protocols.SoapHeader("authentication")]

        public bool CancelToken(string instanceId, string activityCode)

        {

            ValidateSoapHeader();

 

            // 准备触发后面Activity的消息

            OThinker.H3.Messages.CancelActivityMessage cancelMessage

                = new Messages.CancelActivityMessage(Messages.MessageEmergencyType.Normal,

                    instanceId,

                    activityCode,

                    false);

            this.Engine.InstanceManager.SendMessage(cancelMessage);

            return true;

        }

 

        /// <summary>

        /// 取回工作任务

        /// </summary>

        /// <param name="workitemId">工作任务ID</param>

        /// <returns></returns>

        [WebMethod(Description = "取回工作任务")]

        [System.Web.Services.Protocols.SoapHeader("authentication")]

        public bool RetrieveWorkItem(string workitemId)

        {

            ValidateSoapHeader();

 

            //获取工作项信息

            OThinker.H3.WorkItem.WorkItem workItem = this.Engine.WorkItemManager.GetWorkItem(workitemId);

 

            // 检查是否能够取回

            if (workItem == null) return false;

            OThinker.H3.Instance.InstanceContext context = this.Engine.InstanceManager.GetInstanceContext(workItem.InstanceId);

            // 获得当前的Token是否存在多个分支

            OThinker.H3.Instance.IToken currentToken = context.GetToken(workItem.TokenId);

            if (currentToken == null) return false;

 

            // 获得后继的Token

            int[] postTokenIds = context.GetPostTokens(workItem.TokenId);

 

            // 发送回退消息

            if (postTokenIds == null || postTokenIds.Length == 0) return false;

            else if (postTokenIds.Length > 1) return false;

 

            int postTokenId = postTokenIds[0];

            OThinker.H3.Instance.IToken postToken = context.GetToken(postTokenId);

            if (!postToken.Retrievable) return false;

 

            // 具备取回的条件

            // 记录操作日志

            //无此用户

            OThinker.H3.WorkflowTemplate.PublishedWorkflowTemplateHeader worflowTemplate = this.Engine.WorkflowManager.GetPublishedTemplateHeader(workItem.WorkflowCode, workItem.WorkflowVersion);

 

            // 记录操作用户ID

            OThinker.H3.Tracking.UserLog log = new OThinker.H3.Tracking.UserLog(

                Tracking.UserLogType.Retrieve,

                UserValidator.UserID,

                workItem.BizObjectId,

                worflowTemplate.BizObjectSchemaCode,

                workItem.InstanceId,

                workItem.WorkItemID,

                workItem.DisplayName,

                null,

                null,

                null,

                null);

            this.Engine.UserLogWriter.Write(log);

 

            // 发送取回消息

            OThinker.H3.Messages.CancelActivityMessage rollback

                    = new OThinker.H3.Messages.CancelActivityMessage(

                        OThinker.H3.Messages.MessageEmergencyType.Normal,

                        workItem.InstanceId,

                        postToken.Activity,

                        true);

            this.Engine.InstanceManager.SendMessage(rollback);

 

            return true;

        }

 

        /// <summary>

        /// 启动H3流程实例,设置主键数据项的值(私有云接口)

        /// </summary>

        /// <param name="workflowCode"></param>

        /// <param name="userAlias"></param>

        /// <param name="finishStart"></param>

        /// <param name="keyName"></param>

        /// <param name="keyValue"></param>

        /// <returns></returns>

        [WebMethod(Description = "启动H3流程实例,设置主键数据项的值")]

        public BPMServiceResult StartWorkflowWithKey(

            string workflowCode,

            string userAlias,

            bool finishStart,

            string keyName,

            string keyValue)

        {

            List<DataItemParam> paramValues = new List<DataItemParam>();

            if (!string.IsNullOrEmpty(keyName))

            {

                paramValues.Add(new DataItemParam()

                {

                    ItemName = keyName,

                    ItemValue = keyValue

                });

            }

 

            return startWorkflow(workflowCode, userAlias, finishStart, paramValues);

        }

 

        /// <summary>

        /// 启动H3流程实例

        /// </summary>

        /// <param name="workflowCode">流程模板编码</param>

        /// <param name="userCode">启动流程的用户编码</param>

        /// <param name="finishStart">是否结束第一个活动</param>

        /// <param name="paramValues">流程实例启动初始化数据项集合</param>

        /// <returns></returns>

        [System.Web.Services.Protocols.SoapHeader("authentication")]

        [WebMethod(Description = "启动H3流程实例")]

        public BPMServiceResult StartWorkflow(

            string workflowCode,

            string userCode,

            bool finishStart,

            List<DataItemParam> paramValues)

        {

            ValidateSoapHeader();

            return startWorkflow(workflowCode, userCode, finishStart, paramValues);

        }

 

        /// <summary>

        /// 设置单个流程数据项的值

        /// </summary>

        /// <param name="bizObjectSchemaCode"></param>

        /// <param name="bizObjectId"></param>

        /// <param name="keyName"></param>

        /// <param name="keyValue"></param>

        /// <returns></returns>

        [WebMethod(Description = "设置单个流程数据项的值")]

        [System.Web.Services.Protocols.SoapHeader("authentication")]

        public bool SetItemValue(string bizObjectSchemaCode, string bizObjectId, string keyName, object keyValue)

        {

            ValidateSoapHeader();

            List<DataItemParam> keyValues = new List<DataItemParam>();

            keyValues.Add(new DataItemParam()

            {

                ItemName = keyName,

                ItemValue = keyValue

            });

            return SetItemValues(bizObjectSchemaCode, bizObjectId, keyValues);

        }

 

        /// <summary>

        /// 设置批量流程数据项的值

        /// </summary>

        /// <param name="bizObjectSchemaCode"></param>

        /// <param name="bizObjectId"></param>

        /// <param name="keyValues"></param>

        /// <returns></returns>

        [WebMethod(Description = "设置批量流程数据项的值")]

        [System.Web.Services.Protocols.SoapHeader("authentication")]

        public bool SetItemValues(string bizObjectSchemaCode, string bizObjectId, List<DataItemParam> keyValues)

        {

            ValidateSoapHeader();

            // 获取操作的用户

            if (keyValues == null || keyValues.Count == 0) return false;

            Dictionary<string, object> values = new Dictionary<string, object>();

            foreach (DataItemParam param in keyValues)

            {

                values.Add(param.ItemName, param.ItemValue);

            }

            return this.Engine.BizObjectManager.SetPropertyValues(bizObjectSchemaCode, bizObjectId, UserValidatorFactory.CurrentUser.UserID, values);

        }

 

        /// <summary>

        /// 输出日志至引擎服务器

        /// </summary>

        /// <param name="message"></param>

        [WebMethod(Description = "输出日志至引擎服务器")]

        public void WriteLog(string message)

        {

            this.Engine.LogWriter.Write(message);

        }

 

        #region 工作任务私有方法 ----------------

        /// <summary>

        /// 提交工作项

        /// </summary>

        /// <param name="workItemId">工作项ID</param>

        /// <param name="approval">审批结果</param>

        /// <param name="commentText">审批意见</param>

        /// <param name="userId">处理人</param>

        private void SubmitItem(string workItemId, OThinker.Data.BoolMatchValue approval, string commentText, string userId)

        {

            // 获取工作项

            OThinker.H3.WorkItem.WorkItem item = this.Engine.WorkItemManager.GetWorkItem(workItemId);

            // 添加意见

            this.AppendComment(item, OThinker.Data.BoolMatchValue.Unspecified, commentText);

 

            // 结束工作项

            this.Engine.WorkItemManager.FinishWorkItem(

                item.ObjectID,

                userId,

                OThinker.H3.WorkItem.AccessPoint.ExternalSystem,

                null,

                null,

                approval,

                commentText,

                null,

                OThinker.H3.WorkItem.ActionEventType.Forward,

                (int)OThinker.H3.WorkSheet.SheetButtonType.Submit);

            // 需要通知实例事件管理器结束事件

            Messages.AsyncEndMessage endMessage = new OThinker.H3.Messages.AsyncEndMessage(

                    Messages.MessageEmergencyType.Normal,

                    item.InstanceId,

                    item.ActivityCode,

                    item.TokenId,

                    approval,

                    false,

                    approval,

                    true,

                    null);

            this.Engine.InstanceManager.SendMessage(endMessage);

        }

 

        /// <summary>

        /// 驳回工作任务

        /// </summary>

        /// <param name="userId"></param>

        /// <param name="workItemId"></param>

        /// <param name="commentText"></param>

        /// <returns></returns>

        private bool ReturnItem(string userId, string workItemId, string commentText)

        {

            Organization.User user = this.Engine.Organization.GetUnit(userId) as Organization.User;

            if (user == null) return false;

            // 获取工作项

            OThinker.H3.WorkItem.WorkItem item = this.Engine.WorkItemManager.GetWorkItem(workItemId);

            OThinker.H3.Instance.InstanceContext context = this.Engine.InstanceManager.GetInstanceContext(item.InstanceId);

            // ToKen

            OThinker.H3.Instance.IToken Token = context.GetToken(item.TokenId);

            int PreToken = int.Parse(Token.PreTokens[0].ToString());

            OThinker.H3.Instance.IToken PreToken1 = context.GetToken(PreToken);

            string activityName = PreToken1.Activity;

            // 添加意见

            this.AppendComment(item, OThinker.Data.BoolMatchValue.False, commentText);

            // 结束工作项

            this.Engine.WorkItemManager.FinishWorkItem(

                  item.ObjectID,

                  user.ObjectID,

                  H3.WorkItem.AccessPoint.ExternalSystem,

                  null,

                  null,

                  OThinker.Data.BoolMatchValue.False,

                  commentText,

                  null,

                  H3.WorkItem.ActionEventType.Backward,

                  (int)OThinker.H3.WorkSheet.SheetButtonType.Return);

            // 准备触发后面Activity的消息

            OThinker.H3.Messages.ActivateActivityMessage activateMessage

                = new OThinker.H3.Messages.ActivateActivityMessage(

                OThinker.H3.Messages.MessageEmergencyType.Normal,

                item.InstanceId,

                activityName,

                OThinker.H3.Instance.Token.UnspecifiedID,

                null,

                new int[] { item.TokenId },

                false,

                H3.WorkItem.ActionEventType.Backward);

 

            // 通知该Activity已经完成

            OThinker.H3.Messages.AsyncEndMessage endMessage =

                new OThinker.H3.Messages.AsyncEndMessage(

                    OThinker.H3.Messages.MessageEmergencyType.Normal,

                    item.InstanceId,

                    item.ActivityCode,

                    item.TokenId,

                    OThinker.Data.BoolMatchValue.False,

                    true,

                    OThinker.Data.BoolMatchValue.False,

                    false,

                    activateMessage);

            this.Engine.InstanceManager.SendMessage(endMessage);

            return true;

        }

 

        private BPMServiceResult startWorkflow(

            string workflowCode,

            string userCode,

            bool finishStart,

            List<DataItemParam> paramValues)

        {

            ValidateSoapHeader();

            string workItemID, keyItem, errorMessage;

            workItemID = keyItem = errorMessage = string.Empty;

            BPMServiceResult result;

 

            try

            {

                // 获取模板

                OThinker.H3.WorkflowTemplate.PublishedWorkflowTemplateHeader workflowTemplate = GetWorkflowTemplate(workflowCode);

                if (workflowTemplate == null)

                {

                    result = new BPMServiceResult(false, "流程启动失败,流程模板不存在,模板编码:" + workflowCode + "。");

                    return result;

                }

                // 查找流程发起人

                OThinker.Organization.User user = this.Engine.Organization.GetUnitByCode(userCode) as Organization.User;

                if (user == null)

                {

                    result = new BPMServiceResult(false, "流程启动失败,用户{" + userCode + "}不存在。");

                    return result;

                }

 

                OThinker.H3.DataModel.BizObjectSchema schema = this.Engine.BizObjectManager.GetPublishedSchema(workflowTemplate.BizObjectSchemaCode);

                OThinker.H3.DataModel.BizObject bo = new DataModel.BizObject(

                    this.Engine.Organization,

                    this.Engine.MetadataRepository,

                    this.Engine.BizObjectManager,

                    schema,

                    OThinker.Organization.User.SystemUserID,

                    OThinker.Organization.Company.DefaultCompanyId);

                if (paramValues != null)

                {

                    // 这里可以在创建流程的时候赋值

                    foreach (DataItemParam param in paramValues)

                    {

                        if (bo.Schema.ContainsField(param.ItemName))

                        {

                            bo[param.ItemName] = param.ItemValue;

                        }

                    }

                }

 

                bo.Create();

 

                // 创建流程实例

                string InstanceId = this.Engine.InstanceManager.CreateInstance(

                     bo.ObjectID,

                     workflowTemplate.WorkflowCode,

                     workflowTemplate.WorkflowVersion,

                     null,

                     null,

                     user.UnitID,

                     null,   // 以组的身份发起

                     null,   // 以岗位的身份发起

                     false,  //

                     Instance.InstanceContext.UnspecifiedID,

                     null,

                     Instance.Token.UnspecifiedID);

 

                // 设置紧急程度为普通

                OThinker.H3.Messages.MessageEmergencyType emergency = Messages.MessageEmergencyType.Normal;

                // 这里也可以在启动流程的时候赋值

                Dictionary<string, object> paramTables = new Dictionary<string, object>();

 

                // 启动流程的消息

                OThinker.H3.Messages.StartInstanceMessage startInstanceMessage

                    = new OThinker.H3.Messages.StartInstanceMessage(

                        emergency,

                        InstanceId,

                        paramTables,

                        Instance.PriorityType.Normal,

                        true,

                        null,

                        false,

                        OThinker.H3.Instance.Token.UnspecifiedID,

                        null);

                Engine.InstanceManager.SendMessage(startInstanceMessage);

                result = new BPMServiceResult(true, InstanceId, workItemID, "流程实例启动成功!", "");

            }

            catch (Exception ex)

            {

                result = new BPMServiceResult(false, "流程实例启动失败!错误:" + ex.ToString());

            }

            return result;

        }

 

        /// <summary>

        /// 给工作项添加审批意见

        /// </summary>

        /// <param name="item">工作项</param>

        /// <param name="approval">审批结果</param>

        /// <param name="commentText">审批意见</param>

        private void AppendComment(OThinker.H3.WorkItem.WorkItem item, OThinker.Data.BoolMatchValue approval, string commentText)

        {

            // 添加一个审批意见

            WorkflowTemplate.PublishedWorkflowTemplate workflow = this.Engine.WorkflowManager.GetPublishedTemplate(

                item.WorkflowCode,

                item.WorkflowVersion);

            // 审批字段

            string approvalDataItem = null;

            if (workflow != null)

            {

                OThinker.H3.DataModel.BizObjectSchema schema = this.Engine.BizObjectManager.GetPublishedSchema(item.BizObjectSchemaCode);

                approvalDataItem = workflow.GetDefaultCommentDataItem(schema, item.ActivityCode);

            }

            if (approvalDataItem != null)

            {

                // 创建审批

                OThinker.H3.Data.Comment comment = new Data.Comment();

                comment.Activity = item.ActivityCode;

                comment.Approval = approval;

                comment.CreatedTime = System.DateTime.Now;

                comment.DataField = approvalDataItem;

                comment.InstanceId = item.InstanceId;

                comment.BizObjectId = item.BizObjectId;

                comment.BizObjectSchemaCode = item.BizObjectSchemaCode;

                comment.OUName = this.Engine.Organization.GetName(this.Engine.Organization.GetParent(item.Participant));

                comment.Text = commentText;

                comment.TokenId = item.TokenId;

                comment.UserID = item.Participant;

 

                // 设置用户的默认签章

                Organization.Signature[] signs = this.Engine.Organization.GetSignaturesByUnit(item.Participant);

                if (signs != null && signs.Length > 0)

                {

                    foreach (Organization.Signature sign in signs)

                    {

                        if (sign.IsDefault)

                        {

                            comment.SignatureId = sign.ObjectID;

                            break;

                        }

                    }

                }

                this.Engine.BizObjectManager.AddComment(comment);

            }

        }

        #endregion

 

        /// <summary>

        /// 获取最新的流程模板

        /// </summary>

        /// <param name="workflowCode">流程模板编码</param>

        /// <returns></returns>

        private OThinker.H3.WorkflowTemplate.PublishedWorkflowTemplateHeader GetWorkflowTemplate(string workflowCode)

        {

            // 获取最新版本号

            int workflowVersion = this.Engine.WorkflowManager.GetWorkflowDefaultVersion(workflowCode);

            return GetWorkflowTemplate(workflowCode, workflowVersion);

        }

 

        /// <summary>

        /// 获取指定版本号的流程模板对象

        /// </summary>

        /// <param name="workflowCode">流程模板编码</param>

        /// <param name="workflowVersion">流程模板版本号</param>

        /// <returns></returns>

        private OThinker.H3.WorkflowTemplate.PublishedWorkflowTemplateHeader GetWorkflowTemplate(string workflowCode, int workflowVersion)

        {

            // 获取模板

            OThinker.H3.WorkflowTemplate.PublishedWorkflowTemplateHeader workflowTemplate = this.Engine.WorkflowManager.GetPublishedTemplateHeader(

                    workflowCode,

                    workflowVersion);

            return workflowTemplate;

        }

 

        public Authentication authentication;

        public Acl.UserValidator UserValidator = null;

 

        /// <summary>

        /// 验证当前用户是否正确

        /// </summary>

        /// <returns></returns>

        public void ValidateSoapHeader()

        {

            if (authentication == null)

            {

                throw new Exception("请输入身份认证信息!");

            }

            UserValidator = UserValidatorFactory.Validate(authentication.UserCode, authentication.Password);

            if (UserValidator == null)

            {

                throw new Exception("帐号或密码不正确!");

            }

            this.Engine = UserValidator.Engine;

            // this.Engine = OThinker.H3.WorkSheet.AppUtility.Engine;

        }

    }

 

    /// <summary>

    /// 身份验证类

    /// </summary>

    public class Authentication : System.Web.Services.Protocols.SoapHeader

    {

        public Authentication() { }

        public Authentication(string UserCode, string Password)

        {

            this.UserCode = UserCode;

            this.Password = Password;

        }

 

        public string UserCode { get; set; }

        public string Password { get; set; }

    }

 

    /// <summary>

    /// 流程服务返回消息类

    /// </summary>

    public class BPMServiceResult

    {

        /// <summary>

        /// 消息类构造函数

        /// </summary>

        /// <param name="success"></param>

        /// <param name="instanceId"></param>

        /// <param name="workItemId"></param>

        /// <param name="message"></param>

        public BPMServiceResult(bool success, string instanceId, string workItemId, string message, string WorkItemUrl)

        {

            this.Success = success;

            this.InstanceID = instanceId;

            this.Message = message;

            this.WorkItemID = workItemId;

            this.WorkItemUrl = WorkItemUrl;

        }

 

        /// <summary>

        /// 消息类构造函数

        /// </summary>

        /// <param name="success"></param>

        /// <param name="message"></param>

        public BPMServiceResult(bool success, string message)

            : this(success, string.Empty, string.Empty, message, string.Empty)

        {

 

        }

 

        public BPMServiceResult() { }

 

        private bool success = false;

        /// <summary>

        /// 获取或设置流程启动是否成功

        /// </summary>

        public bool Success

        {

            get { return success; }

            set { success = value; }

        }

        private string instanceId = string.Empty;

        /// <summary>

        /// 获取或设置启动的流程实例ID

        /// </summary>

        public string InstanceID

        {

            get { return instanceId; }

            set { this.instanceId = value; }

        }

        private string message = string.Empty;

        /// <summary>

        /// 获取或设置系统返回消息

        /// </summary>

        public string Message

        {

            get { return message; }

            set { this.message = value; }

        }

        private string workItemId = string.Empty;

        /// <summary>

        /// 获取或设置第一个节点的ItemID

        /// </summary>

        public string WorkItemID

        {

            get { return workItemId; }

            set { this.workItemId = value; }

        }

        private string workItemUrl = string.Empty;

        /// <summary>

        /// 获取或设置第一个节点的url

        /// </summary>

        public string WorkItemUrl

        {

            get { return workItemUrl; }

            set { this.workItemUrl = value; }

        }

    }

 

    /// <summary>

    /// 提交任务后返回对象

    /// </summary>

    [Serializable]

    public class ReturnWorkItemInfo

    {

        public ReturnWorkItemInfo() { }

        private bool isSuccess = false;

        /// <summary>

        /// 是否提交成功

        /// </summary>

        public bool IsSuccess

        {

            get { return isSuccess; }

            set { this.isSuccess = value; }

        }

        private string workItemUrl = string.Empty;

        /// <summary>

        /// 当前表单地址

        /// </summary>

        public string WorkItemUrl

        {

            get { return workItemUrl; }

            set { this.workItemUrl = value; }

        }

    }

 

    /// <summary>

    /// 数据项参数

    /// </summary>

    [Serializable]

    public class DataItemParam

    {

        private string itemName = string.Empty;

        /// <summary>

        /// 获取或设置数据项名称

        /// </summary>

        public string ItemName

        {

            get { return itemName; }

            set { this.itemName = value; }

        }

 

        private object itemValue = string.Empty;

        /// <summary>

        /// 获取或设置数据项的值

        /// </summary>

        public object ItemValue

        {

            get { return itemValue; }

            set { this.itemValue = value; }

        }

    }

}

 

 

 

 

 

 

 

41 SheetPage

SheetPage是ASPX版本所有的表单基类。

 

属性

名称

类型

说明

Approval

OThinker.Data.BoolMatchValue

获取或设置当前任务审核结果

Comment

string

获取或设置当前任务审核意见

DisplayName

string

获取当前表单显示名称

Enviroment

OThinker.H3.WorkSheet.SheetEnviroment

获取表单任务环境对象

InstanceNameEditor

SheetInstanceNameEditor

获取流程实例名称编辑控件

PortalRoot

string

获取Portal根目录路径

PriorityType

OThinker.H3.Instance.PriorityType

获取或设置当前流程实例紧急程度

 

方法

名称

参数

说明

CancelInstance

 

在表单取消流程实例时事件

CancelWorkItem

 

在表单取消工作任务时事件

GetItemEditable

string ItemName

获取指定数据项在当前任务是否可编辑

GetItemRequired

string ItemName

获取指定数据项在当前任务是否必填

GetItemTrackVisible

string ItemName

获取指定数据项在当前任务是可查看痕迹

GetItemVisible

string ItemName

获取指定数据项在当前任务是可见

GetItemValue

string ItemName, ref object Value

获取指定数据项的值

GetOptionalRecipients

SelectRecipientType SelectRecipientType

设置当前任务协助/征询/传阅的可选人范围

IsActivitySelectable

string ActivityName

当活动节点是手工选择时,设置某个活动节点是否允许被选择

LoadDataFields

 

表单加载数据项的值

OnOriginatingInstance

object Sender, OriginateInstanceEventArgs Args

流程被发起时触发事件

OnSubmit

SheetSubmitEventArgs Args

流程提交时触发事件

SaveDataFields

SheetSubmitEventArgs Args

流程保存/提交时触发,将表单上的值保存到数据项中

SetItemValue

string ItemName, object Value

设置数据项的值

ValidateAuthorization

 

权限验证方法,设置当前用户是否有权限打开表单

ValidateDataFields

SheetSubmitEventArgs Args, List<string> Errors

数据项验证方法,设置数据项在后台验证是否通过

 

 

 

 

 

posted @ 2017-06-20 11:34  一面开发一面流程  阅读(3458)  评论(0编辑  收藏  举报