Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Interface ITaskResultBuilder

interface ITaskResultBuilder
Extends com.amazon.apmf.IStandard The ITaskResultBuilder is used to create an object that conforms to ITaskResult. The ITaskResult can then be submitted to post updates about Task execution and to indicate success or failure to the TaskManager.

Methods

data()

ITaskResultBuilder* data(com.amazon.apmf.IStandard* data)
Set a strongly typed result payload to communicate the results of the task execution. The payload may be any valid Omnikit Data Object. Submitting results with user defined data is a convenience for directly alerting Task Observers active at that point in time. They are not a substitute for persisting results so that they can be retrieved when the caller runs in the future. Task Manager does not offer any result storage capability.

Parameters

data
com.amazon.apmf.IStandard* — Required Payload to be sent.

Returns

ITaskResultBuilder* An ITaskResultBuilder instance that can be used for further calls.

build()

ITaskResult* build(TaskCompletionStatus completionStatus)
Builds a ITaskResult with the set parameters. If a terminal status from TaskCompletionStatus is posted in ITaskResult, the task handler should return. The system will stop the app process soon after. Post TaskCompletionStatus::IN_PROGRESS when posting intermediate results. Note that calling this method is the last step after calling other methods in the builder.

Parameters

completionStatus
TaskCompletionStatus — Required Completion status to indicate progress or final outcome.

Returns

ITaskResult* A ITaskResult instance to be given to TaskManager for submitResult().

Throws


Last modified on October 29, 2026