Skip to main content

I'm making an approval application using only K2 Blackpoint Studio only.  Approval information i.e. Employee details, workflow status (approved, denied, for approval) is stored in Sql Server 2005.  Here's what I've done so far: I can retrieve data from Sql Server 2005 to Infopath form.  


1.  But I am confused on where to code (or do I have to drag and drop something in Blackpoint) on the event where the Employee saves the approval to the database.  


2.  And aside from the Employee View, there is an approver View (the usual approve and reject button and a textbox for the approver's reason, say the request have been rejected).  Where in Blackpoint or Infopath where you put the code (or drag or drop something) to save the information to the database and enable the Employee View?


Any significant and revelant help in this matter is very much appreciated.  Thank you very much in advance for your time K2 experts.

For 1), the approval is done by binding the outcomes and actions to a specific XML field in the InfoPath form schema, this causes the InfoPath form to pull the list of actions from the K2 server to the InfoPath form.  When doing the submit, it will then execute the relevant action taken (e.g. Approve) and the XML form data is then saved back to the process.  This then completes the client event and the process execution will then continue.


For 2), if you are referring to switching to a read-only view in the InfoPath form, you can use the Data Event to set the DocumentView K2 field (XPath= /my:myField/my:_K2/my:DocumentView) in the InfoPath form with the name of the view that you want to use as your “Employee view”.  You can also place the data event just before the SharePoint document event that uploads/copies the InfoPath form to the history library for people to view.


Reply