public static bool IsCatchEvent(ProcessItemType type) { return (IsBoundaryEvent(type) || IsIntermediateCatchEvent(type) || IsStartEvent(type)); }
public static bool IsSubProcess(ProcessItemType type) { return (IsAdHocSubProcess(type) || IsTransaction(type) || type.Equals(ProcessItemType.SubProcess)); }
public static bool IsThrowEvent(ProcessItemType type) { return (IsEndEvent(type) || IsImplicitThrowEvent(type) || IsIntermediateThrowEvent(type)); }
public static bool IsChoreographyActivity(ProcessItemType type) { return (IsCallChoreography(type) || IsChoreographyTask(type) || IsSubChoreography(type)); }
public static bool IsActivity(ProcessItemType type) { return (IsSubProcess(type) || IsTask(type) || IsCallActivity(type)); }
public static bool IsFlowNode(ProcessItemType type) { return (IsActivity(type) || IsEvent(type) || IsChoreographyActivity(type) || IsGateway(type)); }
public static bool IsGateway(ProcessItemType type) { return (IsComplexGateway(type) || IsEventBasedGateway(type) || IsExclusiveGateway(type) || IsInclusiveGateway(type) || IsParallelGateway(type)); }
public static bool IsTask(ProcessItemType type) { return (IsUserTask(type) || IsBusinessRuleTask(type) || IsManualTask(type) || IsReceiveTask(type) || IsScriptTask(type) || IsSendTask(type) || IsServiceTask(type) || type.Equals(ProcessItemType.Task)); }
private async Task ProcessFlowAsync(TInstance instance, string flowId, CancellationToken cancellationToken) { var instanceFlow = await _instanceStore.GetOrAddInstanceFlowAsync(instance, flowId); var flowTask = GetFlowAsync(instance.ProcessId, flowId, cancellationToken); if (IsCanProcess(instanceFlow.Status)) { var flow = await flowTask; var executeTask = ExecuteFlowAsync(instance, flow, cancellationToken); instanceFlow.ElementType = ProcessItemType.GetItemType(flow); instanceFlow.Status = await executeTask; if (instanceFlow.Status == FlowResult.Completed) { await ExecuteCompleteAsync(instance, flow, cancellationToken); var next = ProcessNextFlow(instance, flow, cancellationToken); instanceFlow.Finnish = DateTime.Now; instanceFlow.Duration = (instanceFlow.Finnish.Value - instanceFlow.Start).Milliseconds; await next; } } }
public static bool IsEndEvent(ProcessItemType type) { return(type.Equals(ProcessItemType.EndEvent)); }
public static bool IsAdHocSubProcess(ProcessItemType type) { return(type == ProcessItemType.AdHocSubProcess); }
public static bool IsIntermediateThrowEvent(ProcessItemType type) { return(type.Equals(ProcessItemType.IntermediateThrowEvent)); }
public static bool IsImplicitThrowEvent(ProcessItemType type) { return(type.Equals(ProcessItemType.ImplicitThrowEvent)); }
public async Task <ProcessTaskEntity> CreateTaskAsync(int processInstanceId, int nodeId, string nodeName, ProcessItemType ItemType) { if (!ProcessItemCheck.IsTask(ItemType)) { throw new FlowNodeException(nodeName, "Task"); } ProcessTaskEntity task = new ProcessTaskEntity() { ProcessInstanceId = processInstanceId, FlowNodeId = nodeId, TaskId = nodeName, TaskType = ItemType, CreatedBy = GetUserId() }; TaskStore.Create(task); await SaveChangesAsync(); return(task); //TODO Add to history //AddHistory(proc.Name, pi.ProcessInstanceName, t.ProcessTaskName, string.Format("User: {0} Created Task '{1}'", user, proc.Name), user); }
public static bool IsInclusiveGateway(ProcessItemType type) { return(type.Equals(ProcessItemType.InclusiveGateway)); }
public static bool IsComplexGateway(ProcessItemType type) { return(type.Equals(ProcessItemType.ComplexGateway)); }
private async Task <FlowNodeEntity> CreateFlowNodeAsync(string flowNodeId, string flowNodeName, ProcessItemType processType, string ProcessId, int?parentFlowId = null) { FlowNodeEntity flowNode = new FlowNodeEntity() { FlowNodeId = flowNodeId, Name = flowNodeName, ItemType = processType, ParentId = parentFlowId, Processid = ProcessId }; flowNodeStore.Create(flowNode); await SaveChangesAsync(); return(flowNode); }
public static bool IsSequenceFlow(ProcessItemType type) { return(type.Equals(ProcessItemType.SequenceFlow)); }
public static bool IsBoundaryEvent(ProcessItemType type) { return(type.Equals(ProcessItemType.BoundaryEvent)); }
public static bool IsDataStoreReference(ProcessItemType type) { return(type.Equals(ProcessItemType.DataStoreReference)); }
public static bool IsDataObject(ProcessItemType type) { return(type.Equals(ProcessItemType.DataObject)); }
public static bool IsParallelGateway(ProcessItemType type) { return(type.Equals(ProcessItemType.ParallelGateway)); }
public static bool IsTransaction(ProcessItemType type) { return(type == ProcessItemType.Transaction); }
public static bool IsEvent(ProcessItemType type) { return (IsCatchEvent(type) || IsThrowEvent(type)); }
private static bool IsServiceTask(ProcessItemType type) { return(type.Equals(ProcessItemType.ServiceTask)); }
public static bool IsSubChoreography(ProcessItemType type) { return(type.Equals(ProcessItemType.SubChoreography)); }
public async Task <TProcessTask> CreateTaskAsync(TKey processInstanceId, TKey nodeId, string nodeName, ProcessItemType ItemType) { return(await Store.CreateTaskAsync(processInstanceId, nodeId, nodeName, ItemType)); }
public static bool IsChoreographyTask(ProcessItemType type) { return(type.Equals(ProcessItemType.ChoreographyTask)); }
private bool IsTask(ProcessItemType type) { return(type == ProcessItemType.UserTask || type == ProcessItemType.ManualTask); }
public static bool IsEventBasedGateway(ProcessItemType type) { return(type.Equals(ProcessItemType.EventBasedGateway)); }