Not able to see my workflow instances in workflow monitor

I have a workflow for managing Addition of files to VSS.

The workflow works fine but I am not able to view the instance in workflow monitor.

When I click on my workflow, I get "Data is null.This mothod or property cannot be called on null value"

I am using a State M/c workflow and I have a RequestInfo object stored in the workflow so that I can use the data for emailing when activities get completed.

What might be the problem with my WF I am able to see other Instances in the monitor.



Answer this question

Not able to see my workflow instances in workflow monitor

  • ahmedilyas

    I am trying to programatically create folders and add new files to VSS as part of the application I am developing.

    The workflow application is mainly for managing UI files by,

    1. emailing UI designers and Developers

    2. To maintain the UI files in VSS.


  • Juan64

    Hi,

    I have enclosed the workflow code.I am not doing any of the VSS stuff in the workflow as such.its handled by my dll code.I am using C#

    /////////////////////////////////////////////////code behind

    using System;
    using System.ComponentModel;
    using System.ComponentModel.Design;
    using System.Collections;
    using System.Drawing;
    using System.Workflow.ComponentModel.Compiler;
    using System.Workflow.ComponentModel.Serialization;
    using System.Workflow.ComponentModel;
    using System.Workflow.ComponentModel.Design;
    using System.Workflow.Runtime;
    using System.Workflow.Activities;
    using System.Workflow.Activities.Rules;
    using System.Net.Mail;
    using System.Text;
    using ImgManageServices;
    namespace ImgManageWF
    {
    public sealed partial class ImageManageWF: StateMachineWorkflowActivity
    {
    public ImgManageServices.RequestInfo RequestSender = new ImgManageServices.RequestInfo();
    public string RequestCanceledError = "Image Request has been canceled";
    public ImgManageServices.RequestEventArgs requestArgs = default(ImgManageServices.RequestEventArgs);
    public ImageManageWF()
    {
    InitializeComponent();
    }

    private void Request_Invoked(object sender, ExternalDataEventArgs e)
    {
    RequestSender = (ImgManageServices.RequestInfo)sender;

    }

    private void SendMail(object sender, EventArgs e)
    {
    MailAddress toAddress = new MailAddress(RequestSender.MailTo);
    MailAddress fromAddress = new MailAddress(RequestSender.MailFrom);

    MailAddressCollection addresses = new MailAddressCollection();
    addresses.Add(toAddress);

    MailMessage msg = new MailMessage(fromAddress, toAddress);

    msg.Subject = "File Request ID : " + RequestSender.RequestID ;
    StringBuilder sb = new StringBuilder();
    sb.AppendLine("File name : " + RequestSender.FileName);
    sb.AppendLine("File Path :" + RequestSender.FilePath);
    sb.AppendLine("Description :" + RequestSender.Description + " .");
    sb.AppendLine("The details of the request can be viewed at");
    sb.AppendLine("URL : " + RequestSender.url);
    msg.Body = sb.ToString();

    SmtpClient mail = new SmtpClient("sdi-ms1.sdi.na.xde3.xerox.org");
    //SmtpClient mail = new SmtpClient("SDI-KMURTHY.sdi.xcdg.xerox.com");

    mail.Send(msg);

    }


    }

    //////////////////////////////////////////////////////////////Designer code

    using System;
    using System.ComponentModel;
    using System.ComponentModel.Design;
    using System.Collections;
    using System.Drawing;
    using System.Reflection;
    using System.Workflow.ComponentModel.Compiler;
    using System.Workflow.ComponentModel.Serialization;
    using System.Workflow.ComponentModel;
    using System.Workflow.ComponentModel.Design;
    using System.Workflow.Runtime;
    using System.Workflow.Activities;
    using System.Workflow.Activities.Rules;

    namespace ImgManageWF
    {
    partial class ImageManageWF
    {
    #region Designer generated code

    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    [System.Diagnostics.DebuggerNonUserCode]
    private void InitializeComponent()
    {
    this.CanModifyActivities = true;
    System.Workflow.ComponentModel.ActivityBind activitybind1 = new System.Workflow.ComponentModel.ActivityBind();
    System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding1 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
    System.Workflow.ComponentModel.ActivityBind activitybind2 = new System.Workflow.ComponentModel.ActivityBind();
    System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding2 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
    System.Workflow.ComponentModel.ActivityBind activitybind3 = new System.Workflow.ComponentModel.ActivityBind();
    System.Workflow.ComponentModel.ActivityBind activitybind4 = new System.Workflow.ComponentModel.ActivityBind();
    System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding3 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
    System.Workflow.ComponentModel.ActivityBind activitybind5 = new System.Workflow.ComponentModel.ActivityBind();
    System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding4 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
    System.Workflow.ComponentModel.ActivityBind activitybind6 = new System.Workflow.ComponentModel.ActivityBind();
    System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding5 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
    System.Workflow.ComponentModel.ActivityBind activitybind7 = new System.Workflow.ComponentModel.ActivityBind();
    System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding6 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
    this.setStateActivity3 = new System.Workflow.Activities.SetStateActivity();
    this.codeActivity1 = new System.Workflow.Activities.CodeActivity();
    this.handleExternalEventActivity4 = new System.Workflow.Activities.HandleExternalEventActivity();
    this.terminateActivity1 = new System.Workflow.ComponentModel.TerminateActivity();
    this.handleExternalEventActivity3 = new System.Workflow.Activities.HandleExternalEventActivity();
    this.setStateActivity2 = new System.Workflow.Activities.SetStateActivity();
    this.codeActivity2 = new System.Workflow.Activities.CodeActivity();
    this.handleExternalEventActivity2 = new System.Workflow.Activities.HandleExternalEventActivity();
    this.setStateActivity1 = new System.Workflow.Activities.SetStateActivity();
    this.SendCreateEmailActivity = new System.Workflow.Activities.CodeActivity();
    this.handleExternalEventActivity1 = new System.Workflow.Activities.HandleExternalEventActivity();
    this.CreateFolderEvent = new System.Workflow.Activities.EventDrivenActivity();
    this.CancelRequestEvent = new System.Workflow.Activities.EventDrivenActivity();
    this.ProcessImageEvent = new System.Workflow.Activities.EventDrivenActivity();
    this.RequestImageEvent = new System.Workflow.Activities.EventDrivenActivity();
    this.RequestProcessed = new System.Workflow.Activities.StateActivity();
    this.RequestCreated = new System.Workflow.Activities.StateActivity();
    this.Waiting = new System.Workflow.Activities.StateActivity();
    //
    // setStateActivity3
    //
    this.setStateActivity3.Name = "setStateActivity3";
    this.setStateActivity3.TargetStateName = "RequestCreated";
    //
    // codeActivity1
    //
    this.codeActivity1.Name = "codeActivity1";
    this.codeActivity1.ExecuteCode += new System.EventHandler(this.SendMail);
    //
    // handleExternalEventActivity4
    //
    this.handleExternalEventActivity4.EventName = "RequestUpdated";
    this.handleExternalEventActivity4.InterfaceType = typeof(ImgManageServices.IManageService);
    this.handleExternalEventActivity4.Name = "handleExternalEventActivity4";
    activitybind1.Name = "ImageManageWF";
    activitybind1.Path = "RequestSender";
    workflowparameterbinding1.ParameterName = "sender";
    workflowparameterbinding1.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind1)));
    activitybind2.Name = "ImageManageWF";
    activitybind2.Path = "requestArgs";
    workflowparameterbinding2.ParameterName = "e";
    workflowparameterbinding2.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind2)));
    this.handleExternalEventActivity4.ParameterBindings.Add(workflowparameterbinding1);
    this.handleExternalEventActivity4.ParameterBindings.Add(workflowparameterbinding2);
    this.handleExternalEventActivity4.Invoked += new System.EventHandler<System.Workflow.Activities.ExternalDataEventArgs>(this.Request_Invoked);
    activitybind3.Name = "ImageManageWF";
    activitybind3.Path = "RequestCanceledError";
    //
    // terminateActivity1
    //
    this.terminateActivity1.Name = "terminateActivity1";
    this.terminateActivity1.SetBinding(System.Workflow.ComponentModel.TerminateActivity.ErrorProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind3)));
    //
    // handleExternalEventActivity3
    //
    this.handleExternalEventActivity3.EventName = "RequestCancelled";
    this.handleExternalEventActivity3.InterfaceType = typeof(ImgManageServices.IManageService);
    this.handleExternalEventActivity3.Name = "handleExternalEventActivity3";
    //
    // setStateActivity2
    //
    this.setStateActivity2.Name = "setStateActivity2";
    this.setStateActivity2.TargetStateName = "RequestProcessed";
    //
    // codeActivity2
    //
    this.codeActivity2.Name = "codeActivity2";
    this.codeActivity2.ExecuteCode += new System.EventHandler(this.SendMail);
    //
    // handleExternalEventActivity2
    //
    this.handleExternalEventActivity2.EventName = "RequestProcessed";
    this.handleExternalEventActivity2.InterfaceType = typeof(ImgManageServices.IManageService);
    this.handleExternalEventActivity2.Name = "handleExternalEventActivity2";
    activitybind4.Name = "ImageManageWF";
    activitybind4.Path = "RequestSender";
    workflowparameterbinding3.ParameterName = "sender";
    workflowparameterbinding3.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind4)));
    activitybind5.Name = "ImageManageWF";
    activitybind5.Path = "requestArgs";
    workflowparameterbinding4.ParameterName = "e";
    workflowparameterbinding4.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind5)));
    this.handleExternalEventActivity2.ParameterBindings.Add(workflowparameterbinding3);
    this.handleExternalEventActivity2.ParameterBindings.Add(workflowparameterbinding4);
    this.handleExternalEventActivity2.Invoked += new System.EventHandler<System.Workflow.Activities.ExternalDataEventArgs>(this.Request_Invoked);
    //
    // setStateActivity1
    //
    this.setStateActivity1.Name = "setStateActivity1";
    this.setStateActivity1.TargetStateName = "RequestCreated";
    //
    // SendCreateEmailActivity
    //
    this.SendCreateEmailActivity.Name = "SendCreateEmailActivity";
    this.SendCreateEmailActivity.ExecuteCode += new System.EventHandler(this.SendMail);
    //
    // handleExternalEventActivity1
    //
    this.handleExternalEventActivity1.EventName = "RequestCreated";
    this.handleExternalEventActivity1.InterfaceType = typeof(ImgManageServices.IManageService);
    this.handleExternalEventActivity1.Name = "handleExternalEventActivity1";
    activitybind6.Name = "ImageManageWF";
    activitybind6.Path = "requestArgs";
    workflowparameterbinding5.ParameterName = "e";
    workflowparameterbinding5.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind6)));
    activitybind7.Name = "ImageManageWF";
    activitybind7.Path = "RequestSender";
    workflowparameterbinding6.ParameterName = "sender";
    workflowparameterbinding6.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind7)));
    this.handleExternalEventActivity1.ParameterBindings.Add(workflowparameterbinding5);
    this.handleExternalEventActivity1.ParameterBindings.Add(workflowparameterbinding6);
    this.handleExternalEventActivity1.Invoked += new System.EventHandler<System.Workflow.Activities.ExternalDataEventArgs>(this.Request_Invoked);
    //
    // CreateFolderEvent
    //
    this.CreateFolderEvent.Activities.Add(this.handleExternalEventActivity4);
    this.CreateFolderEvent.Activities.Add(this.codeActivity1);
    this.CreateFolderEvent.Activities.Add(this.setStateActivity3);
    this.CreateFolderEvent.Name = "CreateFolderEvent";
    //
    // CancelRequestEvent
    //
    this.CancelRequestEvent.Activities.Add(this.handleExternalEventActivity3);
    this.CancelRequestEvent.Activities.Add(this.terminateActivity1);
    this.CancelRequestEvent.Name = "CancelRequestEvent";
    //
    // ProcessImageEvent
    //
    this.ProcessImageEvent.Activities.Add(this.handleExternalEventActivity2);
    this.ProcessImageEvent.Activities.Add(this.codeActivity2);
    this.ProcessImageEvent.Activities.Add(this.setStateActivity2);
    this.ProcessImageEvent.Name = "ProcessImageEvent";
    //
    // RequestImageEvent
    //
    this.RequestImageEvent.Activities.Add(this.handleExternalEventActivity1);
    this.RequestImageEvent.Activities.Add(this.SendCreateEmailActivity);
    this.RequestImageEvent.Activities.Add(this.setStateActivity1);
    this.RequestImageEvent.Name = "RequestImageEvent";
    //
    // RequestProcessed
    //
    this.RequestProcessed.Name = "RequestProcessed";
    //
    // RequestCreated
    //
    this.RequestCreated.Activities.Add(this.ProcessImageEvent);
    this.RequestCreated.Activities.Add(this.CancelRequestEvent);
    this.RequestCreated.Activities.Add(this.CreateFolderEvent);
    this.RequestCreated.Name = "RequestCreated";
    //
    // Waiting
    //
    this.Waiting.Activities.Add(this.RequestImageEvent);
    this.Waiting.Name = "Waiting";
    //
    // ImageManageWF
    //
    this.Activities.Add(this.Waiting);
    this.Activities.Add(this.RequestCreated);
    this.Activities.Add(this.RequestProcessed);
    this.CompletedStateName = "RequestProcessed";
    this.DynamicUpdateCondition = null;
    this.InitialStateName = "Waiting";
    this.Name = "ImageManageWF";
    this.CanModifyActivities = false;

    }

    #endregion

    private CodeActivity codeActivity2;
    private SetStateActivity setStateActivity3;
    private CodeActivity codeActivity1;
    private HandleExternalEventActivity handleExternalEventActivity4;
    private EventDrivenActivity CreateFolderEvent;
    private CodeActivity SendCreateEmailActivity;
    private HandleExternalEventActivity handleExternalEventActivity3;
    private EventDrivenActivity RequestImageEvent;
    private HandleExternalEventActivity handleExternalEventActivity1;
    private SetStateActivity setStateActivity1;
    private StateActivity RequestCreated;
    private StateActivity RequestProcessed;
    private EventDrivenActivity ProcessImageEvent;
    private HandleExternalEventActivity handleExternalEventActivity2;
    private SetStateActivity setStateActivity2;
    private EventDrivenActivity CancelRequestEvent;
    private TerminateActivity terminateActivity1;
    private StateActivity Waiting;


    }
    }


  • Cammyr

    What language are you developing in(C++, C#, VB, etc)

    Are you using IVSS to create the folders and new files into VSS If so, what functions are you calling and what are you supplying it with as arguments, etc, etc...

    Do you have some sample code snippets

    Statements such as "When I click on my workflow, I get "Data is null.This mothod or property cannot be called on null value"" will not help me much to help you since you do not give enough details to me to figure out why something is returning null. So please, provide more detailed information.

    Thanks,

    Barry


  • VladR

    What program are you using How is it integrated with Visual SourceSafe
  • jbap01

    I am not understanding what Workflow is in your questions. Is it a third party application, a project, a script, etc
  • Edward__

    I have created a statemachine workflow.

    Even though I can access the workflow at different states and work on it to complete the flow,I cannot view the status using the workflow monitor.

    I am making use of tracking service.

    I am able to see other workflows which I have created.


  • Not able to see my workflow instances in workflow monitor