manich
asked on
Wss3
when i create workflow,and using deleteTask method: I got error occur with my workflow in wss3 site,
it said error occur in workflow:
the code that I use :
using System;
using System.ComponentModel;
using System.ComponentModel.Desi gn;
using System.Collections;
using System.Drawing;
using System.Linq;
using System.Workflow.ComponentM odel.Compi ler;
using System.Workflow.ComponentM odel.Seria lization;
using System.Workflow.ComponentM odel;
using System.Workflow.ComponentM odel.Desig n;
using System.Workflow.Runtime;
using System.Workflow.Activities ;
using System.Workflow.Activities .Rules;
using System.Windows.Forms;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Workf low;
using Microsoft.SharePoint.Workf lowActions ;
namespace deleted
{
public sealed partial class Workflow1 : SequentialWorkflowActivity
{
public Workflow1()
{
InitializeComponent();
}
public Guid workflowId = default(System.Guid);
public SPWorkflowActivationProper ties workflowProperties = new SPWorkflowActivationProper ties();
private void deleteTask1_MethodInvoking (object sender, EventArgs e)
{
if (workflowProperties.Item.T itle.ToStr ing() == "Dara")
{
workflowProperties.Item.De lete();
}
else
{
string title="Invent";
title=workflowProperties.I tem.Title. ToString() ;
}
}
private void onWorkflowActivated1_Invok ed(object sender, ExternalDataEventArgs e)
{
}
}
}
it said error occur in workflow:
the code that I use :
using System;
using System.ComponentModel;
using System.ComponentModel.Desi
using System.Collections;
using System.Drawing;
using System.Linq;
using System.Workflow.ComponentM
using System.Workflow.ComponentM
using System.Workflow.ComponentM
using System.Workflow.ComponentM
using System.Workflow.Runtime;
using System.Workflow.Activities
using System.Workflow.Activities
using System.Windows.Forms;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Workf
using Microsoft.SharePoint.Workf
namespace deleted
{
public sealed partial class Workflow1 : SequentialWorkflowActivity
{
public Workflow1()
{
InitializeComponent();
}
public Guid workflowId = default(System.Guid);
public SPWorkflowActivationProper
private void deleteTask1_MethodInvoking
{
if (workflowProperties.Item.T
{
workflowProperties.Item.De
}
else
{
string title="Invent";
title=workflowProperties.I
}
}
private void onWorkflowActivated1_Invok
{
}
}
}
ASKER
Can you give me the hold thing with condition in method deletetask() , cause when do condition on it , it 's not work.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
want more expression in Deletetask,and so on via C# code
Also are you able to build the project ok.
I am not sure you can declare a variable inside the else statement
string title="Invent";
you may want to put that up by the method header
private void deleteTask1_MethodInvoking
{
string title="Invent";