Exemplo n.º 1
0
 /// <summary>
 /// Removes all workflow participants.
 /// </summary>
 /// <param name="workflowInstanceId">The workflow instance id.</param>
 private void RemoveAllWorkflowParticipants(Guid workflowInstanceId)
 {
     WorkflowParticipantRow[] oldParticipants = WorkflowParticipantRow.List(FilterElement.EqualElement(WorkflowParticipantRow.ColumnWorkflowInstanceId, workflowInstanceId));
     foreach (WorkflowParticipantRow oldParticipant in oldParticipants)
     {
         oldParticipant.Delete();
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Creates the workflow participiant.
        /// </summary>
        /// <param name="workflowInstanceId">The workflow instance id.</param>
        /// <param name="userId">The user id.</param>
        /// <param name="entity">The entity.</param>
        private void CreateWorkflowParticipiant(Guid workflowInstanceId, int userId, WorkflowInstanceEntity entity)
        {
            WorkflowParticipantRow row = new WorkflowParticipantRow();

            row.UserId             = userId;
            row.WorkflowInstanceId = workflowInstanceId;

            // TODO: Extend Owner Processing
            row.ObjectId   = entity.OwnerDocumentId.Value;
            row.ObjectType = (int)ObjectTypes.Document;

            row.Update();
        }