SharePoint Document Event Problem

  • 17 July 2007
  • 1 reply
  • 1 view

Badge +1

Hi all,

I'm having some questions about the SharePoint Document Event.

I've implemented a flow to Get document from SharePoint to a binary K2 data field in different stages and set to keep audit trail for this field:

1. An originator user edit and save an excel file to the sharepoint by clicking macro button control. This would also trigger to start the K2 workflow.
2. The workflow would retrieve the excel from the SharePoint and save the file to the binary data field.
3. The workflow would send email to next user with a link attached inside. The next user click the link (customized aspx page to open the saved excel from K2 server data field) and open the excel file.
4. After editing the excel file, the user would click the macro button control to save the form to the SharePoint and trigger the workflow to next step.
5. Again, the workflow would retrieve the excel from the SharePoint and save the file to the binary data field (same data field as before).
6. The workflow would send email to next user with the link to open the excel file.

The problem I found is, sometimes the K2 server could not get the updated excel file in step 5. From the workspace, the workflow path indicated that it has already executed to step 5. But I found from _ProcInstDataAudit in database, the event on step 5 did not keep any audit trail.

Thank you very much.

Kind Regards,
Zoe


1 reply

Badge +8

Hello Zoe,


I have found that it is not always a 'best practice' to get and store the actual file contents in the K2 workflow, the actual file is stored twice if you do that: once in the SharePoint Database and second in the K2 database.


It would be better to just store the reference to the file in the K2 workflow, that way there is only one copy which is updated directly in the SharePoint library.


If your SharePoint library is K2-enabled, the full path to the file in SharePoint is automatically stored in the AttachedDocuments K2 XML field.


 

Reply