Building a simple workflow with Visual Studio 2005 in SharePoint


Create a new SharePoint Sequential Workflow project.

Drag and drop SendEmail activity just after onWorkflowActivated1 activity .

Set CorrelationToken property of SendEmail to workflowToken which is the workflow correlation token used by onWorkflowActivated1.

For MethodInvoking set the value sendEmail1_MethodInvoking and click which would generate the handler.

private void sendEmail1_MethodInvoking(object sender, EventArgs e)

{

sendEmail1.To = “myId@g.com”;

sendEmail1.From = ” myId@g.com “;

sendEmail1.CC = ” otherId@g.com “;

sendEmail1.Subject = “MySubject”;

sendEmail1.Body = ” This is test mail”;

}

}

Strong sign the assembly and install it in GAC.

Set your feature.xml as following

<Feature Id=23CB845A-7204-4d41-9873-FE50BEB78BCD

Title=Default Title

Description=This feature is a workflow that …

Version=12.0.0.0

Scope=Site

xmlns=http://schemas.microsoft.com/sharepoint/>

<ElementManifests>

<ElementManifest Location=workflow.xml />

</ElementManifests>

</Feature>

Id– Provide a new guid for uniquely identifying the feature

Title – to be displayed in the list of features deployed to the site

Description – Any description that appears beneath the Title.

Location – Leave it to default as the directory is same.

Set your workflow.xml as following

<Elements xmlns=http://schemas.microsoft.com/sharepoint/>

<Workflow

Name=My Workflow

Description=This workflow …

Id=049971BB-5BAA-4bf1-98A2-747675A18DCB

CodeBesideClass=SharePointWorkflowLibrary3.Workflow1

CodeBesideAssembly=SharePointWorkflowLibrary3, Version=1.0.0.0, Culture=neutral, PublicKeyToken=58efe34bdb2df93e

>

<Categories/>

<MetaData>

<StatusPageUrl>_layouts/WrkStat.aspx</StatusPageUrl>

</MetaData>

</Workflow>

</Elements>

Name – Name of the workflow.

Description – Any description about the workflow

Id – A new guid for the workflow

CodeBesideClass – Namespace.ClassName

CodeBesideAssembly – name of assembly, version , culture and publicKeyToken which we can get by right clicking the assembly in gac and selecting properties.

Remove all other entries as we are not using any forms for this workflow.

Now modify the install.bat file as mentioned in the instruction for the same.

Run install.bat

Next go to the site where the new workflow has been deployed.

Select any document library – than settings- document library settings – workflow settings – add a workflow.

We’ll see our workflow within the workflow template.

Correlation Token – A correlation token is essentially a means of uniquely identityfing each instance of a workflow, modification or task.

Bye…


Discover more from Nishant Rana's Weblog

Subscribe to get the latest posts sent to your email.

Unknown's avatar

Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

Please share your thoughts

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from Nishant Rana's Weblog

Subscribe now to keep reading and get access to the full archive.

Continue reading

Power Platform Puzzles

D365 CRM, Power Platform Tips &Tricks

Power Spark

Power Spark By Shrangarika

Van Carl Nguyen

Exploration of Power Platform

My Trial

It is my experience timeline.

Power⚡Thomas

Sharing my knowledge and experience about the Microsoft Power Platform.

Arpit Power Guide

a guide to powering up community

Welcome to the Blog of Paul Andrew

Sponsored by Cloud Formations Ltd

Deriving Dynamics 365

Deriving Solutions and features on Power Platform/Dynamics 365

The CRM Ninja

Thoughts & musings from a Microsoft Business Applications Ninja!

D CRM Explorer

Learn about Microsoft Dynamics CRM Power Platform customization and implementation and other cool stuffs

Stroke // Jonas Rapp

I know pre-stroke. I will improve who I was.

Power Melange

Power Melange By Shalinee

Clavin's Blog - PPUG.ORG

AI - Power Automate - Power Apps - SharePoint Online - Azure - Nintex - K2 - Artificial Intelligence

Sat Sangha Salon

An Inquiry in Being

The Indoencers

The Influencers & Influences of Indian Music

Monika Halan's blog

Hand's-free money management

D365 Demystified

A closer look at Microsoft Dynamics 365.

Microsoft Mate (msftmate) - Andrew Rogers

Experienced consultant primarily focused on Microsoft Dynamics 365 and the Power Platform

Manmit Rahevar's Blog

One Stop Destination for Microsoft Technology Solutions

MG

Naturally Curious

Brian Illand

Power Platform and Dynamics 365

Steve Mordue

The Professional Paraphraser

Subwoofer 101

Bass defines your home theater

SQLTwins by Nakul Vachhrajani

SQL Server tips and experiences dedicated to my twin daughters.

Everything D365

Discovering Azure DevOps and D365 Business Applications

Tech Wizard

Lets do IT Spells

XRM Tricks (Power Platform & Dynamics CRM )

Power Platform & Dynamics CRM

CRM TIPS BY PRM

Mail to crmtipsbyprm@gmail.com for queries and suggestions

nijos.dev

Giving back to the community what I have learned

Power Platform Learning

Your Go-To Resource for Power Apps, Power Automate & More

xrm CRM Dynamics

Dynamics CRM Technical & Functional Info

Dynamics 365 Blogs - Explained in unique way

Sometimes you need to look at things from different perspective.