/// <summary> /// Binds the group members grid. /// </summary> protected void BindWorkflowsGrid() { if (_group != null) { pnlWorkflowActivities.Visible = true; nbRoleWarning.Visible = false; gWorkflows.Visible = true; var workflowService = new WorkflowService(ctx); var qry = workflowService.Queryable("WorkflowType") .Where(w => w.ActivatedDateTime.HasValue && !w.CompletedDateTime.HasValue && w.Activities.Where(a => a.AssignedGroupId == _group.Id).FirstOrDefault() != null).OrderByDescending(w => w.ActivatedDateTime); var workflowList = qry.ToList(); List <PendingConnection> connectionList = new List <PendingConnection>(); foreach (var workflow in workflowList) { PendingConnection pc = new PendingConnection(); pc.WorkflowType = workflow.WorkflowType; pc.ActivityName = workflow.ActiveActivityNames; pc.Status = workflow.Status; pc.Id = workflow.Id; pc.ActivatedDateTime = workflow.ActivatedDateTime.Value; workflow.LoadAttributes(); string connRequest = String.Empty; var conReqAttr = workflow.AttributeValues.Where(a => a.Key == "ConnectionRequest").FirstOrDefault().Value; if (conReqAttr != null) { pc.ConnectionRequest = conReqAttr.ValueFormatted; } connectionList.Add(pc); } gWorkflows.DataSource = connectionList; gWorkflows.DataBind(); } else { pnlWorkflowActivities.Visible = false; } }
public void Reset() { OnConnectionEstablished = null; OnConnectionFailed = null; PendingConnection = null; }
private bool RemoveFromConnecting(PendingConnection pendingConnection) { PendingConnection conn; return _pendingConections.TryRemove(pendingConnection.Connection.ConnectionId, out conn) && Interlocked.CompareExchange(ref conn.Done, 1, 0) == 0; }
private void AddToConnecting(PendingConnection pendingConnection) { _pendingConections.TryAdd(pendingConnection.Connection.ConnectionId, pendingConnection); }
public void Reset() { OnConnectionEstablished = null; OnConnectionFailed = null; PendingConnection = null; }
private void AddToConnecting(PendingConnection pendingConnection) { _pendingConections.TryAdd(pendingConnection.Connection.ConnectionId, pendingConnection); }
private static void ConnectInprocSockets(Socket boundSocket, PendingConnection connection) { boundSocket.IncreaseSequenceNumber(); connection.BindPipe.SlotId = boundSocket.SlotId; // If bound socket doesn't receive identity we need to read from the pipe as we already // insert the message while creating the pipe pair if (!boundSocket.Options.ReceiveIdentity) { Frame frame; connection.BindPipe.TryRead(out frame); frame.Close(); } int inHighWatermark = 0; int outHighWatermark = 0; if (boundSocket.Options.SendHighWatermark != 0 && connection.Socket.Options.ReceiveHighwatermark != 0) inHighWatermark = boundSocket.Options.SendHighWatermark + connection.Socket.Options.ReceiveHighwatermark; if (boundSocket.Options.ReceiveHighwatermark != 0 && connection.Socket.Options.SendHighWatermark != 0) outHighWatermark = boundSocket.Options.ReceiveHighwatermark + connection.Socket.Options.SendHighWatermark; // Set the highwatermarks now as before the bound highwater marks was missing connection.ConnectPipe.SetHighWatermarks(inHighWatermark,outHighWatermark); connection.BindPipe.SetHighWatermarks(outHighWatermark, inHighWatermark); BindCommand bindCommand = new BindCommand(boundSocket, connection.BindPipe); boundSocket.Process(bindCommand); CommandDispatcher.SendInprocConnected(connection.Socket); if (connection.Socket.Options.ReceiveIdentity) { Frame identity = new Frame(); identity.Identity = true; connection.BindPipe.TryWrite(ref identity); connection.BindPipe.Flush(); } }