Symptoms
Client had built a couple of forms then wired them up using the Smartforms Client event in the workflow.
The workflow and/or events involved were then deleted, and another workflow using the same forms was created.
When trying to deploy the package, they are getting errors related to unresolved references for client events.
The form rules that related to these events ("If current event is...") no longer exist in the form.
Diagnoses
When looking at the xml of the forms we see a lot of references to the OLD workflows that are no longer used
We checked out the forms and views and I stepped through all their rules to update the xml of the process(next next finish), also looked if there were any references to the old workflows and could not find anything.(issue remained)
We ran through the smartforms Integration wizards of the new workflows and redeployed. (issue remained)
We got the client DB and reproduced the same issue experienced when trying to Package and Deploy and asked for Labs assistance.
Resolution
Labs created a custom script to remove the old XML on the client DB.
We tested on our environment first and found the solution to be working.
This fix was then successfully applied on the customers environment and they could create a package and deploy to their live environment.