How to use the bpmn-js/lib/util/DiUtil.isEventSubProcess function in bpmn-js

To help you get started, we’ve selected a few bpmn-js 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 / CustomRules.js View on Github external
if (isLabel(element)) {
      return false;
    }

    // only handle boundary events
    if (!isBoundaryCandidate(element)) {
      return false;
    }

    // allow default move operation
    if (!target) {
      return true;
    }

    // disallow drop on event sub processes
    if (isEventSubProcess(target)) {
      return false;
    }

    // only allow drop on non compensation activities
    if (!is(target, 'bpmn:Activity') || isForCompensation(target)) {
      return false;
    }

    // only attach to subprocess border
    if (position && !isBoundaryAttachment(position, target)) {
      return false;
    }

    // do not attach on receive tasks after event based gateways
    if (isReceiveTaskAfterEventBasedGateway(target)) {
      return false;
github zeebe-io / zeebe-modeler / client / src / app / tabs / bpmn / custom / CustomReplaceMenuProvider.js View on Github external
getHeaderEntries(element) {

    let headerEntries = [];

    if (
      isAny(element, [ 'bpmn:ReceiveTask', 'bpmn:ServiceTask', 'bpmn:SubProcess' ]) &&
      !isEventSubProcess(element)
    ) {

      const loopEntries = this._getLoopEntries(element);

      headerEntries = loopEntries.filter(
        entry => availableLoopEntries.indexOf(entry.id) != -1
      );
    }

    return headerEntries;
  }
}
github bpmn-io / bpmn-js-properties-panel / lib / provider / bpmn / parts / implementation / ConditionalEventDefinition.js View on Github external
return cmdHelper.updateBusinessObject(element, conditionalEventDefinition, props);
    };
  };

  group.entries.push(entryFactory.textField({
    id: 'variableName',
    label: translate('Variable Name'),
    modelProperty : 'variableName',

    get: getValue('variableName'),
    set: setValue('variableName')
  }));

  var isConditionalStartEvent =
    is(element, 'bpmn:StartEvent') && !isEventSubProcess(element.parent);

  if (!isConditionalStartEvent) {
    group.entries.push(entryFactory.textField({
      id: 'variableEvent',
      label: translate('Variable Event'),
      description: translate('Specify more than one variable change event as a comma separated list.'),
      modelProperty : 'variableEvent',

      get: getValue('variableEvent'),
      set: setValue('variableEvent')
    }));
  }
};
github bpmn-io / bpmn-js-example-custom-elements / app / emoji / EmojiContextPadProvider.js View on Github external
'append.compensation-activity':
            appendAction(
              'bpmn:Task',
              'bpmn-icon-task',
              translate('Append compensation activity'),
              {
                isForCompensation: true
              }
            )
      });
    } else

    if (!is(businessObject, 'bpmn:EndEvent') &&
        !businessObject.isForCompensation &&
        !isEventType(businessObject, 'bpmn:IntermediateThrowEvent', 'bpmn:LinkEventDefinition') &&
        !isEventSubProcess(businessObject)) {

      assign(actions, {
        'append.end-event': appendAction(
          'bpmn:EndEvent',
          'bpmn-icon-end-event-none'
        ),
        'append.gateway': appendAction(
          'bpmn:ExclusiveGateway',
          'bpmn-icon-gateway-none',
          translate('Append Gateway')
        ),
        'append.append-task': appendAction(
          'bpmn:Task',
          'bpmn-icon-task'
        ),
        'append.append-emoji-task': {
github zeebe-io / zeebe-modeler / client / src / app / tabs / bpmn / custom / properties-provider / parts / MessageProps.js View on Github external
const messageEventDefinition = eventDefinitionHelper.getMessageEventDefinition(element),
        parent = element.parent;

  if (is(element, 'bpmn:ReceiveTask')) {
    message(group, element, bpmnFactory, getBusinessObject(element), translate);
    group.entries = group.entries.concat(referenceExtensionElementProperty(element, getBusinessObject(element), bpmnFactory, {
      id: 'message-element-subscription',
      label: 'Subscription Correlation Key',
      referenceProperty: 'messageRef',
      modelProperty: 'correlationKey',
      extensionElement: 'zeebe:Subscription',
      shouldValidate: true
    }));
  } else if (messageEventDefinition) {
    message(group, element, bpmnFactory, messageEventDefinition, translate);
    if (!is(element, 'bpmn:StartEvent') || isEventSubProcess(parent)) {

      group.entries = group.entries.concat(referenceExtensionElementProperty(element, messageEventDefinition, bpmnFactory, {
        id: 'message-element-subscription',
        label: 'Subscription Correlation Key',
        referenceProperty: 'messageRef',
        modelProperty: 'correlationKey',
        extensionElement: 'zeebe:Subscription',
        shouldValidate: true
      }));
    }
  }

}