-
Feature Request
-
Resolution: Duplicate
-
L3 - Default
-
None
-
None
-
None
Created on behalf of PR:
User Story (Required on creation):
As a user, I can set an expression to formHandlerClass attribute to resolve a class instance (and for example use beans) in Start Forms and User Task Forms.
Example
User Task XML Config:
<bpmn:startEvent id="StartEvent_1" camunda:formHandlerClass="${mySpecialFormDataHandler}">
handlers:
@Component("mySpecialFormDataHandler") @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE) public class MyHandler extends DefaultStartFormHandler { @Override public void submitFormVariables(VariableMap properties, VariableScope variableScope) { //Some validation goes here VALIDATION GOES HERE super.submitFormVariables(properties, variableScope); } }
@Component("mySpecialUserTaskFormDataHandler") @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE) public class MyUtHandler extends DefaultTaskFormHandler { @Override public void submitFormVariables(VariableMap properties, VariableScope variableScope) { //Some data validation logic goes here super.submitFormVariables(properties, variableScope); } }
This can be used to implement data structure validation on the variables being sent: Such as "XYZ variable names can or cannot be created or modified", "The JSON object must match a specific Schema, etc.
Functional Requirements (Required before implementation):
- `formHandlerClass` attributes supports expressions for Start Forms and User Task Forms.
- ...
Technical Requirements (Required before implementation):
Limitations of Scope (Optional):
Hints (Optional):
This is the controller panel for Smart Panels app
[CAM-13387] Add expression resolution support for formHandlerClass attribute
Description |
Original:
h4. Created on behalf of PR:
* https://github.com/camunda/camunda-bpm-platform/pull/1401 h4. User Story (Required on creation): As a user, I can set an expression to [formHandlerClass|https://docs.camunda.org/manual/latest/reference/bpmn20/custom-extensions/extension-attributes/#formhandlerclass] attribute to resolve a class instance (and for example use beans) in Start Forms and User Task Forms. h4. Example User Task XML Config: {code:xml} <bpmn:startEvent id="StartEvent_1" camunda:formHandlerClass="${mySpecialFormDataHandler}"> {code} handlers: {code:java} @Component("mySpecialFormDataHandler") @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE) public class MyHandler extends DefaultStartFormHandler { @Override public void submitFormVariables(VariableMap properties, VariableScope variableScope) { //Some validation goes here VALIDATION GOES HERE super.submitFormVariables(properties, variableScope); } } {code} {code:java} @Component("mySpecialUserTaskFormDataHandler") @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE) public class MyUtHandler extends DefaultTaskFormHandler { @Override public void submitFormVariables(VariableMap properties, VariableScope variableScope) { //Some data validation logic goes here super.submitFormVariables(properties, variableScope); } } {code} This can be used to implement data structure validation on the variables being sent: Such as "XYZ variable names can or cannot be created or modified", "The JSON object must match a specific Schema, etc. h4. Functional Requirements (Required before implementation): * `formHandlerClass` attributes supports expressions for Start Forms and User Task Forms. * ... h4. Technical Requirements (Required before implementation): h4. Limitations of Scope (Optional): h4. Hints (Optional): |
New:
h4. Created on behalf of PR:
* https://github.com/camunda/camunda-bpm-platform/pull/1401 h4. User Story (Required on creation): As a user, I can set an expression to [formHandlerClass|https://docs.camunda.org/manual/latest/reference/bpmn20/custom-extensions/extension-attributes/#formhandlerclass] attribute to resolve a class instance (and for example use beans) in Start Forms and User Task Forms. h4. Example User Task XML Config: {code:xml} <bpmn:startEvent id="StartEvent_1" camunda:formHandlerClass="${mySpecialFormDataHandler}"> {code} handlers: {code:java} @Component("mySpecialFormDataHandler") @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE) public class MyHandler extends DefaultStartFormHandler { @Override public void submitFormVariables(VariableMap properties, VariableScope variableScope) { //Some validation goes here VALIDATION GOES HERE super.submitFormVariables(properties, variableScope); } } {code} {code:java} @Component("mySpecialUserTaskFormDataHandler") @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE) public class MyUtHandler extends DefaultTaskFormHandler { @Override public void submitFormVariables(VariableMap properties, VariableScope variableScope) { //Some data validation logic goes here super.submitFormVariables(properties, variableScope); } } {code} This can be used to implement data structure validation on the variables being sent: Such as "XYZ variable names can or cannot be created or modified", "The JSON object must match a specific Schema, etc. h4. Functional Requirements (Required before implementation): * `formHandlerClass` attributes supports expressions for Start Forms and User Task Forms. * ... h4. Technical Requirements (Required before implementation): h4. Limitations of Scope (Optional): h4. Hints (Optional): |
Mentioned Roles |
Mentioned Groups |
Assignee | New: Thorben Lindhauer [ thorben.lindhauer ] |
Mentioned Roles |
Mentioned Groups |
Link | New: This issue is related to CAMTEAM-158 [ CAMTEAM-158 ] |
Resolution | New: Duplicate [ 3 ] | |
Status | Original: Open [ 1 ] | New: Closed [ 6 ] |
Mentioned Roles |
Mentioned Groups |