Action not found error when submitting InfoPath form

Last post 05-09-2008, 3:36 AM by samuel. 8 replies.
Sort Posts: Previous Next
  •  09-18-2007, 2:47 AM 18716

    Action not found error when submitting InfoPath form

    I have an InfoPath form integrated to a workflow.  I can open the form and successfully submit to the workflow and start an instance. 

    It creates an InfoPath client activity that I can open in the K2 worklist. 

    But when I try and submit the form I get the message ‘Some rules were not applied’ and the details are a SOAP error

    ‘The worklist item cannot be completed due to the following reason: Action not found.

     The InfoPath client event is connected to a another InfoPath client event with a single line,  and under ‘Configure Outcomes’ I have used the default ‘Task Completed’.  But it is on the first client event that I get this error. 

    Any suggestions?

  •  09-18-2007, 3:45 AM 18720 in reply to 18716

    Re: Action not found error when submitting InfoPath form

    The reason for this is that K2 needs to look at a field that holds the action value i.e. in the instance of an Approve/Decline event then K2 needs to look at a field carrying the result in order to determine what outcome line(s) to follow.

    1. Create a field in the InfoPath main data source to store the action e.g. ActionResult. Make the default value "Task Completed" i.e. the same value as the action on the activity.
    2. Run the InfoPath client event wizard and set the Task Action Field to the ActionResult XML field in the InfoPath XML structure and click next. Click "No" on the pop box to bind the field to a drop-down control.
    3. Click Finish.
    4. Redeploy.

    The statements and opinions made in my postings are my own, and do not reflect the opinions of SourceCode Technology Holdings, Inc. or its subsidiaries. All information is provided as is with no warranties, express or implied, and grants no rights or licenses.
  •  09-18-2007, 3:50 AM 18721 in reply to 18716

    Re: Action not found error when submitting InfoPath form

    Hi Charles,

    I suspect something went wrong with your InfoPath template - sounds like a rule/action is not present.

    I would recommend opening a formal support ticket.

    Regards,

    Ockert


    The statements and opinions made in my postings are my own, and do not reflect the opinions of SourceCode Technology Holdings, Inc. or its subsidiaries. All information is provided as is with no warranties, express or implied, and grants no rights or licenses.
  •  01-04-2008, 10:34 AM 20888 in reply to 18721

    Re: Action not found error when submitting InfoPath form

    I’m executing update and finish Actions from the object model(SourceCode.Workflow.Client) and from the k2 webpart, and it has worked fine.

    But now I can’t get the list of actions associated to the worklist items through the object model. It’s the same code as before, I re-deployed my k2 project and nothing, removed  and created new reference for SourceCode.Workflow.Client and nothing. But in K2 webpart I can still see the actions and execute them.

     

    WorklistItem owItem;

    ……..

    ……..       

    foreach (Action oAction in owItem.Actions)  //-> Doesn't find actions! Why?

    {}          

  •  01-04-2008, 10:37 AM 20889 in reply to 18721

    Re: Action not found error when submitting InfoPath form

    I’m executing update and finish Actions from the object model(SourceCode.Workflow.Client) and from the k2 webpart, and it has worked fine.

    But now I can’t get the list of actions associated to the worklist items through the object model. It’s the same code as before, I re-deployed my k2 project and nothing, removed  and created new reference for SourceCode.Workflow.Client and nothing. I can still see and execute tha actions on the k2 webpart.

     

    Code:

     

    WorklistItem owItem;

    ……..

    ……..                     

                foreach (Action oAction in owItem.Actions)

                {

    ......

                }             

  •  01-05-2008, 1:20 PM 20923 in reply to 20889

    Re: Action not found error when submitting InfoPath form

    Where is this code you wrote residing?  In an web page, infopath form...?  Are you getting a compile time error or are the actions just not displaying at run time?


    The statements and opinions made in my postings are my own, and do not reflect the opinions of SourceCode Technology Holdings, Inc. or its subsidiaries. All information is provided as is with no warranties, express or implied, and grants no rights or licenses.
  •  02-27-2008, 9:00 AM 22145 in reply to 20923

    Re: Action not found error when submitting InfoPath form

    I have the same Infopath error: "Some rules were not applied".
    The problem is in "K2 Action" because this use web service data connection.
    Well, look in smartobject services (K2 Workspace ---> Management Console)  if exits a "Dynamic web services" service. If not exist add it and select in dropdown service this:

    k2.backpearl.UKEU.ServiceObjects.DynamicWeb.ServiceBrokers.ServiceBroker

    So... I added this services and after I don't receive any infopath error.  

     

  •  05-09-2008, 2:31 AM 23731 in reply to 20889

    • jsun027 is not online. Last active: 08-19-2008, 4:06 PM jsun027
    • Not Ranked
    • Joined on 05-01-2008
    • Wellington, New Zealand
    • Posts 1
    • Points 4

    Re: Action not found error when submitting InfoPath form

    I had this exact problem today, and fixed it by making sure that the K2 server connection I used to retrieve that worklistitem is under the respective activity destination users. I think it's because only the destination users have the permission to see the actions and act on them.
  •  05-09-2008, 3:36 AM 23732 in reply to 23731

    Re: Action not found error when submitting InfoPath form

    There are a few considerations to take into account when working with task actions whether it be in InfoPath/ASP/WinForm/[Other Forms Technology]:

    1. It is best practise to retrieve the list of actions from the K2 WorkList Item and build up a drop-down list, dynamic buttons, etc. This will ensure that the correct list is returned based on security rights. The security rights applied include:
      • The user has to be a destination user on the client event OR the client event must be set that anyone can action the task.
      • The Action Permission Rights, set via the K2 Workspace per action per activity per user, permits the correct users to view the actions. This is exclusive rights and therefore by default there is no permissions settings so that the destination users of the client event have access to all actions.
      • The form (any technology) has to use impersonation in order to pass the correct credentials to retrieve the action list.
    2. With regards to InfoPath Client Events, it is easier to specify the Task Action Field so that K2 knows what InfoPath Form Field to check for the action value submitted. K2 will also automatically map the WebService call to retrieve the action list if you specify to bind the field to a drop-down list.
      Caveat: If you do not set the Task Action Field, then you will need to manually add a rule in the InfoPath Form to set the Action under the _K2 XML node. If you have more than one action, you will also need to build a hard-coded action list in a drop-down list if you do not make use of the K2 WebService call. The latter is recommended as K2 will also apply permissions rights as mentioned in (1) above.

      This is normally where the issues arrise as the Task Action Field is not correctly specified or the _K2 action field is not correctly set.

    Hope this helps.


    The statements and opinions made in my postings are my own, and do not reflect the opinions of SourceCode Technology Holdings, Inc. or its subsidiaries. All information is provided as is with no warranties, express or implied, and grants no rights or licenses.
View as RSS news feed in XML