K2 Sharepoint List Workflow

  • 17 September 2009
  • 9 replies
  • 0 views

Badge +3

Hi Team,

We have a requirement like.

We have One list(Order Request). First User will create the request and there is a column in our List as "Assigned To delivery Manager:" so while list item creation he will fill this column and workflow will start. 

After this, The Delivery Manager should get an email and In turn he should Go and Edit the List to fill data related to him and fill a column called "Assigned to Technical Analyst:" So on edition of this list The Technical Analyst should get an email and he in turn will edit the list to fill the subsequent user and details.

We dont want any Task list to be there. Only Sharepoint List should be used. That means user will have only one Interface to work on I,e the List Edit page.

 

Regards

Ankur

 


9 replies

Badge +8

Hi Ankur,


 I can see of a way to achive this functionality but it will require a bit of work because the standard way to handle this type of process would be with a task list.


The way I see this working is you have 2 processes.  The first process is a SharePoint Workflow Integration process that fires when the list item is created.  The first activity will send the email to the first user, log information into a smartobject (Username, list item id, task Serial Number), and then assign a task to the K2 Service account using the SharePoint Workflow Integration Client event.   The user will recieve the email that points him to the list item directly so that he can edit it.  Once the user edits the item the second process will fire on the item updated event.  This process will look at the list item ID and the user that updated the item and then can use that information to get the serial number for the task out of the smartobject.  Once you have the serial number you can, in a code event, open the worklist item for the K2 service account using the serial number and complete the task.  Completing the task from process 2 will allow process 1 to move on to the next step and assign the next task.


I hope this helps.


 

Badge +3

Hi,

Thanks for your response and it is indeed a good approach.

Since my process has a lot of people going to be involved and I have to give user a flexibility to first, just save the edited items of the list. Second, action them whenever he wishes. Third, cancel and come back to the display page. I  have decided to use asp:buttons in the edit.aspx page of the sharepoint site by using sharepoint designer.  Page will be having three buttons one to just save. One to Save and redirect to the edit page of the specific task assigned to the user and last to cancel.

My problem is I want to move user to his task edit page directly on click. For that, what I am thinking is I would store the task list Item URL in one of the hidden fields of the Sharepoint List, but the task list url only be created when the sharepoint Workflow Integration child event is triggered and any action cannot be performed till that event is executed. Even if I place a List Item event in the same activity container It will wait for the previous event to be completed. How can I get the Task List URL for my use??

Or is there any better way.

Regards

Ankur


 

Badge +8

you can actually generate the task URL prior to the client event, but in the same activity, using workflow context variables.  Here is the format:


[WPIProcessField.SiteURL]/_layouts/k2/WorkflowTask.aspx?SerialNumber=[ProcessId]_[ActivityInstanceDestId]&WorkflowInstanceId=[SPIntegration_Data.WorkflowId]&ListId=[SPIntegration_Data.ListId]&ItemId=[SPIntegration_Data.ItemUniqueId]&TaskListId=[SPIntegration_Data.TaskListId]


 I hope this helps.


-Eric

Badge +3

Hi Eric,


Can you elaborate more on this as to how this is going to work out. I am fairly new to K2 and I am not sure I understood it properly.


1.You are telling first, I drag an Server code event in the same activity and write this code into a data field. 


2. Drag an sharepoint list item and assign the value to the column (i,e a hidden column).


3. Drag the client event.


One more thing I will be having multiple sharepoint events for different users at differnent points while workflow will move to the down so, do I need to use this for every sharepoint child event. 


Thanks in advance.


Regards


Ankur

Badge +8

The URL is created as a combination of process instance data fields.  Each item in brackets is actually a field that you can get to from the context browser so you do not need to generate it in code but could actually generate it directly in the body of the email event. You will also need to save the "ProcessID_ActivityInstanceDestID" into a hidden field of the list item (so that the second process can complete the task item)


You would then want to use a SharePoint Workflow Integration Client event to assign the task to the user.  This is important because if you just push the URL into a list the process will not stop and wait for input it will complete the activity and move on.


The second process (that triggers off of the save of the list item) will inspect the hidden field and use K2 API code to complete the task item in the first process.


 I hope this helps


-Eric 

Badge +3

Hi Eric,

C:%5CDocuments%20and%20Settings%5CAnkur.Billore%5CMy%20Documents%5CMy%20Pictures%5CK2UrlPAgeGiven.JPGWhen I am trying to use that url to open the page it is not getting opened because the page "WorkflowTask.aspx" is not present in my website --->layout --->"k2" directory.

Please find the attached screen shot.

C:%5CDocuments%20and%20Settings%5CAnkur.Billore%5CMy%20Documents%5CMy%20Pictures%5CK2Blackpearl.JPG

Then I have opened the Task List of my sharepoint site and went to the Edit Items of the specific task. That has generated an Url for the page with K2DefaultTaskPageSimple.aspx which is present in the K2Blackpearl folder in the virtual directory so I have modified the abve URL with this page in it and it is giving me error as "Object reference not set as an Instance of the object".

Please see the attachment.

What can I use alternatively or I might be missing somthing.


Regards

Ankur

 

 


12290i5407FB276C9D5B5B.jpg
Badge +8
It looks like not all the features have been activated for this site collection.  Go into central administration to the K2 for SharePoint tab and make sure that all the features have been activated for this site collection.
Badge +3

Hi Eric,


All features are activated except K2 Web Designer activation. It is saying "Thread was being aborted"


Is it anything to do with that.


Also, I have checked in the free VPC which is being provided with users Codi, Mike etc. Same thing is happening there also the page is not present in the K2 directory.


 


Regards


Ankur

Badge +3

[View:file:///C:/Documents and Settings/Ankur.Billore/My Documents/My Pictures/K2Features:550:0]


Hope this help you finding the problem..


One more thing Eric, I am selecting default page while running Sharepoint workflow Integration wizard. Do I need to select generate new pages or Advanced page.


 


Regards


Ankur

Reply