Action - getAvailableResources

Purpose:

When invoked, this action will allow the user to select and attach files from the host applications document repository (the Encompass eFolder, for example), or upload attachments from their local drive. \n \nReferences to said file attachments - referred to as resources in the EPC API - are made available to the caller of this method once the action is fulfilled by the user.

Inputs:

None

Returns:

Type: Promise

==> Resolved

A list of the attachments - referred to as resources in the EPC API - and associated attributes:

[
  {
    id: "<id>",
    repository: "urn:elli:skydrive",
    name: "<name>",
    mimeType: "<mimeType>"
  },
  {
    id: "<id>",
    repository: "urn:elli:skydrive",
    name: "<name>",
    mimeType: "<mimeType>"
  }
]

The id, name and mimeType attributes need to be echoed back to the EPC platform for each selected resource, as part of the transaction.create() method call when initializing a transaction (under the $.request.resources object). Read the transaction.create() method reference for more details.

Also - if the user closes the file selection modal without attaching any files - the Promise will resolve to an empty array - []

==> Rejected

An error is raised, containing a message attribute with details on the error that occurred

{
  message: "{{ERROR_DETAILS}}"
}