In SharePoint
2010 we now have a new workflow which is site workflow. Just like how we can
set a workflow on list, library and content type, now we can associate a
workflow with the site.
Site workflow
is different than list or library level workflow as it has advantages over
them.
It can run on
different libraries, different lists, and different items at the same time. We
can check in, check out a document in one library, create an item in list,
capture version of document set all in one workflow.
Other
advantage is those site workflows are always triggered manually through site
workflow link from view all site content page. The link to start the individual
site workflow can be placed on any page as it does not involve any dynamic
parameter.
If your site
workflow has a requirement of interacting with user, then the form will be in
InfoPath. Hence we can always go ahead and make changes to InfoPath form that
workflow creates.
There are
certain limitations of site workflow though. It cannot be created in Visio.
Some actions related to current item are not available while creating site
workflow
We would be
diving into creating a site workflow and then test it how it works. I am taking
a very simple example of creating orders with few fields. Real business
scenario can simple be anything.
I’ve got a
list called orders.
Now we are
going to go and open our SharePoint Designer 2010. Connect with your site.
click on workflows and then click on site workflows from ribbon.
Click on
create list item in workflow designer.
Now before
starting on this, we need certain parameters to start with. The form will have
these parameters so that user can enter values in them and then those get
inserted to the orders list.
Click on
Initiate parameters from the ribbon.
Enter names
of the parameters. These will be similar to our fields in the list.
In this way,
define all four parameters.
So at the
end, you should have something like this.
Now click on
create list link and that will open up a dialog which allows us to select the
list
where we want to create an item and then bind parameters to the fields
from that list.
In this way
associate all parameters to its respective fields.
At the end
you should have something like this
Save and
publish the workflow. Open the site and click on view all site content.
Click on site
workflow.
You will find
our workflow that we’ve just created.
Click on the
order enter workflow and you’ll be presented with the form. You can copy and
use this URL wherever you want as it is a static URL to this workflow form.
Enter the
values and you’ll see that workflow starts and then ends and at the end it
creates an entry in orders list.
Now you must
be wondering this form does not look good. If you observe the workflow settings
page in designer, you can see one xsn InfoPath form has been created for us by
Designer.
Click on that
form to open in InfoPath to modify.
I’ve modified
the form in this. Now save and publish back to the same location.
Try to start
the site workflow now and you will see modified form this time.
1 comment:
nice....:)
Post a Comment