3. Create Application Elements for the Hello World List
In this step, you create application elements for the Hello World list. You generate data objects based on the Hello World list and a workflow that starts when you add a new item to the list. Finally, you create a reports page that displays information about Hello World Workflow instances.
For the most part, SharePoint applications associate with one primary list or library. You can use other lists and libraries as data sources, but there is generally one primary list or library. When creating applications from a SharePoint list or library, you can select from the following components: Data, Forms, Workflow, Reports. You do not have to select all the components at the same time, however.
-
Create the following application elements for the Hello World list: Data, Workflow, and Reports. Name the workflow Hello World Workflow (which should be the default). Select an item is added for the workflow start option.If you are working in a shared environment where there are multiple builds of the same application, consider adding your initials to the workflow name to distinguish it from other workflows. For example, Hello World Workflow KL.
- Create application elements for the Hello World list by clicking the K2 menu option in the toolbar, then Application.
- On the Create K2 Application screen, CHECK the boxes to select the Workflow and Reports components. Notice that Data is already selected. When you create application elements from a SharePoint list or library, the Data component is selected by default.
- In the Workflow section, configure the workflow settings as follows:If you are working in a shared environment where there are multiple builds of the same application, consider adding your initials to the workflow name to distinguish it from the others. For example, Hello World Workflow KL.
Item Value Comments Name Hello World Workflow This is the name of the workflow as it appears in reports. Start Option When the following events occur
'An item was added'You want this workflow to start automatically when you add a new item to the Hello World list. - Click OK at the bottom of the screen to create the application elements.
The Create K2 Application page opens. From here, you can decide which elements you want for your application. For this application, you select Data, Workflow, and Reports. You will not implement the Forms component in this tutorial.
The application elements are generated and the Workflow Designer launches. You will see an animated tip box, click CLOSE to continue.
- Create application elements for the Hello World list by clicking the K2 menu option in the toolbar, then Application.
Review
In this step, you created application elements for the Hello World list. The data element is the list itself and stores line items that you add. The workflow element updates a list item or deletes a list item, depending on the response decision. The report element provides insight to workflow instance activity. In the next step, you begin building out the Hello World Workflow.