How to use the bpmn-js-properties-panel/lib/helper/ElementHelper.createElement function in bpmn-js-properties-panel

To help you get started, we’ve selected a few bpmn-js-properties-panel examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zeebe-io / zeebe-modeler / client / src / app / tabs / bpmn / custom / properties-provider / parts / TaskDefinitionProps.js View on Github external
setProperty: function(element, values, node) {
      const bo = getBusinessObject(element);
      const commands = [];

      // create extensionElements
      let extensionElements = bo.get('extensionElements');
      if (!extensionElements) {
        extensionElements = elementHelper.createElement('bpmn:ExtensionElements', { values: [] }, bo, bpmnFactory);
        commands.push(cmdHelper.updateProperties(element, { extensionElements: extensionElements }));
      }

      // create taskDefinition
      let taskDefinition = getTaskDefinition(element);

      if (!taskDefinition) {
        taskDefinition = elementHelper.createElement('zeebe:TaskDefinition', { }, extensionElements, bpmnFactory);
        commands.push(cmdHelper.addAndRemoveElementsFromList(
          element,
          extensionElements,
          'values',
          'extensionElements',
          [ taskDefinition ],
          []
        ));
github zeebe-io / zeebe-modeler / client / src / app / tabs / bpmn / custom / properties-provider / parts / CallActivityProps.js View on Github external
function setProperties(element, values) {

    const businessObject = getBusinessObject(element),
          commands = [];

    // ensure extensionElements
    let extensionElements = businessObject.get('extensionElements');
    if (!extensionElements) {
      extensionElements = elementHelper.createElement('bpmn:ExtensionElements', { values: [] }, businessObject, bpmnFactory);
      commands.push(cmdHelper.updateBusinessObject(element, businessObject, { extensionElements: extensionElements }));
    }

    // ensure zeebe:calledElement
    let calledElement = getCalledElement(businessObject);
    if (!calledElement) {
      calledElement = elementHelper.createElement('zeebe:CalledElement', { }, extensionElements, bpmnFactory);
      commands.push(cmdHelper.addAndRemoveElementsFromList(
        element,
        extensionElements,
        'values',
        'extensionElements',
        [ calledElement ],
        []
      ));
    }
github zeebe-io / zeebe-modeler / client / src / app / tabs / bpmn / custom / properties-provider / parts / implementation / MultiInstanceLoopCharacteristics.js View on Github external
function setProperties(element, values) {
    const loopCharacteristics = getLoopCharacteristics(element),
          commands = [];

    // ensure extensionElements
    let extensionElements = loopCharacteristics.get('extensionElements');
    if (!extensionElements) {
      extensionElements = elementHelper.createElement('bpmn:ExtensionElements', { values: [] }, loopCharacteristics, bpmnFactory);
      commands.push(cmdHelper.updateBusinessObject(element, loopCharacteristics, { extensionElements: extensionElements }));
    }

    // ensure zeebe:LoopCharacteristics
    let zeebeLoopCharacteristics = getZeebeLoopCharacteristics(loopCharacteristics);
    if (!zeebeLoopCharacteristics) {
      zeebeLoopCharacteristics = elementHelper.createElement('zeebe:LoopCharacteristics', { }, extensionElements, bpmnFactory);
      commands.push(cmdHelper.addAndRemoveElementsFromList(
        element,
        extensionElements,
        'values',
        'extensionElements',
        [ zeebeLoopCharacteristics ],
        []
      ));
    }

    commands.push(cmdHelper.updateBusinessObject(element, zeebeLoopCharacteristics, values));
    return commands;
  }
github zeebe-io / zeebe-modeler / client / src / app / tabs / bpmn / custom / properties-provider / parts / implementation / MultiInstanceLoopCharacteristics.js View on Github external
function setProperties(element, values) {
    const loopCharacteristics = getLoopCharacteristics(element),
          commands = [];

    // ensure extensionElements
    let extensionElements = loopCharacteristics.get('extensionElements');
    if (!extensionElements) {
      extensionElements = elementHelper.createElement('bpmn:ExtensionElements', { values: [] }, loopCharacteristics, bpmnFactory);
      commands.push(cmdHelper.updateBusinessObject(element, loopCharacteristics, { extensionElements: extensionElements }));
    }

    // ensure zeebe:LoopCharacteristics
    let zeebeLoopCharacteristics = getZeebeLoopCharacteristics(loopCharacteristics);
    if (!zeebeLoopCharacteristics) {
      zeebeLoopCharacteristics = elementHelper.createElement('zeebe:LoopCharacteristics', { }, extensionElements, bpmnFactory);
      commands.push(cmdHelper.addAndRemoveElementsFromList(
        element,
        extensionElements,
        'values',
        'extensionElements',
        [ zeebeLoopCharacteristics ],
        []
      ));
    }
github zeebe-io / zeebe-modeler / client / src / app / tabs / bpmn / custom / properties-provider / parts / TaskDefinitionProps.js View on Github external
set: function(element, values) {
      const bo = getBusinessObject(element);
      const commands = [];

      // create extensionElements
      let extensionElements = bo.get('extensionElements');
      if (!extensionElements) {
        extensionElements = elementHelper.createElement('bpmn:ExtensionElements', { values: [] }, bo, bpmnFactory);
        commands.push(cmdHelper.updateProperties(element, { extensionElements: extensionElements }));
      }

      // create taskDefinition
      let taskDefinition = getTaskDefinition(element);

      if (!taskDefinition) {
        taskDefinition = elementHelper.createElement('zeebe:TaskDefinition', { }, extensionElements, bpmnFactory);
        commands.push(cmdHelper.addAndRemoveElementsFromList(
          element,
          extensionElements,
          'values',
          'extensionElements',
          [ taskDefinition ],
          []
        ));
      }

      commands.push(cmdHelper.updateBusinessObject(element, taskDefinition, values));
      return commands;
    }
github zeebe-io / zeebe-modeler / client / src / app / tabs / bpmn / custom / properties-provider / parts / implementation / TimerDurationDefinition.js View on Github external
function createFormalExpression(parent, body = undefined, bpmnFactory) {
  return elementHelper.createElement('bpmn:FormalExpression', { body: body }, parent, bpmnFactory);
}
github zeebe-io / zeebe-modeler / client / src / app / tabs / bpmn / custom / properties-provider / parts / implementation / PayloadMappings.js View on Github external
function createElement(type, parent, factory, properties) {
  return elementHelper.createElement(type, properties, parent, factory);
}
github zeebe-io / zeebe-modeler / client / src / app / tabs / bpmn / custom / properties-provider / parts / implementation / TimerEventDefinition.js View on Github external
const createFormalExpression= (parent, body, bpmnFactory) => {
  body = body || undefined;
  return elementHelper.createElement('bpmn:FormalExpression', { body: body }, parent, bpmnFactory);
};

bpmn-js-properties-panel

A simple properties panel for bpmn-js

MIT
Latest version published 7 days ago

Package Health Score

90 / 100
Full package analysis