Uploaded image for project: 'Nuxeo Studio'
  1. Nuxeo Studio
  2. NXS-2749

Automation scripting - Documents should be returned as DocumentWrappers

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 24.7
    • Fix Version/s: None
    • Component/s: Automation

      Description

      In automation scripting, when calling documents through operations (for instance Seam.GetDocumentsFromSelectionList): Documents are returned as a DocumentModel or DocumentModelList.

      This makes things totally inconsistent with what people are used to getting when using automation chains. Let's say your document is returned in the "doc" variable.

      • You cannot use doc["dc:title"] as you would be offered in automation chains.
      • If you use doc.getProperty("dc:title") as offered in automation chains, you end up with the property, not its value. That's logical from a dev point of view, not in automation chains where people expect to get the property's value from this.
      • No autocomplete is offered when you type doc or doc. and press ctrl+space. If people are not devs they cannot know what to expect from this object.

      => For more consistency with automation chains, documents should be returned in the same way in automation scripting than in automation chains, as document wrappers.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                bchauvin Bertrand Chauvin
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: