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

Add expression resolution support for formHandlerClass attribute

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Duplicate
    • L3 - Default
    • None
    • None
    • engine
    • None

    Description

      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):

      mgm-controller-panel

        This is the controller panel for Smart Panels app

        Attachments

          Issue Links

            Activity

              People

                thorben.lindhauer Thorben Lindhauer
                yana.vasileva Yana Vasileva
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Salesforce