/*----------------------------------------------------*/ protected cDataObjectList GetEvents(ProcessType aProcessType, WorkflowEventType aWorkflowEventType) { cXMLDoc aXmlDoc; XmlNode aDataObjectNode, aFiltersNode, aSortNode; string aWfProjectTaskID = ""; //if (aProcessType == ProcessType.PreAssignment) { // cDataObject aGranteeProjectDO = this.DataObjectFactory.GetDataObjectFromPrimaryKey("GranteeProject", this.GetPropertyString("GranteeProjectID")); // cDataObjectList aWfProjectTaskDOL = this.DataObjectFactory.GetDataObjectListWithFilter("WfProjectTask", "WfProjectID", aGranteeProjectDO.GetPropertyString("WfProjectID"), "WfTaskID", this.GetPropertyString("WfTaskID")); // if (aWfProjectTaskDOL != null && aWfProjectTaskDOL.Count > 0) // aWfProjectTaskID = aWfProjectTaskDOL[0].GetPropertyString("WfProjectTaskID"); //} //else { // aWfProjectTaskID = this.GetWfProjectTask().GetPropertyString("WfProjectTaskID"); //} cDataObject aGranteeProjectDO = this.DataObjectFactory.GetDataObjectFromPrimaryKey("GranteeProject", this.GetPropertyString("GranteeProjectID")); cDataObjectList aWfProjectTaskDOL = this.DataObjectFactory.GetDataObjectListWithFilter("WfProjectTask", "WfProjectID", aGranteeProjectDO.GetPropertyString("WfProjectID"), "WfTaskID", this.GetPropertyString("WfTaskID")); if (aWfProjectTaskDOL != null && aWfProjectTaskDOL.Count > 0) aWfProjectTaskID = aWfProjectTaskDOL[0].GetPropertyString("WfProjectTaskID"); aXmlDoc = this.DataObjectFactory.CreateDataObjectNode("WorkflowEvents", out aDataObjectNode, out aFiltersNode); aFiltersNode.AppendChild(this.DataObjectFactory.CreateArgumentNode(aXmlDoc, "Data", "ProcessTypeID", Convert.ToString((Int32)aProcessType))); aFiltersNode.AppendChild(this.DataObjectFactory.CreateArgumentNode(aXmlDoc, "Data", "WorkflowEventTypeID", Convert.ToString((Int32)aWorkflowEventType))); aFiltersNode.AppendChild(this.DataObjectFactory.CreateArgumentNode(aXmlDoc, "Data", "WorkflowID", aWfProjectTaskID)); aSortNode = aDataObjectNode.AppendChild(aXmlDoc.CreateSortNode()); aSortNode.AppendChild(this.DataObjectFactory.CreateArgumentNode(aXmlDoc, "Data", "SortOrder", "")); return this.DataObjectFactory.GetDataObjectList(aDataObjectNode); }
public Func <WorkflowDefinition> RaiseEvent(WorkflowEventType eventType, WorkflowDataObject workflowDataObject) { return(() => { new WorkflowEventActionExecution().RaiseEvent(eventType, workflowDataObject); return this; }); }
public void RaiseEvent(WorkflowEventType workflowEventType, WorkflowDataObject workflowDataObject) { if (!WorkflowEventRegistry().ContainsKey(workflowEventType)) { return; } WorkflowActionManager().ExecuteChain(() => WorkflowActionRegistry()[WorkflowEventRegistry()[workflowEventType].WorkflowEventActionConfig.WorkflowActionName]); }
/*----------------------------------------------------*/ protected Boolean GetEventsProcessingResult(ProcessType aProcessType, WorkflowEventType aWorkflowEventType) { cDataObjectList aWorkflowEventsDOL = GetEvents(aProcessType, aWorkflowEventType); Boolean aProcessSuccess = true; string aFilterName = ""; foreach (cDataObject aWorkflowEventsDO in aWorkflowEventsDOL) { cProcessingEvent aProcessingEvent; string aProcessDefinitionKey = aWorkflowEventsDO.GetRelatedPropertyString("EventManagerEvents.ProcessName"); aProcessingEvent = cProcessingEvent.CreateProcessingEventInstance(aProcessDefinitionKey, this.DataObjectFactory); if (aProcessType == ProcessType.PreAssignment) { aFilterName = "GranteeProjectID"; } else { aFilterName = "WfTaskAssignmentID"; } aProcessingEvent.ProcessEvent(aFilterName, this.GetPropertyString(aFilterName)); if (aProcessingEvent.StatusID < 1) { aProcessSuccess = false; break; } } return aProcessSuccess; }
public HostEventArgs(WorkflowEventType eventType, Guid instanceId, string exceptionMessage) { this.EventType = eventType; this.InstanceId = instanceId; this.ExceptionMessage = exceptionMessage; }
public HostEventArgs(WorkflowEventType eventType, Guid instanceId) { this.EventType = eventType; this.InstanceId = instanceId; }
public bool ContainsKey(WorkflowEventType key) { return(_registry.ContainsKey(key)); }
public WorkflowEventAction this[WorkflowEventType key] => _registry.ContainsKey(key) ? _registry[key] : null;
public static bool IsBoundaryTimer(this WorkflowEventType type) => type == WorkflowEventType.BoundaryForkTimer || type == WorkflowEventType.BoundaryInterruptingTimer;
public static bool IsFinish(this WorkflowEventType type) => type == WorkflowEventType.Finish;
public static bool IsScheduledStart(this WorkflowEventType type) => type == WorkflowEventType.ScheduledStart;
public static bool IsTimerStart(this WorkflowEventType type) => type == WorkflowEventType.TimerStart;
public WorkflowListenerAction(Func <WorkflowActionBaseConfig> workflowActionConfiguration, WorkflowEventType workflowEventType) : base(workflowActionConfiguration) { WorkflowEventType = workflowEventType; }