Skip to main content

Using K2 Five, I created a Purchase approval process and I am getting a "Key could not be found in the collection" error after clicking the submit button on the form.

Going in to the form rules, I notice that this takes place in the "Start the PR Workflow" step. When I click configure, there are 3 item references in the workflow input fields (Purchase req header, Purchase req details and attachements smart objects). The message goes away if I remove the Purchase req detail smart object but then the workflow doesnt start.

 

This error wasn't there before and the form was working perfectly. could someone explain why this happens and how to resolve?

Thanks,

MAref

The error message is gone, but your workflow doesn't start? Did you check on the Management page if the workflow has started?


 


In you form, try inserting a show message rule before and after the start workflow rule. Before the start workflow rule, show a message showing all the inputs you intend to pass into your workflow. Then configure your start workflow rule to output the process instance ID to a data label in your form. After the start workflow rule, show a message displaying the data label that contains your process instance ID.


 


The above allows you to check if whatever you intend to pass into your workflow is valid, and if you workflow has started. If your workflow has started, you should see the process instance ID in the message box.


 


I was able to fix it by removing all references links in the workflow and re-linking again.

Not sure what went wrong but its working now.

Thanks,

MAref


Reply