Sharepoint Document Approval Workflow for Word Document

  • 21 December 2004
  • 3 replies
  • 3 views

Badge +2
Hi

Can anyone help me in designing a Microsoft Word Document Approval workflow integrated with Sharepoint Portal Server 2003 Document Library. I have tried with Approve/Reject feature of Sharepoint but i am unable to capture this event with K2.Process. I am simply getting update event.

Thanks in advance

S.Saba

3 replies

Badge +4
Hi,

The steps below outline and illustrate a very simple approval process that we have created for our Build Validation tests.

Pre-Requisites:
  • Ensure that the K2 SharePoint Components have been installed on your SharePoint server
    Ensure that you configured Kerberos Authentication/Delegation as per the K2 documentation
    Ensure that you have enabled Document Library events on the Virtual Server used for your SharePoint installation


Build K2 Process:
  • Start K2 Studio and select New Solution
    Start a New Project
    Add a New SharePoint Process to your project - The SharePoint Process Wizard will begin:

    At the first page, click
Next >

At the next page, enter the following:
  • Virtual Server URL:
http://[SPSServerName]
Site: sites/[SPSSiteName]
Click Next >

At the next page, enter the following:
  • Folder:
[SPSDocumentLibraryName]
K2.net Server Name: [K2ServerName]
K2.net Web Service URL: http://[K2ServerName]/K2V3/SharePointProcessService/K2Process.asmx
Click Next >

At the next page, create any additional Data Fields you require.
Click Next >

At the next page, bind your process to an SPS event.
Click Next >

NOTE: This is the SPS event that will plan/start your process. In our process, we used the Insert event so that the process would be planned whenever a document is added to the Document Library

At the next page, click Finish

The design canvas should now appear with a single Start Activity. You can now begin dragging and dropping K2 activities and events into your process.

Create SPS Activity/Event:
  • Drag and Drop an Activity onto the canvas
    Drag and Drop a SharePoint 2003 Document event onto the Activity - The SharePoint Event Wizard will begin:

    At the first page, click
Next >

At the next page, enter the following:
  • Virtual Server URL:
http://[SPSServerName]
Site: sites/[SPSSiteName]
Click Next >

At the next page, enter the following:
  • Select Action:
Approve/Reject
Click Next >

At the next page, enter the following:
  • Folder:
{K2.ProcessInstance.XmlFields("AttachedDocuments/spsdocuments/documents/document/folder").Value}
File Name: {K2.ProcessInstance.XmlFields("AttachedDocuments/spsdocuments/documents/document/docname").Value}
Approval Status: Approved
Approval Comment: Automatically Approved By K2 Server
Click Next >

NOTE: This describes an Approval Event. Substitute with appropriate values for a rejection event

At the next page, click Finish

Continue adding activities, events and lines to the canvas until your process is complete.

Once your process is complete, you can then export the process to the K2 Server.

Once the process has been exported, it is essential that you grant the Anonymous user the Plan/Start permission - SPS raises events as the Anonymous user and unless that user has been granted the appropriate permission, the K2 process will NOT start.

Our simple process also includes a SmartForm allowing the user to view the document and a final step which declares the document into Meridio as a record. This process allows us to verify that all of the applications in our environment are inter-operating correctly.

Hope this helps.

Regards,
Dave.
Badge +2
hi Dave,

Thanks a lot for the help. I will try this and get back to you.

regards
S.Saba
Badge +2
Hi Dave,

I have tested it. It works fine. Now i have another problem for which i do not have any idea. In sharepoint docuement library once the document is approved or rejected, it should not be approved/rejected again. Is there any way that i can acheive this by customizing the sps doc lib or using k2 code?.

thanks
s.saba

Reply