Skip to main content

Hi there,


I'm using infopath to create a form, there are 2 buttons - "Save" and "Submit". The submit button should save the field data into SmartObject (using codes), and also execute the workflow. My problem now is that I'm able to save the data into SO, but failed to execute the workflow. When integrating the infopath to workflow, i chose "Infopath" instead of "Web Browser", because I need to have "Save" button. How can i execute workflow in such design?


 

Hi mimi,


A couple of questions here for you - are you saying that when you click the 'Submit' button it fails to start the workflow process?  Is there an error, or it just goes away?  Do you need to have the option to edit the form in the browser?  I ended up making my own submit and save buttons so I could use my forms in the browser, it isn't too difficult and I can walk you through it if it comes down to that. 


 


Hi tbyrne,


When i click "submit" button, the data all saved to SO, but there is no error in workflow, it's just nothing happen. I checked the process instance, nothing there. Yes, actually i also need an edit button so the user can edit the previously saved form for later submission. It's great if you can walk me through on how you did it. Actually I'm doubt whether to choose to view the form in "Infopath" or "Web browser"..


 


Mimi,


It is always better to view the form in InfoPath if there is not a reason to do otherwise - InfoPath in the browser is very limited and at times can be a bit tricky to work with.  To help debug your submit problems, I would run the K2 server in console mode and keep an eye on it when you submit the form.  Often times you'll be able to see why the process isn't starting when you watch the console output.  Once we get the submit working, then we can deal with the Save. 


 


Hi, I managed to execute the workflow now. But how should I let the approver see the form in infopath rather than web-browser? Btw, do I need to use Load method to display all the data that has been submitted by user? Actually I use main datasource to capture the user input, then run codes to save them all to SO. Any helps and suggestions would be appreciated.


If you can say that everyone on your system (the approver included) will have InfoPath installed on their local machines, then your tasks should open in InfoPath by default.  Using the browser takes a few extra steps, so hopefully you don't need to view the form in a browser.


Yes, you would use the 'Load' method to pull your data from your SmartObject back into the form.


Hi,


I've a question here. My "Submit" button actually need to do 2 things, save data to SO (through codes), then execute workflow (set rule >> "Submit Workflow Service"). For the moment, I create another button which will call the service. Therefore user has to click 2 buttons. Actually I want to hide the second button. May i know how can I write codes to fire the hidden button click event, so that it will automatic execute the workflow without clicking 2 buttons?


Sadly, I haven't found a way to do that in InfoPath.  I just put the save and submit rules all in one button.

Hi,


I'm still unable to let the approver open the form in infopath. When I click on the worklist, it shows me "The form cannot be displayed because session state is not available. " in browser. May I know how can I resolve this? Actually I'm login into the same development server using the approver username, so the infopath is actually installed already.


I haven't forgotten about you, I just don't have a quick answer for this one.  If you get past it, please post the solution here.

Hi mimi,


Am new to Infopath.My requirement is also similar to yours like saving the form data and triggering the workflow. Would you please share your thoughts. If you can share sample code it would be quick.


Appreciate your help. Thx in advance.


Hi! Maybe you can help me?


Please, tell me, how to start a workflow on button click in IP-form?


hjvfirf,


To submit a K2 workflow from a button in InfoPath, all you need to do is to add a rule to the button. In this rule you need to add the action of "Submit using a data connection" and choose the data connection "Submit Workflow Service". That's all.


Steve


Hi Steve! Thanks fro the answer! But I'm the junior in the IP and I haven't found jow add data connection "Submit Workflow Service"((( in the list of types of connection I have: send to web-service, library of the documents of the sharepoint, as message of e-meil, environment of exterior layout(((


If you use K2 to integrate with your InfoPath form, it will add that data connection for you.


sboldt, how can i setup K2?


Reply