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

數據項驗證方法,設置數據項在后台驗證是否通過

 

 

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM