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

Provide the Session variable by default in the fn.documentExists function

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 38
    • Component/s: Automation
    • Tags:
    • Sprint:
      nxGang Sprint 8.3.6

      Description

      When using the fn.documentExists function you are being asked for a CoreSession variable.

      Since this variable is already exposed in the automation context as Session, we should expose the autocomplete in Studio as Fn.documentExists(Session, "docIdOrPath") instead of ("session", "docIdOrPath") to make it easier to use.

      The function description could be improved to the following:
      Checks if the document exists. Returns a boolean value. The Session parameter is the CoreSession: leave it to Session unless you have a very good reason not to. This function can be used for instance in the RunOperation operation as a condition to trigger a specific subchain. e.g.: create a specific structure if it does not exist yet: @

      {Fn.documentExists(Session, "docIdOrPathToCheck") ? "createStructureChain" : "existingStructureChain"}

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                PagerDuty

                Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.