PublicAPI.Processes.WorkflowInstanceELMA API Documentation
Process Instance
Access path: PublicAPI.Processes.WorkflowInstance
Methods

  NameDescription
Public methodAddComment(WorkflowInstance, String)
Add a comment to the process
Public methodAddComment(WorkflowInstance, String, User)
Public methodChangeTimer
Change timer in the process instance
Public methodCloseTimer
Close timer in the process instance
Public methodCount 
Returns the total number of objects of this type
Public methodCount(IEntityFilter)
Get Total Number of Objects by Filter
Public methodCreate
Create New Entity (without a Database entry)
Public methodDelete
Delete Object
Public methodFilter
Creates an assistant for working with the "Workflow Instance" object filter
Public methodFind(FetchOptions)
Find objects according to fetch options
Public methodFind(String)
Find objects according to the filter in the EQL language
Public methodFind(IEntityFilter, FetchOptions)
Fing objects according to fetch options and filter
Public methodFindByIdArray
Find All Objects by Array IDs
Public methodIsDirty
Check, if there are unsaved changes in the object
Public methodIsNew
Check, if the object is new (not saved in the database)
Public methodLoad(Guid)
Load by UID. If not found, an exception is invoked
Public methodLoad(Int64)
Load by ID. If not found, an exception is invoked
Public methodLoadOrCreate(Guid)
Load by ID. If not found, the new object is returned
Public methodLoadOrCreate(Int64)
Load by ID. If not found, the new object is returned
Public methodLoadOrNull(Guid)
Load by UID. If not found, null is returned
Public methodLoadOrNull(Int64)
Load by ID. If not found, null is returned
Public methodRefresh
Refresh (read over) Object from Database
Public methodSave
Save entity to database
Public methodSetResponsible(WorkflowInstance, User)
Change the process responsible
Public methodSetResponsible(WorkflowInstance, User, Boolean)
Change the process responsible
Public methodStartProcess(WorkflowProcess, String)
Start a process (without context)
Public methodStartProcess(WorkflowProcess, String, Action Object )
Public methodStartProcess(WorkflowProcess, String, Object)
Start a process
Public methodStartProcess(WorkflowProcess, String, Object, Boolean)
Start a process
Public methodTerminateProcess(WorkflowInstance)
Terminate process instance
Public methodTerminateProcess(WorkflowInstance, User)
Terminate process instance
Public methodTerminateProcess(WorkflowInstance, String)
Terminate process instance
Public methodTerminateProcess(WorkflowInstance, String, User)
Terminate process instance
Back to Top
Properties

  NameDescription
Public propertyTypeUid
Returns the unique object identifier "Workflow Instance"
Back to Top
Remarks

Section containing methods for managing process instances
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