Miragon / miranum

Engine neutral framework to build integrations. Simplifying the complexity process automation comes with.
https://miranum.io
MIT License
17 stars 3 forks source link

Miranum Element Templates C7: Async Before and Async After #411

Closed DaAnda97 closed 1 month ago

DaAnda97 commented 1 month ago

Issue

Wanting to start my process (Start Event, One Service Task, End Event) which uses the generated Element Template in Service Task causes the following exception in Camunda: org.camunda.bpm.engine.rest.exception : ENGINE-REST-HTTP500 org.camunda.bpm.engine.rest.exception.RestException: Cannot instantiate process definition benutzer-anlegen:1:9f74e163-3f52-11ef-8c18-0242ac120008: Unknown property used in expression: ${value}. Cause: Cannot resolve identifier 'value'

After some research I found out that it's caused by camundas transaction model and fixed it by adding Async After to the Element Template:

{
  "$schema" : "https://unpkg.com/@camunda/element-templates-json-schema@0.1.0/resources/schema.json",
  "name" : "Benutzer Anlegen",
  "id" : "benutzer-in-keycloak-anlegen",
  "appliesTo" : [ "bpmn:ServiceTask" ],
  "properties" : [ {
    "value" : "external",
    "label" : "Implementation Type",
    "type" : "String",
    "editable" : false,
    "binding" : {
      "type" : "property",
      "name" : "camunda:type"
    }
  }, {
    "value" : "benutzer-anlegen",
    "label" : "Topic",
    "type" : "String",
    "editable" : false,
    "binding" : {
      "type" : "property",
      "name" : "camunda:topic"
    }
  }, {
    "value": "true",
    "label": "Async After",
    "type": "Boolean",
    "binding": {
      "type": "property",
      "name": "camunda:asyncAfter"
    }
  }, {
    "value" : "${auftragsId}",
    "label" : "Input: auftragsId",
    "type" : "String",
    "binding" : {
      "type" : "camunda:inputParameter",
      "name" : "auftragsId"
    },
    "constraints" : {
      "notEmpty" : false
    }
  } ]
}

Please add this to C7 Element Templates by default, as well as the option to set AsyncBefore. It would be nice if I'd have the option to set properties like and in the maven plugin.