Git Product home page Git Product logo

camunda-bpmn-moddle's Introduction

camunda-bpmn-moddle

CI

This project defines the Camunda namespace extensions for BPMN 2.0 as a moddle descriptor.

Usage

Use it together with bpmn-moddle to validate Camunda BPMN 2.0 extensions.

import BpmnModdle from 'bpmn-moddle';

import camundaModdle from 'camunda-bpmn-moddle/resources/camunda.json';

const moddle = new BpmnModdle({ camunda: camundaModdle });

const serviceTask = moddle.create('bpmn:ServiceTask', {
  'javaDelegate': 'my.company.SomeDelegate'
});

Building the Project

To run the test suite that includes XSD schema validation you must have a Java JDK installed and properly exposed through the JAVA_HOME variable.

Execute the test via

npm test

Perform a complete build of the application via

npm run all

Behaviors

Inside a bpmn-js editor pair this extension with camunda-bpmn-js-behaviors to ensure Camunda properties are created, updated and deleted as expected.

License

Use under the terms of the MIT license.

camunda-bpmn-moddle's People

Contributors

azeghers avatar barmac avatar dependabot[bot] avatar maxtru avatar nikku avatar pedesen avatar philippfromme avatar polenz avatar prithviraj-maurya avatar renovate[bot] avatar ricardomatias avatar romansmirnov avatar smbea avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

camunda-bpmn-moddle's Issues

Move behaviors to behavior module

What should we do?

Behaviors in this module are legacy and we have a dedicated behavior module to host all sorts of modeling behaviors.

We should migrate what is left in this module over.

Why should we do it?

Have a single place, not multiple places, to host behaviors.

Process doesn't support modelerTemplate

Due to

{
      "name": "TemplateSupported",
      "isAbstract": true,
      "extends": [
        "bpmn:FlowElement"
      ],
      "properties": [
        {
          "name": "modelerTemplate",
          "isAttr": true,
          "type": "String"
        }
      ]
    }

processes do not support modelerTemplate which is therefore not applied correctly.

Implement extension elements

Further details about the individual elements can be found here.

EventDefinition

  • camunda:escalationCodeVariable #4
  • camunda:errorCodeVariable #5
  • camunda:async #2

UserTask

  • camunda:assignee
  • camunda:candidateGroups
  • camunda:candidateUsers
  • camunda:dueDate
  • camunda:priority
  • camunda:followUpDate

BusinessRuleTask

  • camunda:decisionRef
  • camunda:decisionRefBinding
  • camunda:descisionRefVersion

ScriptTask

  • camunda:resource #9
  • camunda:resultVariable #9

CallActivity

  • camunda:calledElementBinding
  • camunda:calledElementVersion
  • camunda:caseBinding #10
  • camunda:caseRef #10
  • camunda:caseVersion #10
  • camunda:in #10
  • camunda:out #10

Others

  • camunda:class
  • camunda:expression
  • camunda:delegateExpression
  • camunda:formKey
  • camunda:initiator
  • camunda:resultVariable
  • camunda:type
  • camunda:topic
  • camunda:formHandlerClass #19
  • camunda:connector #12
  • camunda:connectorId #12
  • camunda:executionListener
  • camunda:field #16
  • camunda:formProperty #13
  • camunda:potentialStarter #15
  • camunda:string
  • camunda:taskListener #6
  • camunda:candidateStarterGroups #18
  • camunda:candidateStarterUsers #18

Multi Instance

  • camunda:collection
  • camunda:elementVariable
  • camunda:exclusive
  • camunda:asyncBefore
  • camunda:asyncAfter

Asynchronous Continuations

  • camunda:asyncBefore
  • camunda:asyncAfter
  • camunda:exclusive
  • camunda:failedJobRetryTimeCycle
  • camunda:jobPriority #11

Extension Elements

  • camunda:resource #17
  • camunda:formData #8
  • camunda:formField #8
  • camunda:validation #8
  • camunda:constraint #8
  • camunda:value #8
  • camunda:properties #3
  • camunda:property #3
  • camunda:inputParameter #14
  • camunda:inputOutput #12
  • camunda:outputParameter #14
  • camunda:list #14
  • camunda:map #14
  • camunda:entry #14

Missing elements from Camunda Extension Elements that are "allowedIn"

  • connector -> Message Event Definition of Message Intermediate Throwing Event or Message End Event

  • executionListener -> Embedded Subprocess, Event SubProcess, Transaction SubProcess (type SubProcess)

  • failedJobRetryTimeCycle -> bpmn:TimerEventDefinition (for Timer Start Event, Timer Intermediate Catching Event, Timer Boundary Event), SignalEventDefinition, MultiInstanceLoopCharacteristics

  • field -> Message Event Definition of Message Intermediate Throwing Event or Message End Event

Add support for timeout task listeners

Hey,

starting with Camunda BPM Runtime 7.12.0-alpha4, time-triggered task listeners can be used.

An example configuration looks like this:

...
<bpmn:userTask id="myTask">
  <bpmn:extensionElements>
    <camunda:taskListener delegateExpression="${setBusinessKeyListener}" event="timeout" id="timeout-friendly" >
      <bpmn:timerEventDefinition>
        <bpmn:timeDuration xsi:type="bpmn:tFormalExpression">PT1H</bpmn:timeDuration>
      </bpmn:timerEventDefinition>
    </camunda:taskListener>
  </bpmn:extensionElements>
</bpmn:userTask>
...

Modifications:

  1. Value timeout allowed for event attribute of camunda:taskListener
  2. Element timerEventDefinition now allowed as a child of camunda:taskListener, but only if the event of the camunda:taskListener is set to timeout
  3. New attribute id for camunda:taskListener, only mandatory if event of camunda:taskListener is set to timeout

UI-wise all existing property panel controls for TimerBoundaryEvents can be used here as well for the timer event definition, if the timeout value is chosen as event type of the task listener.

If you have any questions concerning this, let me know! :)

It would be great to have Modeler support for this for Camunda BPM Runtime 7.12 (due November 30, 2019).

Thank you guys,
Tobi

Add Form Binding Properties

In order to support binding to form files as described in #2295 we need to add new properties to this extension.

New User Task Properties

  • camunda:formRef (maps to id property of the form)
  • camunda:formRefBinding (latest or version)
  • camunda:version (maps to an internal version property set by the engine)

Example

<bpmn:userTask
  id="Activity_1"
  camunda:formRef="formId"
  camunda:formRefBinding="version">
</bpmn:userTask>

or

<bpmn:userTask
  id="Activity_1"
  camunda:formRef="latest">
</bpmn:userTask>

Child of camunda/camunda-modeler#2295

CallActivity, CalledElement infinite serialize to QName _x005F_

Describe the Bug

Hey there! First of all, tnx for your time.

Im facing an issue while trying to add a complex name in the CalledElement on CallActivity section panel.

After doing a saveXML({}) the string from CalledElement itsself converted as a QName.

The problem is that it continuing to convert as a QName when he already is.

Steps to Reproduce

We are doing a tipical form page with the BPMN Modeler and bpmn-js-properties-panel + camunda-bpmn-moddle, without no custom parameters, just with the initial README.md config steps.

When form submit, we execute modeler.saveXML({ format: true });, and keep in our BBDD the XML.
When we reload the page, we fill the Modeler with the XML saved in our BBDD.

  • 1
    Fill Called Element with some spaces

img

and then, execute modeler.saveXML({ format: true });

  • 2

Reload the page and fill Modeler with the last XML. We can see that Called Element has serialize itself

img

Then, execute modeler.saveXML({ format: true }); without no changes.

  • 3

Reload the page and fill Modeler with the last XML. We can see that Called Element has serialize itself AGAIN

img

Then, execute modeler.saveXML({ format: true }); without no changes.

  • 4

Reload the page and fill Modeler with the last XML. We can see that Called Element has serialize itself f AGAIN

img

Expected Behavior

It should not serilize _ to unicode

Environment

Please complete the following information:

  • Browser: Chrome Version 89.0.4389.128 (Official Build) (64-bit)
  • OS: Windows 10
  • Library version:
    • "bpmn-js": "^8.2.0",
    • "bpmn-js-properties-panel": "^0.42.0",
    • "camunda-bpmn-moddle": "^5.0.0",

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.