How to: WinForms and K2 Blackpearl

Last post 11-27-2007, 1:20 AM by Ockert. 1 replies.
Sort Posts: Previous Next
  •  11-21-2007, 7:12 AM 20000

    How to: WinForms and K2 Blackpearl

    Can someone point me in the right direction on getting started with developing a K2 Blackpearl workflow using Winforms.

    In K2.net 2003, I was able to use the default Client Event to add the task to the assigned users worklist, and then from the winform app, open the user's worklist and display a Windows Form loaded with the Process Instances Data Fields/ Activity DataFields

    The Default Client Event wizard in K2 Blackpearl requires either Web Page, Mobile WebPage, or Exchange Form . Is there some other event that I can use to add the task to the user's worklist?

    Also, my Winform app will have forms for Creating a Request, several Department Review Forms and a Final Approval Form. What is the best way to assign a K2 Event to a specific Winform? Store a custom field in the Actvity DataField, and then have the winform app interogate Process Instance to determine which form to display?

    Any help is appreciated

     Paul de Mello

     

  •  11-27-2007, 1:20 AM 20066 in reply to 20000

    Re: How to: WinForms and K2 Blackpearl

    Hi Paul,

    It really does not matter what method you use to create the worklist items in the default client event - whether you use Web Page, Mobile Webpage or Exchange Form - the important part is the Serial Number.

    In your WinForms application you'll need to utilize 'SourceCode.Workflow.Client' in exactly the same way you used to do it with 'K2ROM' in K2.net 2003 - the only difference is in the connection string.  Open a connection to the HostServer and retrieve the worklist for the logged on user using the 'OpenWorklist' call with or without a WorklistCriteria object.  When the user then selects a specific worklist item, you can open the item (again, exactly the same way you did in K2.net 2003) by calling the 'OpenWorklistItem(SerialNumber)' method.

    The only drawback is that the users will not be able to utilize the out-of-the-box Worklist to action their worklist items but I suppose that is the whole point behind creating a custom worklist application.

    As for which form to display, yes, I think your idea of storing some state in Activity level datafields should do the trick.

    HTH,

    Ockert


    The statements and opinions made in my postings are my own, and do not reflect the opinions of SourceCode Technology Holdings, Inc. or its subsidiaries. All information is provided as is with no warranties, express or implied, and grants no rights or licenses.
View as RSS news feed in XML