Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 5.13
    • Fix Version/s: Sooner, Contributable
    • Component/s: Engine, Rest
    • Labels:
      None
    • Number of attachments :
      4

      Description

      The response for /form/form-data rest api does not include variable name associated with the form data. This puts a serious constraint on the custom client development. Following simple changes will take care of this.

      FormProperty to have getVariableName method
      FormPropertyImpl to have attribute variable name
      RestFormProperty to have attribute variable name and getter/setter
      RestResponseFactory.createFormDataResponse to have restFormProp.setVariableName(formProp.getVariableName())

      Files attached with required code.

      1. FormProperty.java
        2 kB
        Prashant Mirajkar
      2. FormPropertyImpl.java
        2 kB
        Prashant Mirajkar
      3. RestFormProperty.java
        2 kB
        Prashant Mirajkar
      4. RestResponseFactory.java
        38 kB
        Prashant Mirajkar

        Activity

        Hide
        Frederik Heremans added a comment -

        That's the whole idea of the form-properties: abstracting away how a single form-property is stored in the engine, and simplifying it when "not" specifying a variable-name, the form-property name is used.

        The variable-name is an engine-facing property. The REST-api exposes the form-properties the way the Java-api does this...

        Show
        Frederik Heremans added a comment - That's the whole idea of the form-properties: abstracting away how a single form-property is stored in the engine, and simplifying it when "not" specifying a variable-name, the form-property name is used. The variable-name is an engine-facing property. The REST-api exposes the form-properties the way the Java-api does this...
        Hide
        Prashant Mirajkar added a comment -

        Fredrik,

        When a user starts a process with some initial data specified through form properties or completes a task with values specified through form properties, the respective REST APIs require variables to be provided as process/task status change and variables' value assignments need to happen in a single transaction. Starting the process or completing the task without variables and posting form properties through two different REST APIs provided won't work.

        Therefore developer needs to know the association between form property and engine variable.

        Am I missing something here?

        Show
        Prashant Mirajkar added a comment - Fredrik, When a user starts a process with some initial data specified through form properties or completes a task with values specified through form properties, the respective REST APIs require variables to be provided as process/task status change and variables' value assignments need to happen in a single transaction. Starting the process or completing the task without variables and posting form properties through two different REST APIs provided won't work. Therefore developer needs to know the association between form property and engine variable. Am I missing something here?
        Hide
        Frederik Heremans added a comment -

        You can either use the form-approach (using form-properties as-is) or use the raw variables and corresponding calls in the REST-api (update variables/complete task or start process with variables provided).

        Show
        Frederik Heremans added a comment - You can either use the form-approach (using form-properties as-is) or use the raw variables and corresponding calls in the REST-api (update variables/complete task or start process with variables provided).
        Hide
        Prashant Mirajkar added a comment -

        The Submit Form Data REST API for task marks the task completed along with data submission. I was assuming till then that form data submission and task completion would be two independent acts.

        From the documentation I did not realize this until I played with the API and some code review.

        With that understanding I agree with the resolution.

        Show
        Prashant Mirajkar added a comment - The Submit Form Data REST API for task marks the task completed along with data submission. I was assuming till then that form data submission and task completion would be two independent acts. From the documentation I did not realize this until I played with the API and some code review. With that understanding I agree with the resolution.
        Hide
        Frederik Heremans added a comment -

        Okay, makes sense now why you requested such a change

        Show
        Frederik Heremans added a comment - Okay, makes sense now why you requested such a change

          People

          • Assignee:
            Frederik Heremans
            Reporter:
            Prashant Mirajkar
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: