No K2 actions in dropdown in Infopath form

  • 11 February 2008
  • 9 replies
  • 7 views

Badge +5

Hi,


I have a simple k2 workflow with an Infopath client event that has 2 actions / lines named "Accept" and "Archive" coming from it and connecting to 2 default activities with mail events. The Infopath event points to an Infopath form that has just one control, a dropdown field named frmAction. This dropdown is configured in Infopath designer as "Enter list box entries manually" with the default and unique entry "Select..." value added.


In K2, i use this form in the Infopath client wizard and in the Task Action Field i go to process activities and choose the XML field frmStart from my Infopath form.


When i click next, the wizard says that the field is not bound to a control and if i want to create a dropown control that lists the possible workflow task actions. I have tried both "yes" and "no" answers here.


I deploy the workflow, start it but when it reaches the activity with this infopath form, the dropdown appears but is empty.


I'm i missing something?


Thanks!


9 replies

Badge +7

Let me see if I understand you correctly.


You've created a form called: frmStart (XMLField is frmStart)


You've created a control on the form called: frmAction


this all sounds fine.


now, in the wizard you need to make sure you specify the field 'frmAction' and click 'Yes' when it asks if it needs to populate the dropdown.


this should result in a form with the two options 'Accept' and 'Archive'


however, check the form has the _K2 datasource, as this will tell you if the infopath integration wizard has been successful... also you'll only see the options 'Accept' and 'Archive' when you are viewing the form inside the workflow, not from disk, i.e. clicking on the xsn and opening it. K2 blackpearl will only populate the values during a process instance.


another thing to remember is that the xsn (InfoPath file) will be copied to your visual studio project folder when you integrate, so modifing the form outside of visual studio wont have any effect once you've integrated... modify the file using the wizard, and by clicking on 'design'... you may run into issues if you modify outside of visual studio post integration.


I hope this helps


Martin


 


 

Badge +5

Thanks mgallen.


And do i need to design the XSN template (in K2 infopath integration) to populate the dropdown field (here name frmAction) with external datasource "Get Workflow Task Actions Service" or should i leave it as is (i.e. filled manually although no values specified)?


I tried to implement the tutorial "Building an Infopath Integrated Workflow", but even if i follow every steps in there i still don't get the actions filled in the dropdown, i get a "no actions available" as value in the dropdown instead.


Thanks again.

Badge +7

Can you post some screenshots of the infopath integration wizard that you are completing?


You don't need to design the initial form in visual studio, but once you've integrated with the infopath integration wizard you should only design your form through visual studio and get the message 'your form has been updated' when you finish any changes in the wizard.


is this a K2 101 tutorial?


Martin

Badge +5

Hi


In attach to this post i have all screen shots from both the Infopath integration as well as client event. I hope it helps.


A couple of tests made here and still no actions being displayed...


As i said in a previous post, even if i follow all steps in K2 blackpearl tutorial "Building an Infopath integrated workflow" i cannot manage to see the actions on the dropdown ("No actions available" is what appears).


Thanks again!

Badge +5

Hi,


After a couple of experiments i manage to show at runtime the K2 actions on the Infopath dropdown.


There is an issue though, if i'm logged on the local machine with user "A" and on MOSS with user "B", if the activity's destination user is "B" then the dropdown in Infopath won't display the actions but "No actions available" instead.I have to log off user "A" from local machine, logon with user "B", launch MOSS with user "B" and now i'm able to see the actions on the dropdown.


This isn't a nice behaviour because K2 is using the user logged on the local machine to access the InfoPathWebService and get the actions, and ignors the presence of MOSS and the user logged there. This means that i only view the K2 actions on the dropdown if the destination user is logged on the local machine and MOSS...


Is this the only way to have it or is there any alternative?


thanks


 

Badge +9
May I ask how you are logging on to MOSS as a different user than whom you are loggin in to the local machine as?  I simply use 'run as' on IE to simulate running as a different user and I have never experienced any issues like what you are stating.  Sounds almost like MOSS is getting confused as to who you are?  Does it say 'welcome xxx' a the top, where xxx is the user name that you are expecting (user "B")?
Badge

Hi,


I am having the same problem populating the combo in the infopath form. I am logged on my computer as the same user logged into MOSS. The actions and outcomes are added in the Infopath client event as Approved and Declined, and the ComboBox in my infopath form is linked to the Webservice as a datasource.


When I open the form the only options in the combobox is "No Actions Available" and a blank. Any ideas would be appreciated!


 

Badge +9
The 'No Actions Available' action text typically means that the form being opened is associated with a task that is assigned to a user other than the user opening the form.  Is that a possibility?
Badge +3

Ive just come across this problem aswell, when trying to setup a demo/workshop environment.  Is there any way around this or will K2 always use whos logged in locally on the machine as opposed to the user logged into MOSS when retrieving the tasks/outcome list ?


 


Cheers,


 


 

Reply