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

Allow using classes instead of class names in model API for developer convenience

    Details

    • Type: Feature Request
    • Status: Closed
    • Priority: L3 - Default
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.7.0, 7.7.0-alpha2
    • Component/s: bpmn model api
    • Labels:
      None

      Description

      This code is unnecessarily verbose, it is more convenient to have an overloaded method accepting the class directly as an alternative.

      engine.getRepositoryService().createDeployment() //
          .addModelInstance("order.bpmn", Bpmn.createProcess("order").executable() //
            .startEvent()
            .serviceTask().name("Do payment").camundaClass(DoPaymentAdapter.class.getName())
            .serviceTask().name("Pick goods").camundaClass(PickGoodsAdapter.class.getName())
            .serviceTask().name("Ship goods").camundaClass(ShipGoodsAdapter.class.getName())
            .endEvent().camundaExecutionListenerClass("end", OrderCompletedAdapter.class.getName())
            .done()
      ).deploy();
      

      I implemented this already and will do a pull request soon.

      Why is this important to me? I currently use a lot of model API on slides - and there the additional ".getName()" is really a bummer - and the fix is so easy

        Activity

        Show
        ruecker Bernd Rücker added a comment - https://github.com/camunda/camunda-bpmn-model/pull/13

          People

          • Assignee:
            Unassigned
            Reporter:
            ruecker Bernd Rücker
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development