diff --git a/app/spiffworkflow/extensions/propertiesPanel/SpiffExtensionCalledDecision.js b/app/spiffworkflow/extensions/propertiesPanel/SpiffExtensionCalledDecision.js
index 7c7096e..e523807 100644
--- a/app/spiffworkflow/extensions/propertiesPanel/SpiffExtensionCalledDecision.js
+++ b/app/spiffworkflow/extensions/propertiesPanel/SpiffExtensionCalledDecision.js
@@ -1,7 +1,7 @@
import {useService } from 'bpmn-js-properties-panel';
import { TextFieldEntry } from '@bpmn-io/properties-panel';
-const SPIFF_PROP = "spiffworkflow:calledDecision"
+const SPIFF_PROP = "spiffworkflow:calledDecisionId"
/**
* A generic properties' editor for text input.
@@ -12,7 +12,7 @@ const SPIFF_PROP = "spiffworkflow:calledDecision"
*
-
+ my_id
*
diff --git a/app/spiffworkflow/moddle/spiffworkflow.json b/app/spiffworkflow/moddle/spiffworkflow.json
index 449faf5..e1c57a9 100644
--- a/app/spiffworkflow/moddle/spiffworkflow.json
+++ b/app/spiffworkflow/moddle/spiffworkflow.json
@@ -27,12 +27,12 @@
]
},
{
- "name": "calledDecision",
+ "name": "calledDecisionId",
"superClass": [ "Element" ],
"properties": [
{
"name": "decisionId",
- "isAttr": true,
+ "isBody": true,
"type": "String"
}
]
diff --git a/package-lock.json b/package-lock.json
index f104ae6..0cdc289 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,11 +1,12 @@
{
"name": "bpmn-js-spiffworkflow",
- "version": "0.0.7",
+ "version": "0.0.8",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
- "version": "0.0.7",
+ "name": "bpmn-js-spiffworkflow",
+ "version": "0.0.8",
"license": "MIT",
"dependencies": {
"bpmn-js": "^9.2.2",
diff --git a/test/spec/BusinessRulePropsSpec.js b/test/spec/BusinessRulePropsSpec.js
index 246fc38..93e1004 100644
--- a/test/spec/BusinessRulePropsSpec.js
+++ b/test/spec/BusinessRulePropsSpec.js
@@ -39,7 +39,7 @@ describe('Business Rule Properties Panel', function() {
expect(textInput).to.exist;
});
- it('should update the spiffworkflow:calledDecision tag when you modify the called decision text input', async function() {
+ it('should update the spiffworkflow:calledDecisionId tag when you modify the called decision text input', async function() {
// IF - a script tag is selected, and you change the script in the properties panel
const businessRuleTask = await expectSelected('business_rule_task');
@@ -54,4 +54,17 @@ describe('Business Rule Properties Panel', function() {
expect(element.decisionId).to.equal('wonderful');
});
+ it('should load up the xml and the value for the called decision should match the xml', async function() {
+ const businessRuleTask = await expectSelected('business_rule_task');
+ let entry = findEntry('extension_called_decision', getPropertiesPanel());
+ const textInput = domQuery('input', entry);
+ expect(textInput.value).to.equal('test_decision');
+
+ // THEN - the script tag in the BPMN Business object / XML is updated as well.
+ let businessObject = getBusinessObject(businessRuleTask);
+ expect(businessObject.extensionElements).to.exist;
+ let element = businessObject.extensionElements.values[0];
+ expect(element.decisionId).to.equal('test_decision');
+ });
+
});
diff --git a/test/spec/bpmn/diagram.bpmn b/test/spec/bpmn/diagram.bpmn
index 03d0df5..9104624 100644
--- a/test/spec/bpmn/diagram.bpmn
+++ b/test/spec/bpmn/diagram.bpmn
@@ -65,7 +65,7 @@
-
+ test_decision
Flow_132laxn
Flow_1lu1qyz