Beispiel #1
0
        private CustomTrackingQuery Match(CustomTrackingRecord customRecord)
        {
            CustomTrackingQuery query = null;

            if (this.customTrackingQuerySubscriptions != null)
            {
                for (var i = 0; i < this.customTrackingQuerySubscriptions.Count; i++)
                {
                    //check specific and then generic
                    if (string.CompareOrdinal(this.customTrackingQuerySubscriptions[i].Name, customRecord.Name) == 0)
                    {
                        if (CheckSubscription(this.customTrackingQuerySubscriptions[i].ActivityName, customRecord.Activity.Name))
                        {
                            query = this.customTrackingQuerySubscriptions[i];
                            break;
                        }
                    }
                    else if (string.CompareOrdinal(this.customTrackingQuerySubscriptions[i].Name, "*") == 0)
                    {
                        if (CheckSubscription(this.customTrackingQuerySubscriptions[i].ActivityName, customRecord.Activity.Name))
                        {
                            query = this.customTrackingQuerySubscriptions[i];
                            break;
                        }
                    }
                }
            }
            return(query);
        }
Beispiel #2
0
 private void AddCustomTrackingSubscription(CustomTrackingQuery customQuery)
 {
     if (this.customTrackingQuerySubscriptions == null)
     {
         this.customTrackingQuerySubscriptions = new List <CustomTrackingQuery>();
     }
     this.customTrackingQuerySubscriptions.Add(customQuery);
 }
 private void AddCustomTrackingSubscription(CustomTrackingQuery customQuery)
 {
     if (this.customTrackingQuerySubscriptions == null)
     {
         this.customTrackingQuerySubscriptions = new List<CustomTrackingQuery>();
     }
     this.customTrackingQuerySubscriptions.Add(customQuery);
 }
		private PSWorkflowTrackingParticipant GetTrackingParticipant()
		{
			PSWorkflowTrackingParticipant pSWorkflowTrackingParticipant = new PSWorkflowTrackingParticipant();
			TrackingProfile trackingProfile = new TrackingProfile();
			trackingProfile.Name = "WorkflowTrackingProfile";
			CustomTrackingQuery customTrackingQuery = new CustomTrackingQuery();
			customTrackingQuery.Name = "*";
			customTrackingQuery.ActivityName = "*";
			trackingProfile.Queries.Add(customTrackingQuery);
			WorkflowInstanceQuery workflowInstanceQuery = new WorkflowInstanceQuery();
			workflowInstanceQuery.States.Add("Started");
			workflowInstanceQuery.States.Add("Completed");
			workflowInstanceQuery.States.Add("Persisted");
			workflowInstanceQuery.States.Add("UnhandledException");
			trackingProfile.Queries.Add(workflowInstanceQuery);
			ActivityStateQuery activityStateQuery = new ActivityStateQuery();
			activityStateQuery.ActivityName = "*";
			activityStateQuery.States.Add("*");
			activityStateQuery.Variables.Add("*");
			trackingProfile.Queries.Add(activityStateQuery);
			pSWorkflowTrackingParticipant.TrackingProfile = trackingProfile;
			PSWorkflowTrackingParticipant pSWorkflowTrackingParticipant1 = pSWorkflowTrackingParticipant;
			return pSWorkflowTrackingParticipant1;
		}