SmartObjects
Use the SmartObject tab to access your SmartObjects and the data represented by them. The SmartObject tab shows you the category tree of the server. Navigate the tree to the SmartObject that you need for the input field. SmartObjects and their properties are displayed in green.
- Select the Folder
- Click on the arrow to the right of the SmartObject.
- Select the SmartObject method, and then drag and drop the property that you want to use, into the SmartField where you want to use that property
See the following resources for more information:
- See How To: Exclude a Previous Approver from a Task for an example of using the TaskAllocationRoleMethods SmartObject > Get Role Peers method.
- See How to: Use the custom SmartObject Get List Filter for information on how to use a custom filter on a SmartObject Get List method to return a list of items.
- See How To: Send a Message from a K2 Workflow to Microsoft Power Automate for an example of using a SmartObject step that calls the Flow SmartObject.
Considerations
- Not all SmartObject methods show in the Context Browser. It is limited to data that you can reference and use within your workflow. You only see methods that can return data, such as List, Load, and Execute methods.
- If you want to use Create, Edit, Delete and Update methods, add and configure a SmartObject step in your workflow. For more information see SmartObjects Overview.
- Drag a SmartObject Load method property from the Context Browser into a SmartField. All available and required properties for the Load method appear in the Configure Section. (In some cases, optional properties or parameters may not appear in the Configure Section, for example when you use SmartObject Load methods based on SharePoint or on SQL stored procedures. To use optional properties and parameters, click the Open Configuration Panel button, and then from the Properties tab, click Add for the properties or parameters you want to use. If there aren't any optional properties or parameters, the Open Configure Panel button is not available.)Example of a SharePoint based SmartObject
In this example, you integrate a custom list with K2 for SharePoint and create a SmartObject and a workflow. Open the workflow and drag a Set Folio step onto the canvas. Open the Context Browser and select the SmartObject tab. Browse to the SharePoint site and the list you created. From Get List Item By Title, drag the Version property of a Get List Item By Title load method into the Set Folio field. The SmartField Composer opens. The required SmartObject properties show in the Configure Section. To add optional properties or parameters, click Open Configuration Panel followed by the Add icon as shown here.