Datasheet
Chapter 1: Workfl ow Programming Principles
34
Listing 1-12 (continued )
this.sequenceActivity1.Name = “sequenceActivity1”;
//
// logToHistoryListActivity2
//
this.logToHistoryListActivity2.Duration =
TimeSpan.Parse(“-10675199.02:48:05.4775808”);
this.logToHistoryListActivity2.EventId =
SPWorkflowHistoryEventType.WorkflowComment;
this.logToHistoryListActivity2.HistoryDescription = “Completed”;
this.logToHistoryListActivity2.HistoryOutcome = “Completed”;
this.logToHistoryListActivity2.Name =
“logToHistoryListActivity2”;
this.logToHistoryListActivity2.OtherData = “”;
this.logToHistoryListActivity2.UserId = -1;
//
// whileActivity1
//
this.whileActivity1.Activities.Add(this.sequenceActivity1);
customcondition1.FieldName = “Title”;
customcondition1.ItemId = 1;
customcondition1.Keywords = “Document”;
customcondition1.ListName = “Documents”;
customcondition1.SiteUrl = “EnterSiteURLHere”;
this.whileActivity1.Condition = customcondition1;
this.whileActivity1.Name = “whileActivity1”;
//
// logToHistoryListActivity1
//
this.logToHistoryListActivity1.Duration =
System.TimeSpan.Parse(“-10675199.02:48:05.4775808”);
this.logToHistoryListActivity1.EventId =
SPWorkflowHistoryEventType.WorkflowComment;
this.logToHistoryListActivity1.HistoryDescription = “Started”;
this.logToHistoryListActivity1.HistoryOutcome = “Started”;
this.logToHistoryListActivity1.Name =
“logToHistoryListActivity1”;
this.logToHistoryListActivity1.OtherData = “”;
this.logToHistoryListActivity1.UserId = -1;
//
// onWorkflowActivated1
//
correlationtoken1.Name = “worflowToken”;
correlationtoken1.OwnerActivityName = “Workflow1”;
this.onWorkflowActivated1.CorrelationToken = correlationtoken1;
this.onWorkflowActivated1.EventName = “OnWorkflowActivated”;
this.onWorkflowActivated1.Name = “onWorkflowActivated1”;
activitybind1.Name = “Workflow1”;
activitybind1.Path = “workflowProperties”;
this.onWorkflowActivated1.SetBinding(
OnWorkflowActivated.WorkflowPropertiesProperty,
((ActivityBind)(activitybind1)));
//
c01.indd 34c01.indd 34 8/25/08 4:03:01 PM8/25/08 4:03:01 PM