K2 Tips & Tricks #2 – Using the InfoPath toolbar Submit button as a task action
Sometimes, when using K2 blackpoint or K2 blackpearl, you encounter InfoPath forms that you only have one choice in the workflow. For example, you have an InfoPath form that the originator fills out and submits to IT. Then, IT fills out the required information and submits the form to accounting. No decision is made, just filling out the information needed and submitting the form. With the InfoPath client event, you need to specify a task action field to direct the outcome of the process. Usually, the client event wants you to bind to a drop down, but if you already know the outcome, this isn’t necessary.
Open up the InfoPath form in design mode from K2. Add a new field to the data source of data type string (ie. TaskActionSubmit). Set the Default value to Submit. Save the form and close it. Once K2 has let you know the form template has been updated, go to your InfoPath client event and below in the Task Action field, select the field you just created.
When you click Next, a popup will ask you if you want to change the drop down configuration. Select NO.
Click Next through the wizard until the Actions screen. Add an action called Submit (the same value you put in the default value field for the node you created in the data source of the InfoPath form). Check the box for generating a line for outcomes. Do the same for the outcomes screen. Then click Finish.
At this point, when you run the form, when the user clicks the submit button of the form, it will use the action field that you bound to direct the workflow.