An external reference to a .NET, COM, Web or Service object may be added to a K2 process, exposing the properties or methods of the object to the process through the K2 Code Reference Event. Whilst building the reference and consuming it in the Code Reference Event, additional properties or methods may need to be added to the object. This article presents how to update the reference object when new methods or properties have been added.
Updating a Reference Object
When an object has been modified and the K2 process needs to be updated with the new methods or properties, the process designer must remove the reference from the K2 Code Reference Event and then add it back again. This will cause the newly added properties and methods to surface in the K2 Code Reference Event.
An error may arise when the process designer attempts to remove and re-add the reference. The error will clearly indicate that the process cannot access the file because it is being used by another process.
If this error occurs, exit the K2 design environment and then start it again. This will release the old reference object and allow the K2 Code Reference Event to load the new object.