PublicAPI.Processes.WorkflowProcessELMA API Documentation
Process
Access path: PublicAPI.Processes.WorkflowProcess
Methods

  NameDescription
Public methodChangeSwimlaneExecutor
Change the swimlane responsible
Public methodClearSwimlane
Clear swimlane
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 Process" 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 methodGetSwimlaneExecutor
Get the swimlane executor
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 process
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 process
Public methodSetCuratorUserRole
Set the "Curator" role to the organizational structure item
Public methodSetInformUserRole
Set the "Informed" role to the organizational structure item
Public methodSetMemberUserRole
Set the "Participant" role to the organizational structure item
Public methodSetOwnerUserRole
Set the "Owner" role to the organizational structure item
Back to Top
Properties

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

Section containing methods for managing processes
Examples

Add a process by ID

var myProcess = PublicAPI.Processes.WorkflowProcess.Load(5);

Get a process instance for the loaded process. If there are no processes, create a new one

var myInstance = PublicAPI.Processes.WorkflowProcess.Find(new Filter {Query = String.Format("Process = {0}",myProcess.Id)}, null).LastOrDefault();
if(myInstance == null) myInstance = PublicAPI.Processes.WorkflowInstance.StartProcess(myProcess, "Process Instance Name");

Change the swimlane owner

//get the swimlane 
var swimlaneElement = myInstance.Process.Diagram.Elements.OfType<SwimlaneElement>().FirstOrDefault();
PublicAPI.Processes.WorkflowProcess.ChangeSwimlaneExecutor(myInstance, swimlaneElement, context.NewExecutor);

See Also