Skip to content

Commit

Permalink
Adding note about intents that return data and TransactionResult to I…
Browse files Browse the repository at this point in the history
…ntents spec
  • Loading branch information
kriswest committed Sep 1, 2022
1 parent b601840 commit 5b0ccbf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/intents/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,12 @@ const intentsAndApps = await fdc3.findIntentsByContext({
});
```

## Intents that return data

From FDC3 2.0, intents raised through the Desktop Agent API may return results in the form of a `Context` object or a `Channel`. Where an intent implements a transaction with another application, for example for a CRUD operation, the [`fdc3.transactionResult` context type](../context/ref/TransactionResult) SHOULD be used to provide a result status for the transaction and may wrap a context object that would otherwise be returned.

For more details on retrieving a result from a raised intent, see the [documentation for `raiseIntent`](../api/ref/DesktopAgent#raiseintent).

## Intents Standard Compliance

An FDC3 Standard compliant application that supports intents **MUST**:
Expand All @@ -137,6 +143,7 @@ An FDC3 Standard compliant application that supports intents **SHOULD**:
* Prefer FDC3-defined standard intents over proprietary intents, where a suitable standardized intent is available.
* Ensure that proprietary intents follow the recommended naming conventions in the specification.
* Apply [namespacing](#namespaces) to proprietary intent names, where it is necessary to avoid collision with those created by other applications.
* Use the `fdc3.transactionResult` context type to return a status for any transactions relating to CRUD operations.

An FDC3 Standard compliant application that supports intents **MAY**:

Expand Down

0 comments on commit 5b0ccbf

Please sign in to comment.