Start a workflow with a form
You can start workflows designed in the K2 Workflow Designer by configuring a view or form rule. You can, for example, use a form to capture and retrieve data, and when the form is submitted, a workflow starts. You configure rules in the Rule Designer.
Example of a workflow configured to start with a form- Create or Edit a workflow.
- Select the Start step and click the expand / collapse toggle to expand the Configuration Panel. You can also double click the step to expand the panel.
For more information on how to configure a condition on the start rule, see the Conditional Start Rule topic. For more information on the warning message, see the Why do I have a yellow warning indicator on my Start step? section in the Start Step topic. - Select the Start with a Form option.
- From the Choose SmartForm page, browse to the form, and then click OK.
- The Start Workflow from a Form page displays the References as follows:
- In this example, four data sources were found in the selected form. Click the deselect icon to deselect and not create item references.
- Click Next. The Start Workflow from a Form page opens.
- In this example, your form does not start the workflow yet and needs additional configuration. The table below explains the available Start Rule options:
-
In this example, select Help me configure it and click Next.
- From the Form State section, configure the state to contain the open worklist item rule action.
- In this example, select the Create a new State option and click Next.
- From the How does your form start the workflow section, you select the rule and the location within the rule to define the set of actions to start the workflow.
- Click Next. Click Save and Finish on the Almost Done page.
- Changes are made, and then the Success page displays. Click OK.
- The setup and configuration is complete.
- To view the references, click the expand / collapse toggle to expand the Context Browser. Select the Fields tab and click References.
- To edit the form, click the Edit link. Step through the configuration wizard again and select the Show me the settings option to edit them.
- To delete the form configuration, select it and click the Trash bin.
- A list of options display. Check or uncheck the items to delete. All options are selected by default. Click Delete Event.
- To add additional forms to start the workflow with, click the Add button and select Add a SmartForm start event.
-
Your changes are automatically saved.
For more information about the different browse states and errors, see the Browse States topic.
For more information on how to use the breadcrumb bar, see the How to use the Breadcrumb topic.
This page inspects the form to determine the data sources. Use this to populate references within the workflow. Any view data source to item reference matches are grouped together.
If no matching data sources are found, any unmatched View Data Sources are set to Create Item Reference. If matching data sources are found, any unmatched View Data Sources are set to Do Not Create Item Reference.
Option | Explanation |
---|---|
Do it for me |
The K2 Workflow Designer configures the Start rule action for you. This is the default option. |
Help me configure it |
The K2 Workflow Designer adds additional steps to assist you in configuring the Start rule action. |
I will do it myself later |
You will configure the Start rule action at a later time. |
The table below explains the available Form State options:
What are states and how are they used? A state is a specific format and set of behaviors applied to a form, generally through rules. A form can have multiple states, with each state rendering the same form but with different configurations.
Example: A form may have a state called Read-Only and for that state the form controls are disabled and the submit button hidden. The same form may have another state called User Input where the form controls are active and the submit button is displayed. Generally speaking, a new state is created for each task because you potentially have different requirements depending on various tasks that use the same form. The User Input state has all of the form controls active, but perhaps in a Manager Approval state only the Comments control is active.
The two most common methods for creating states are from the form's rules page when editing the form and from Task / Form settings configuration discussed here.
Make use of the Previous button to return to the previous page of the wizard.
The table below explains the available Open Task Rule Action options:
Option | Explanation | How to Use |
---|---|---|
Form Rules |
Default rules are added to identify which rule should start the workflow. |
Select a rule to execute the workflow from the menu. Click the Refresh link to refresh available form start rules. |
Actions |
Rule action execution can be customized within the workflow. |
Click and drag the open task rule action to the desired location within the rule. |
For more information on forms and views, see the Forms and Views topic.