Interface ActionItemApi
Get it with api.actionItemApi(). It creates new Action Items (newActionItem()) and works with an
existing Action Item by its ID (withId(Long)): it updates, deletes or recalculates it. It also returns
the configured limits for newly created Action Items (getNewRecordsMaxLimits()).
The operations work only in contexts that allow object modification, and not in the "input generation" mode. In
other contexts, ActionItemApi.ActionItemBuilder.create(), ActionItemApi.ActionItemBuilder.doUpdate(),
ActionItemApi.ActionItemBuilder.doRecalculate() and ActionItemApi.ActionItemBuilder.doExecute() return null, and
ActionItemApi.ActionItemBuilder.doDelete() does nothing.
Example:
if (!api.isInputGenerationExecution()) {
def actionItem = api.actionItemApi().newActionItem()
.setSummary("Review the price increase")
.setType("__DEFAULT__")
.setAssignedTo(2147490696)
.create()
}
- Since:
- 11.0 - Paper Plane
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceHelper class to create Action Items.
The class exposes several methods of the type setXX() for properties of the Action Item.
The Action Item is then created in the database by invoking thecreatemethod. -
Method Summary
Modifier and TypeMethodDescriptionReturns configured limits for newly created action items.Initiates a builder object to create a new Action Item (AI).Initiates an operation with an existing Action Item (specified by ID).
-
Method Details
-
newActionItem
ActionItemApi.ActionItemBuilder newActionItem()Initiates a builder object to create a new Action Item (AI). The operation is finished with theActionItemApi.ActionItemBuilder.create()method.Example:
def actionItem = api.actionItemApi().newActionItem() .setSummary("A brief title of the Action Item") .setType("__DEFAULT__") .setAssignedTo(userId) .create()- Returns:
- a new instance of ActionItemBuilder
- Since:
- 11.0 - Paper Plane
-
withId
Initiates an operation with an existing Action Item (specified by ID). Supported operations areupdateanddelete.Example – updates the existing Action Item:
def actionItemId = 123 def actionItem = api.actionItemApi().withId(actionItemId) .setSummary("An updated summary.") .doUpdate()- Parameters:
actionItemId- The id of an existing Action Item- Returns:
- a new instance of ActionItemBuilder
- Since:
- 11.0 - Paper Plane
-
getNewRecordsMaxLimits
Returns configured limits for newly created action items.Example:
def limits = api.actionItemApi().getNewRecordsMaxLimits() api.logInfo("At most ${limits.limit} new Action Items per ${limits.timePeriod} seconds")- Returns:
- Map containing two keys:
- limit: number of newly created action items within a given time period
- timePeriod: timeframe in seconds within the limit is enforced. A counter of newly created action items is reset after the period elapses.
- Since:
- 11.2 - Paper Plane
-