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字段 |
返回值 | 无 |