1 import inherits from 'inherits';
3 import ImplementationTypeHelper from 'bpmn-js-properties-panel/lib/helper/ImplementationTypeHelper';
4 import ServiceTaskDelegateProps from 'bpmn-js-properties-panel/lib/provider/camunda/parts/ServiceTaskDelegateProps';
5 import workflowImplementationType from './implementation/WorkflowImplementationType';
6 import workflowActivity from './implementation/WorkflowActivity';
7 import { implementationType as implementationTypeConst } from './implementation/implementationConstants';
9 const getImplementationType = element => {
10 let implementationType = ImplementationTypeHelper.getImplementationType(
14 if (!implementationType) {
15 const bo = getBusinessObject(element);
18 typeof bo.get(implementationTypeConst.ACTIVITY) !== 'undefined'
20 return 'workflowActivity';
25 return implementationType;
28 const getBusinessObject = element =>
29 ImplementationTypeHelper.getServiceTaskLikeBusinessObject(element);
31 const isDmnCapable = element => ImplementationTypeHelper.isDmnCapable(element);
33 const isExternalCapable = element =>
34 ImplementationTypeHelper.isExternalCapable(element);
36 const isServiceTaskLike = element =>
37 ImplementationTypeHelper.isServiceTaskLike(element);
39 function WorkflowServiceTaskDelegateProps(
46 ServiceTaskDelegateProps.call(this, group, element, bpmnFactory, translate);
48 if (isServiceTaskLike(getBusinessObject(element))) {
49 group.entries = group.entries.filter(
50 entry => entry.id !== 'implementation'
54 ...workflowImplementationType(
58 getBusinessObject: getBusinessObject,
59 getImplementationType: getImplementationType,
60 hasDmnSupport: isDmnCapable(element),
61 hasExternalSupport: isExternalCapable(
62 getBusinessObject(element)
64 hasServiceTaskLikeSupport: true
74 getBusinessObject: getBusinessObject,
75 getImplementationType: getImplementationType
83 inherits(WorkflowServiceTaskDelegateProps, ServiceTaskDelegateProps);
85 export default WorkflowServiceTaskDelegateProps;