Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

681 Update Intent Naming Conventions #701

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/intents/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ const intentsAndApps = await fdc3.findIntentsByContext({

## Using Intents without a context
As the [Desktop Agent API](api/ref/DesktopAgent) and [App Directory](app-directory/overview) both
require a context to specified whereever intents are used, using an intent without a context is
achieved through the use of an explcit `null` context type `fdc3.nothing`. By using an explicit type
require a context to specified wherever intents are used, using an intent without a context is
achieved through the use of an explicit `null` context type `fdc3.nothing`. By using an explicit type
to represent a lack of context we allow applications to declare their support for a lack of
context.

Expand Down
58 changes: 48 additions & 10 deletions docs/intents/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,20 @@ title: Intents Specification (next)

FDC3 [Intents](intents-intro) define a standard set of verbs that, in conjunction with context data acting as nouns, can be used to put together common cross-application workflows on the financial desktop.

### Naming Syntax
### Naming Conventions

The FDC3 standard included two initial Intents which were `View___` and `Start___`. As more use cases were identified it was clear further Intents were required.

Naming of Intents must follow the below guidelines:
* Intent names should be free of non-alphanumeric characters.
* ‘.’ will be used to namespace the intent (see below).
* Intent names should be in UpperCamelCase.

> **Note:** The naming guidelines should be adhered to when creating future Intents. This is to ensure they meet the criteria for addition to the FDC3 standard.

### Characteristics

Intents shoulde be:
When creating Intents they should be:
* Recognizable
* Generally self-evident what the thing is
* Repeatable
Expand All @@ -31,29 +37,61 @@ Intents shoulde be:
All standard intent names are reserved. Applications may use their own intents ad hoc.
However, there is a need for applications to ensure that their intents avoid collision. The recommended approach here is to use the app name as the noun. For example, the ‘myChart’ App may expose the ‘ViewChart’ intent and the ‘myChart.Foo’ proprietary intent.

### Intents

The FDC3 2.0 standard expanded the Intents that are available. The list of available Intents are the following:

### `View___`
* Expected context: Contact

### `Start___`
* Expected context: Contact

### `Create___`
* Expected characteristics: Create a new record, but fail if it already exists

### `Update___`
* Expected characteristics: Update an existing record, but fail if it does not exist

### `CreateOrUpdate___`
* Expected characteristics: todo

### `Delete___`
* Expected characteristics: Delete an existing record, but fail if it does not exist

### `Get___`
* Expected characteristics: Retrieve an existing record, but fail if it does not exist

### `Share___`
* Expected characteristics: Share an existing record, but fail if it does not exist





## Initial Set of Standard Intents ##
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we need this anymore and could replace with a comment that standardized intents are defined in the following pages, otherwise just cut it down to a bulleted list with each entry having a link to the relevant page...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @kriswest is there a way to have a directory of the Ref/ folde? As this will allow future intents to appear as and when they are added?

As currently I need to include a hyperlink for each definition.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've got the sidebar nav, but thats all. Hence, we either remove the list and just mention that the individual types are on subsequent pages, or manually add a link for each...

It would be fine (and probably easier) to do this all in a subsequent PR when we've got the full set of intent and context PRs lined up.


### StartCall
### `StartCall`
* Expected context: Contact
* Expected behavior: initiate call with contact(s)
### StartChat
### `StartChat`
* Expected context: Contact
* Expected behavior: initiate chat with contact(s)
### ViewChart
### `ViewChart`
* Expected context: Instrument
* Expected behavior: display a chart for the context
### ViewContact
### `ViewContact`
* Expected context: Contact
* Expected behavior: display details of a contact
### ViewQuote
### `ViewQuote`
* Expected context: Instrument
* Expected behavior: display pricing for an instrument
### ViewNews
### `ViewNews`
* Expected context: Instrument, Contact, Organization, etc.
* Expected behavior: display news for a given context
### ViewInstrument
### `ViewInstrument`
* Expected context: Instrument
* Expected behavior: display relevant information for a given instrument
### ViewAnalysis
### `ViewAnalysis`
* Expected context: Instrument, Organization, etc.
* Expected behavior: Send context to receiving application for displaying analysis