-
Bug Report
-
Resolution: Unresolved
-
L3 - Default
-
None
-
None
-
None
Environment (Required on creation):
- All distros, all databases
Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):
- Using the Fetch&Lock REST API, I cannot lock tasks that have a LONG-typed variable that I want to filter by if the number value in the REST request is small enough to be interpreted as an INTEGER. I receive an empty result although the external task should be found.
POST request
{ "topics": [ { "topicName": "myExternalTask", "lockDuration": 30000, "processVariables": { "offerId": 999 } } ], "workerId": "offerWorkerId", "maxTasks": 1 }
Steps to reproduce (Required on creation):
- Instantiate an External Task with a LONG-typed variable with a small value like 999.
- Try to fetch the task via REST API, providing a processVariables filter for the variable and the value 999
Observed Behavior (Required on creation):
- The External Task is not fetched and locked
- The query filters by type INTEGER
SELECT DISTINCT RES.* FROM (SELECT RES.*, PI.BUSINESS_KEY_, PD.VERSION_TAG_ FROM ACT_RU_EXT_TASK RES LEFT JOIN ACT_RU_EXECUTION PI ON RES.PROC_INST_ID_ = PI.ID_ INNER JOIN ACT_RE_PROCDEF PD ON RES.PROC_DEF_ID_ = PD.ID_ WHERE (RES.LOCK_EXP_TIME_ IS NULL OR RES.LOCK_EXP_TIME_ <= '2022-05-25 08:52:56.026'(Timestamp)) AND (RES.SUSPENSION_STATE_ IS NULL OR RES.SUSPENSION_STATE_ = 1) AND (RES.RETRIES_ IS NULL OR RES.RETRIES_ > 0) AND (RES.TOPIC_NAME_ = 'test' AND RES.PROC_INST_ID_ in (SELECT VAR.EXECUTION_ID_ FROM ACT_RU_VARIABLE VAR WHERE (VAR.NAME_ = 'testId' AND ((VAR.TYPE_ IS NOT NULL AND VAR.TYPE_ = 'integer' AND VAR.LONG_ IS NOT NULL AND VAR.LONG_ = 300))) )) ) RES
Expected behavior (Required on creation):
- The External Task is fetched and locked
Root Cause (Required on prioritization):
- The REST API transforms the given value into the smallest possible Java data type.
- A number value like `300` is transformed into an `Integer`.
- The query against our database to fetch the external task uses an `Integer` for filtering by the process variable.
- There is no variable with the given name of type `Integer`.
- No external task is found.
Solution Ideas (Optional):
- Ignore the specific type provided by the REST API conversion
- Provide all potential types in the query by duplicating the process variable filter for all variables
- Allow filtering by object values in the fetch and lock REST API
Hints (optional):
This is the controller panel for Smart Panels app
[CAM-14685] Fetching external tasks filtered by LONG process variables does not work with small values
Description |
Original:
h3. Environment (Required on creation):
* All distros, all databases h3. Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket): * Using the [Fetch&Lock REST API|https://docs.camunda.org/manual/latest/reference/rest/external-task/fetch/], I cannot lock tasks that have a LONG-typed variable that I want to filter by if the number value in the REST request is small enough to be interpreted as an INTEGER. I receive an empty result although the external task should be found. !image-2022-05-25-09-03-08-755.png|thumbnail! POST request {code} { "topics": [ { "topicName": "myExternalTask", "lockDuration": 30000, "processVariables": { "offerId": 999 } } ], "workerId": "offerWorkerId", "maxTasks": 1 } {code} h3. Steps to reproduce (Required on creation): # Instantiate an External Task with a LONG-typed variable with a small value like 999. # Try to fetch the task via REST API, providing a {{processVariables}} filter for the variable and the value 999 h3. Observed Behavior (Required on creation): * The External Task is not fetched and locked h3. Expected behavior (Required on creation): * The External Task is fetched and locked h3. Root Cause (Required on prioritization): # The REST API transforms the given value into the smallest possible Java data type. # A number value like `300` is transformed into an `Integer`. # The query against our database to fetch the external task uses an `Integer` for filtering by the process variable. # There is no variable with the given name of type `Integer`. # No external task is found. h3. Solution Ideas (Optional): h3. Hints (optional): |
New:
h3. Environment (Required on creation):
* All distros, all databases h3. Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket): * Using the [Fetch&Lock REST API|https://docs.camunda.org/manual/latest/reference/rest/external-task/fetch/], I cannot lock tasks that have a LONG-typed variable that I want to filter by if the number value in the REST request is small enough to be interpreted as an INTEGER. I receive an empty result although the external task should be found. !image-2022-05-25-09-03-08-755.png|thumbnail! POST request {code} { "topics": [ { "topicName": "myExternalTask", "lockDuration": 30000, "processVariables": { "offerId": 999 } } ], "workerId": "offerWorkerId", "maxTasks": 1 } {code} h3. Steps to reproduce (Required on creation): # Instantiate an External Task with a LONG-typed variable with a small value like 999. # Try to fetch the task via REST API, providing a {{processVariables}} filter for the variable and the value 999 h3. Observed Behavior (Required on creation): * The External Task is not fetched and locked * The query filters by type INTEGER {code:sql} SELECT DISTINCT RES.* FROM (SELECT RES.*, PI.BUSINESS_KEY_, PD.VERSION_TAG_ FROM ACT_RU_EXT_TASK RES LEFT JOIN ACT_RU_EXECUTION PI ON RES.PROC_INST_ID_ = PI.ID_ INNER JOIN ACT_RE_PROCDEF PD ON RES.PROC_DEF_ID_ = PD.ID_ WHERE (RES.LOCK_EXP_TIME_ IS NULL OR RES.LOCK_EXP_TIME_ <= '2022-05-25 08:52:56.026'(Timestamp)) AND (RES.SUSPENSION_STATE_ IS NULL OR RES.SUSPENSION_STATE_ = 1) AND (RES.RETRIES_ IS NULL OR RES.RETRIES_ > 0) AND (RES.TOPIC_NAME_ = 'test' AND RES.PROC_INST_ID_ in (SELECT VAR.EXECUTION_ID_ FROM ACT_RU_VARIABLE VAR WHERE (VAR.NAME_ = 'testId' AND ((VAR.TYPE_ IS NOT NULL AND VAR.TYPE_ = 'integer' AND VAR.LONG_ IS NOT NULL AND VAR.LONG_ = 300))) )) ) RES {code} h3. Expected behavior (Required on creation): * The External Task is fetched and locked h3. Root Cause (Required on prioritization): # The REST API transforms the given value into the smallest possible Java data type. # A number value like `300` is transformed into an `Integer`. # The query against our database to fetch the external task uses an `Integer` for filtering by the process variable. # There is no variable with the given name of type `Integer`. # No external task is found. h3. Solution Ideas (Optional): h3. Hints (optional): |
Description |
Original:
h3. Environment (Required on creation):
* All distros, all databases h3. Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket): * Using the [Fetch&Lock REST API|https://docs.camunda.org/manual/latest/reference/rest/external-task/fetch/], I cannot lock tasks that have a LONG-typed variable that I want to filter by if the number value in the REST request is small enough to be interpreted as an INTEGER. I receive an empty result although the external task should be found. !image-2022-05-25-09-03-08-755.png|thumbnail! POST request {code} { "topics": [ { "topicName": "myExternalTask", "lockDuration": 30000, "processVariables": { "offerId": 999 } } ], "workerId": "offerWorkerId", "maxTasks": 1 } {code} h3. Steps to reproduce (Required on creation): # Instantiate an External Task with a LONG-typed variable with a small value like 999. # Try to fetch the task via REST API, providing a {{processVariables}} filter for the variable and the value 999 h3. Observed Behavior (Required on creation): * The External Task is not fetched and locked * The query filters by type INTEGER {code:sql} SELECT DISTINCT RES.* FROM (SELECT RES.*, PI.BUSINESS_KEY_, PD.VERSION_TAG_ FROM ACT_RU_EXT_TASK RES LEFT JOIN ACT_RU_EXECUTION PI ON RES.PROC_INST_ID_ = PI.ID_ INNER JOIN ACT_RE_PROCDEF PD ON RES.PROC_DEF_ID_ = PD.ID_ WHERE (RES.LOCK_EXP_TIME_ IS NULL OR RES.LOCK_EXP_TIME_ <= '2022-05-25 08:52:56.026'(Timestamp)) AND (RES.SUSPENSION_STATE_ IS NULL OR RES.SUSPENSION_STATE_ = 1) AND (RES.RETRIES_ IS NULL OR RES.RETRIES_ > 0) AND (RES.TOPIC_NAME_ = 'test' AND RES.PROC_INST_ID_ in (SELECT VAR.EXECUTION_ID_ FROM ACT_RU_VARIABLE VAR WHERE (VAR.NAME_ = 'testId' AND ((VAR.TYPE_ IS NOT NULL AND VAR.TYPE_ = 'integer' AND VAR.LONG_ IS NOT NULL AND VAR.LONG_ = 300))) )) ) RES {code} h3. Expected behavior (Required on creation): * The External Task is fetched and locked h3. Root Cause (Required on prioritization): # The REST API transforms the given value into the smallest possible Java data type. # A number value like `300` is transformed into an `Integer`. # The query against our database to fetch the external task uses an `Integer` for filtering by the process variable. # There is no variable with the given name of type `Integer`. # No external task is found. h3. Solution Ideas (Optional): h3. Hints (optional): |
New:
h3. Environment (Required on creation):
* All distros, all databases h3. Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket): * Using the [Fetch&Lock REST API|https://docs.camunda.org/manual/latest/reference/rest/external-task/fetch/], I cannot lock tasks that have a LONG-typed variable that I want to filter by if the number value in the REST request is small enough to be interpreted as an INTEGER. I receive an empty result although the external task should be found. !image-2022-05-25-09-03-08-755.png|thumbnail! POST request {code} { "topics": [ { "topicName": "myExternalTask", "lockDuration": 30000, "processVariables": { "offerId": 999 } } ], "workerId": "offerWorkerId", "maxTasks": 1 } {code} h3. Steps to reproduce (Required on creation): # Instantiate an External Task with a LONG-typed variable with a small value like 999. # Try to fetch the task via REST API, providing a {{processVariables}} filter for the variable and the value 999 h3. Observed Behavior (Required on creation): * The External Task is not fetched and locked * The query filters by type INTEGER {code:sql} SELECT DISTINCT RES.* FROM (SELECT RES.*, PI.BUSINESS_KEY_, PD.VERSION_TAG_ FROM ACT_RU_EXT_TASK RES LEFT JOIN ACT_RU_EXECUTION PI ON RES.PROC_INST_ID_ = PI.ID_ INNER JOIN ACT_RE_PROCDEF PD ON RES.PROC_DEF_ID_ = PD.ID_ WHERE (RES.LOCK_EXP_TIME_ IS NULL OR RES.LOCK_EXP_TIME_ <= '2022-05-25 08:52:56.026'(Timestamp)) AND (RES.SUSPENSION_STATE_ IS NULL OR RES.SUSPENSION_STATE_ = 1) AND (RES.RETRIES_ IS NULL OR RES.RETRIES_ > 0) AND (RES.TOPIC_NAME_ = 'test' AND RES.PROC_INST_ID_ in (SELECT VAR.EXECUTION_ID_ FROM ACT_RU_VARIABLE VAR WHERE (VAR.NAME_ = 'testId' AND ((VAR.TYPE_ IS NOT NULL AND VAR.TYPE_ = 'integer' AND VAR.LONG_ IS NOT NULL AND VAR.LONG_ = 300))) )) ) RES {code} h3. Expected behavior (Required on creation): * The External Task is fetched and locked h3. Root Cause (Required on prioritization): # The REST API transforms the given value into the smallest possible Java data type. # A number value like `300` is transformed into an `Integer`. # The query against our database to fetch the external task uses an `Integer` for filtering by the process variable. # There is no variable with the given name of type `Integer`. # No external task is found. h3. Solution Ideas (Optional): * Ignore the specific type provided by the REST API conversion * Provide all potential types in the query by duplicating the process variable filter for all variables * Allow to filter by object values in the fetch and lock REST API h3. Hints (optional): |
Description |
Original:
h3. Environment (Required on creation):
* All distros, all databases h3. Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket): * Using the [Fetch&Lock REST API|https://docs.camunda.org/manual/latest/reference/rest/external-task/fetch/], I cannot lock tasks that have a LONG-typed variable that I want to filter by if the number value in the REST request is small enough to be interpreted as an INTEGER. I receive an empty result although the external task should be found. !image-2022-05-25-09-03-08-755.png|thumbnail! POST request {code} { "topics": [ { "topicName": "myExternalTask", "lockDuration": 30000, "processVariables": { "offerId": 999 } } ], "workerId": "offerWorkerId", "maxTasks": 1 } {code} h3. Steps to reproduce (Required on creation): # Instantiate an External Task with a LONG-typed variable with a small value like 999. # Try to fetch the task via REST API, providing a {{processVariables}} filter for the variable and the value 999 h3. Observed Behavior (Required on creation): * The External Task is not fetched and locked * The query filters by type INTEGER {code:sql} SELECT DISTINCT RES.* FROM (SELECT RES.*, PI.BUSINESS_KEY_, PD.VERSION_TAG_ FROM ACT_RU_EXT_TASK RES LEFT JOIN ACT_RU_EXECUTION PI ON RES.PROC_INST_ID_ = PI.ID_ INNER JOIN ACT_RE_PROCDEF PD ON RES.PROC_DEF_ID_ = PD.ID_ WHERE (RES.LOCK_EXP_TIME_ IS NULL OR RES.LOCK_EXP_TIME_ <= '2022-05-25 08:52:56.026'(Timestamp)) AND (RES.SUSPENSION_STATE_ IS NULL OR RES.SUSPENSION_STATE_ = 1) AND (RES.RETRIES_ IS NULL OR RES.RETRIES_ > 0) AND (RES.TOPIC_NAME_ = 'test' AND RES.PROC_INST_ID_ in (SELECT VAR.EXECUTION_ID_ FROM ACT_RU_VARIABLE VAR WHERE (VAR.NAME_ = 'testId' AND ((VAR.TYPE_ IS NOT NULL AND VAR.TYPE_ = 'integer' AND VAR.LONG_ IS NOT NULL AND VAR.LONG_ = 300))) )) ) RES {code} h3. Expected behavior (Required on creation): * The External Task is fetched and locked h3. Root Cause (Required on prioritization): # The REST API transforms the given value into the smallest possible Java data type. # A number value like `300` is transformed into an `Integer`. # The query against our database to fetch the external task uses an `Integer` for filtering by the process variable. # There is no variable with the given name of type `Integer`. # No external task is found. h3. Solution Ideas (Optional): * Ignore the specific type provided by the REST API conversion * Provide all potential types in the query by duplicating the process variable filter for all variables * Allow to filter by object values in the fetch and lock REST API h3. Hints (optional): |
New:
h3. Environment (Required on creation):
* All distros, all databases h3. Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket): * Using the [Fetch&Lock REST API|https://docs.camunda.org/manual/latest/reference/rest/external-task/fetch/], I cannot lock tasks that have a LONG-typed variable that I want to filter by if the number value in the REST request is small enough to be interpreted as an INTEGER. I receive an empty result although the external task should be found. !image-2022-05-25-09-03-08-755.png|thumbnail! POST request {code} { "topics": [ { "topicName": "myExternalTask", "lockDuration": 30000, "processVariables": { "offerId": 999 } } ], "workerId": "offerWorkerId", "maxTasks": 1 } {code} h3. Steps to reproduce (Required on creation): # Instantiate an External Task with a LONG-typed variable with a small value like 999. # Try to fetch the task via REST API, providing a {{processVariables}} filter for the variable and the value 999 h3. Observed Behavior (Required on creation): * The External Task is not fetched and locked * The query filters by type INTEGER {code:sql} SELECT DISTINCT RES.* FROM (SELECT RES.*, PI.BUSINESS_KEY_, PD.VERSION_TAG_ FROM ACT_RU_EXT_TASK RES LEFT JOIN ACT_RU_EXECUTION PI ON RES.PROC_INST_ID_ = PI.ID_ INNER JOIN ACT_RE_PROCDEF PD ON RES.PROC_DEF_ID_ = PD.ID_ WHERE (RES.LOCK_EXP_TIME_ IS NULL OR RES.LOCK_EXP_TIME_ <= '2022-05-25 08:52:56.026'(Timestamp)) AND (RES.SUSPENSION_STATE_ IS NULL OR RES.SUSPENSION_STATE_ = 1) AND (RES.RETRIES_ IS NULL OR RES.RETRIES_ > 0) AND (RES.TOPIC_NAME_ = 'test' AND RES.PROC_INST_ID_ in (SELECT VAR.EXECUTION_ID_ FROM ACT_RU_VARIABLE VAR WHERE (VAR.NAME_ = 'testId' AND ((VAR.TYPE_ IS NOT NULL AND VAR.TYPE_ = 'integer' AND VAR.LONG_ IS NOT NULL AND VAR.LONG_ = 300))) )) ) RES {code} h3. Expected behavior (Required on creation): * The External Task is fetched and locked h3. Root Cause (Required on prioritization): # The REST API transforms the given value into the smallest possible Java data type. # A number value like `300` is transformed into an `Integer`. # The query against our database to fetch the external task uses an `Integer` for filtering by the process variable. # There is no variable with the given name of type `Integer`. # No external task is found. h3. Solution Ideas (Optional): # Ignore the specific type provided by the REST API conversion # Provide all potential types in the query by duplicating the process variable filter for all variables # Allow filtering by object values in the fetch and lock REST API h3. Hints (optional): |
Status | Original: Open [ 1 ] | New: Ready [ 10005 ] |