Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-5897

Unify list and count methods in SDK JS

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Won't Fix
    • Icon: L3 - Default L3 - Default
    • None
    • None
    • sdk-js
    • None

      Currently it is very hard to predict what is going to happen when calling count or list on resources in the bpmn-sdk-js. For some resources a list query returns an object with count information and the actual list in the items property of the response, for others it is just the list of items. Same for count: Some resources return the count as number, others as object with a single count property.

      Reason for this behavior: There is a generic implementation of list and count in https://github.com/camunda/camunda-bpm-sdk-js/blob/master/lib/api-client/abstract-client-resource.js

      Every resource, that does not overwrite these methods will fall back to this default behavior (which does some magic, e.g. grab both count and list for a list query). Some resources need a more specialized version for list and count (e.g. POST methods), so they overwrite it, resulting in different behavior.

      AT:

      • data structure returned by the SDK is identical to the REST API documentation

        This is the controller panel for Smart Panels app

              Unassigned Unassigned
              sebastian.stamm Sebastian Stamm
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: