| K2 blackpearl Installation and Configuration Guide > Troubleshooting > InfoPath > Action not found error in InfoPath | Send feedback |
When an InfoPath client event requires only one outcome, i.e. there is only one possible route to the next activity, an error may occur if the user is unaware of how the K2 platform assigns Actions. Regardless of the type of outcome selected, an error occurs in InfoPath displaying the Some rules were not applied dialog box:
InfoPath cannot submit the form.
An error occurred while the form was being submitted.
The SOAP response indicates that an error occurred on the server:
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Exception: The worklist item cannot be completed due to the following reason: Action not found
at SourceCode.Workflow.RuntimeServices.InfoPathFunctions.HandleException(Exception ex)
at SourceCode.Workflow.RuntimeServices.InfoPathFunctions.SubmitInfoPathData(Object infoPathFormXml)
at SourceCode.Workflow.RuntimeServices.InfoPathService.SubmitInfoPathData(Object infoPathFormXml)
--- End of inner exception stack trace ---
However, when using the Action(s) > Task Complete option from the folio dropdown in K2 Workspace the task item completes successfully.
![]() |
Create a data field in the Form with a default value equal to the action that is created in K2. For example: If the action is equal to Yes, then the default value of the Data Field will also be equal to Yes. In this example this error can therefore be resolved by changing a Task Completed action to Yes and setting the data field Completed to a default value of Yes. |
![]() |
Run the InfoPath client event wizard and set the Task Action Field to the Completed data field in the XML/Process/my:myFields structure. If the wizard asks to create the control, click No. Complete the wizard setup. |
![]() |
When running the InfoPath wizard, K2 automatically creates a rule under the form Submit Options called Set Workflow Task Action in which it sets the value of the ActionName field to be the name of the DataField in which it will look for the action result. Check that the wizard has created the rule. |
In K2 blackpearl the WorklistItem object contains a collection property called Actions. This property can be used by the UI to get a list of actions that is not only available on the activity but also available for a specific user. This increases the functionality of the WorklistItem and decreases the maintenance requirements.
For example; if an activity has 2 destinations (i.e. Bob and Joe), they can both execute or complete the task by selecting any one of the actions available. In an escalation we can set permissions on an action for a user (even one that was not even part of the original destination rule) to escalate the task to a higher authority, without having to redirect or loop back onto the activity to get the task to the new user. A user may also be given permissions to open the task in View format which will allow the user to open the task but not execute any one of the actions.
The WorklistItem drop down is populated with the available actions, so the InfoPath Form simply needs to call the Execute method of the Action object.
![]() |
The WorklistItem.Finish method, however, is still available for backwards compatibility. |