diff options
author | 2018-09-09 10:19:32 +0300 | |
---|---|---|
committer | 2018-09-09 10:20:30 +0300 | |
commit | 89c28e58f6b4b2d1b0f5514b6cf31085ab20a6aa (patch) | |
tree | 3c3bb4b8b113ae8fe3aef822cbac7aca10cdcf4f /workflow-designer-ui/src/main | |
parent | 6a81388cf93207c6317a3f6b68d0a9d7aeeca41a (diff) |
I/O source & target support
Issue-ID: SDC-1591
Change-Id: I02598759912f1e3679b3e37a06a79cd404ffaab6
Signed-off-by: Stanislav Vishnevetskiy <shlomo-stanisla.vishnevetskiy@amdocs.com>
Diffstat (limited to 'workflow-designer-ui/src/main')
2 files changed, 24 insertions, 14 deletions
diff --git a/workflow-designer-ui/src/main/frontend/src/features/version/composition/custom-properties-provider/provider/camunda/parts/implementation/InputOutputHelper.js b/workflow-designer-ui/src/main/frontend/src/features/version/composition/custom-properties-provider/provider/camunda/parts/implementation/InputOutputHelper.js index e3a79d4c..cb4745e3 100644 --- a/workflow-designer-ui/src/main/frontend/src/features/version/composition/custom-properties-provider/provider/camunda/parts/implementation/InputOutputHelper.js +++ b/workflow-designer-ui/src/main/frontend/src/features/version/composition/custom-properties-provider/provider/camunda/parts/implementation/InputOutputHelper.js @@ -161,4 +161,16 @@ InputOutputHelper.isCreateDeleteSupported = function(element) { ); }; +InputOutputHelper.isWorkflowTargetSupported = function(element, selected) { + const bo = getBusinessObject(element); + return ( + is(bo, 'bpmn:ServiceTask') && is(selected, 'camunda:OutputParameter') + ); +}; + +InputOutputHelper.isWorkflowSourceSupported = function(element, selected) { + const bo = getBusinessObject(element); + return is(bo, 'bpmn:ServiceTask') && is(selected, 'camunda:InputParameter'); +}; + export default InputOutputHelper; diff --git a/workflow-designer-ui/src/main/frontend/src/features/version/composition/custom-properties-provider/provider/camunda/parts/implementation/InputOutputParameter.js b/workflow-designer-ui/src/main/frontend/src/features/version/composition/custom-properties-provider/provider/camunda/parts/implementation/InputOutputParameter.js index faa20fb0..58b3d67e 100644 --- a/workflow-designer-ui/src/main/frontend/src/features/version/composition/custom-properties-provider/provider/camunda/parts/implementation/InputOutputParameter.js +++ b/workflow-designer-ui/src/main/frontend/src/features/version/composition/custom-properties-provider/provider/camunda/parts/implementation/InputOutputParameter.js @@ -452,23 +452,22 @@ export default function(element, bpmnFactory, options, translate, config) { }, set: function(element, values, node) { - var properties = { + const properties = { workflowSource: undefined }; properties.workflowSource = values.workflowSource; - var param = getSelected(element, node); + const param = getSelected(element, node); values.workflowSource = values.workflowSource || undefined; return cmdHelper.updateBusinessObject(element, param, values); }, hidden: function(element, node) { - var bo = getSelected(element, node); - return !( - bo && - bo.$type && - bo.$type === 'camunda:InputParameter' + const selected = getSelected(element, node); + return !inputOutputHelper.isWorkflowSourceSupported( + element, + selected ); } }) @@ -490,23 +489,22 @@ export default function(element, bpmnFactory, options, translate, config) { }, set: function(element, values, node) { - var properties = { + const properties = { workflowTarget: undefined }; properties.workflowTarget = values.workflowTarget; - var param = getSelected(element, node); + const param = getSelected(element, node); values.workflowTarget = values.workflowTarget || undefined; return cmdHelper.updateBusinessObject(element, param, values); }, hidden: function(element, node) { - var bo = getSelected(element, node); - return !( - bo && - bo.$type && - bo.$type === 'camunda:OutputParameter' + const selected = getSelected(element, node); + return !inputOutputHelper.isWorkflowTargetSupported( + element, + selected ); } }) |