Skip to main content


 

Symptoms


Two process instances went down a path in the workflow that had an incorrect line rule configuration. Rule was checking if the action was "Authorized" when it needed to check for ""Department] Authorized". After line rule was reconfigured we needed to take these two process instances through the workflow again with the same data for accurate data keeping on the customer's end. He was informed that you can restart the instance from K2 Workspace with the necessary data fields and Folio name. Then we can use a gotoactivity in order to push it through the workflow.

Customer has followed this path and the instructions given, but when he opens the form for the client event we get the error:

"SmartObject property ID is a required property for the selected method Read. Value must be set."
 

Diagnoses


We checked over the rules on the initialize option for the form and also for any that might be on the view level that could be calling a read method. None could be found on either form or view level. The only explanation for this read method must be due to the open a worklist item action. This is most likely doing a read method for the smartobject being used as an Item reference.

We changed the form state to a read only view that is used in the workflow and we could successfully pull back the data so this was most likely specific to an action on the current state of the form.

Upon viewing the item reference in the K2 Database table of Server.ProcXml we saw that the item reference being used for the proc inst that we see this error with contained no ID and had a Last ID = 0 in the item reference. This is most likely where our required ID for a read method should be but is not. Item reference does a read method on the ID that has been passed to it when the workflow starts and the item reference is initially created.

Since the data already existed for this process in the smartobject we just need to tie it to a new Process instance that mimics the data but uses the later version of the workflow that does not have the misconfigured line rule. We were using the "Start New" process in workspace and passing in data fields and folio that mimics the errored instances. It was found that we can supply the xml for the item reference as a data field here.
 

Resolution

Since the Item reference was set to 0 when we attempted to start new the first time it never had an ID to pull data from and that is why we got the error on that form loading the worklist item. The worklist item does pull from the item reference if one has been created. We took the item reference xml from the Server.ProcXml table for the past instance and used that as the item reference field when we were starting a new instance to mimic the past ones. This is a field in addition to the data fields when we click start new from workspace. After starting this instance, we did a gotoactivity to get the workflow to where we needed, upon opening this client event we no longer saw the error with the ID property not being set.

We also needed to change the viewflow link stored in the smartobject to point to the correct proc instance ID since the new instances with the proper configuration are a different proc inst ID than the ones that errored out. We did this via the smartobject service tester tool and did the "Save" or "Update" method on this smartobject to manually change the view Flow URL. After doing this we saw the desired behavior and they could complete the previously errored out workflow instances as intended.




 
Be the first to reply!

Reply