Process Instance
Access path: PublicAPI.Processes.WorkflowInstanceMethods
Name | Description | |
---|---|---|
AddComment(WorkflowInstance, String) |
Add a comment to the process
| |
AddComment(WorkflowInstance, String, User) | ||
ChangeTimer |
Change timer in the process instance
| |
CloseTimer |
Close timer in the process instance
| |
Count |
Returns the total number of objects of this type
| |
Count(IEntityFilter) |
Get Total Number of Objects by Filter
| |
Create |
Create New Entity (without a Database entry)
| |
Delete |
Delete Object
| |
Filter |
Creates an assistant for working with the "Workflow Instance" object filter
| |
Find(FetchOptions) |
Find objects according to fetch options
| |
Find(String) |
Find objects according to the filter in the EQL language
| |
Find(IEntityFilter, FetchOptions) |
Fing objects according to fetch options and filter
| |
FindByIdArray |
Find All Objects by Array IDs
| |
IsDirty |
Check, if there are unsaved changes in the object
| |
IsNew |
Check, if the object is new (not saved in the database)
| |
Load(Guid) |
Load by UID. If not found, an exception is invoked
| |
Load(Int64) |
Load by ID. If not found, an exception is invoked
| |
LoadOrCreate(Guid) |
Load by ID. If not found, the new object is returned
| |
LoadOrCreate(Int64) |
Load by ID. If not found, the new object is returned
| |
LoadOrNull(Guid) |
Load by UID. If not found, null is returned
| |
LoadOrNull(Int64) |
Load by ID. If not found, null is returned
| |
Refresh |
Refresh (read over) Object from Database
| |
Save |
Save entity to database
| |
SetResponsible(WorkflowInstance, User) |
Change the process responsible
| |
SetResponsible(WorkflowInstance, User, Boolean) |
Change the process responsible
| |
StartProcess(WorkflowProcess, String) |
Start a process (without context)
| |
StartProcess(WorkflowProcess, String, Action Object ) | ||
StartProcess(WorkflowProcess, String, Object) |
Start a process
| |
StartProcess(WorkflowProcess, String, Object, Boolean) |
Start a process
| |
TerminateProcess(WorkflowInstance) |
Terminate process instance
| |
TerminateProcess(WorkflowInstance, User) |
Terminate process instance
| |
TerminateProcess(WorkflowInstance, String) |
Terminate process instance
| |
TerminateProcess(WorkflowInstance, String, User) |
Terminate process instance
|
Properties
Name | Description | |
---|---|---|
TypeUid |
Returns the unique object identifier "Workflow Instance"
|
Remarks
Examples
Create an instance for the process created here
var myInstance = StartProcess(myProcess, "Process Instance Name");
Change the process owner
PublicAPI.Processes.WorkflowInstance.SetResponsible(myInstance, context.UserNewResponsible);
Add a comment
PublicAPI.Processes.WorkflowInstance.AddComment(myInstance, "Process Owner is changed successfully");
Add permissions for the new owner
//get the permission ID var permissionId = WorkflowPermissionProvider.TerminateProcess.Id; PublicAPI.Processes.Permissions.AddPermission(myInstance, permissionId, context.UserNewResponsible);
Afteradd permissions, interrupt the process instance
PublicAPI.Processes.WorkflowInstance.TerminateProcess(myInstance, "Just for Fun", context.UserNewResponsible);
See Also