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

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Fixed
    • Icon: L3 - Default L3 - Default
    • 7.7.0, 7.7.0-alpha2
    • None
    • bpmn model api
    • None

      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

        This is the controller panel for Smart Panels app

              Unassigned Unassigned
              ruecker Bernd Ruecker
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: