plugin-module/modeler-plugin-code/client/bpmn-js-extension/propertiesProvider/CodePropertiesProvider.js
/**
 * Our custom PropertiesProvider, replacing default camunda fields like scriptTaskProps with our custom properties.
 *
 * @param eventBus
 * @param commandStack
 * @param bpmnFactory
 * @param translate
 * @param selection
 * @param propertiesProvider
 * @constructor
 */
Our custom PropertiesProvider, replacing default camunda fields like scriptTaskProps with our custom properties.
Our custom PropertiesProvider replacing default camunda fields like scriptTaskProps with our custom properties .
function CodePropertiesProvider(eventBus, commandStack, bpmnFactory, translate, selection, propertiesProvider) {
  PropertiesActivator.call(this, eventBus);
  eventBus.fire(LOADED_CODE_EDITOR, { dataTypes: DATA_TYPES });
  let camundaGetTabs = propertiesProvider.getTabs;
  propertiesProvider.getTabs = function(element) {
    const array = camundaGetTabs(element);
    let generalTab = find(array, { id: 'general' });
    let detailsGroup = find(generalTab.groups, { id: 'details' });
    if (detailsGroup) {
      scriptTaskProps(detailsGroup, element, translate, eventBus, commandStack);
      conditionalProps(detailsGroup, element, translate, eventBus, commandStack);
    }
    let listenersTab = find(array, { id: 'listeners' });
    if (listenersTab) {
      let listenerDetailsGroup = find(listenersTab.groups, { id: 'listener-details' });
      if (listenerDetailsGroup) {
        listenerDetailProps(listenerDetailsGroup, element, translate, eventBus, commandStack);
      }
    }
    let inputOutputTab = find(array, { id: 'input-output' });
    if (inputOutputTab) {
      inputOutputTab.groups.forEach(group => {
        inputOutputProps(group, element, translate, eventBus, commandStack);
      });
    }
    return array;
  };
}
function CodePropertiesProvider ( eventBus , commandStack , bpmnFactory , translate , selection , propertiesProvider ) { PropertiesActivator . call ( this , eventBus ) ; eventBus . fire ( LOADED_CODE_EDITOR , { dataTypes : DATA_TYPES } ) ; let camundaGetTabs = propertiesProvider . getTabs ; propertiesProvider . getTabs = function ( element ) { const array = camundaGetTabs ( element ) ; let generalTab = find ( array , { id : 'general' } ) ; let detailsGroup = find ( generalTab . groups , { id : 'details' } ) ; if ( detailsGroup ) { scriptTaskProps ( detailsGroup , element , translate , eventBus , commandStack ) ; conditionalProps ( detailsGroup , element , translate , eventBus , commandStack ) ; } let listenersTab = find ( array , { id : 'listeners' } ) ; if ( listenersTab ) { let listenerDetailsGroup = find ( listenersTab . groups , { id : 'listener-details' } ) ; if ( listenerDetailsGroup ) { listenerDetailProps ( listenerDetailsGroup , element , translate , eventBus , commandStack ) ; } } let inputOutputTab = find ( array , { id : 'input-output' } ) ; if ( inputOutputTab ) { inputOutputTab . groups . forEach ( group => { inputOutputProps ( group , element , translate , eventBus , commandStack ) ; } ) ; } return array ; } ; }
Our custom PropertiesProvider, replacing default camunda fields like scriptTaskProps with our custom properties.
Our custom PropertiesProvider replacing default camunda fields like scriptTaskProps with our custom properties .