VincenzoDC

Hello,

Can somebody give me some direction on how to develop a Custom Activity and use this activity from the Sharepoint Designer

Thanks!

Vincenzo




Re: SharePoint - Workflow Developing a Custom Activity

VincenzoDC

Thanks a lot Massimo!

I have tried one of the example and finally got through!

Anyway I still have a small problem: in my activity I have created, in the InitializeComponent() method, a logger object that writes into the EventLog

Code Snippet

private void InitializeComponent()

{

//Set up the Event Logging object

logger = new EventLog("Mate_Workflow");

logger.Source = "EventLogger Component";

logger.WriteEntry("Init Library");

}

And therefore into the Execute method, I have used the logger object, that has a class scope.

Code Snippet

protected override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext)

{

try

{

logger.WriteEntry("Execute method");

logger.WriteEntry(this.Message, EventLogEntryType.Information);

}

catch ( Exception ex )

{

logger.WriteEntry(ex.Message, EventLogEntryType.Error);

}

return ActivityExecutionStatus.Closed;

}

My question are:

  1. Why the logger writes into the client PC
  2. Why the logger does not write the text that I try to write into the execute method and writes the text of the Initialize method

Thanks again for your help!

Vincenzo