diff --git a/app/spiffworkflow/eventSelect.js b/app/spiffworkflow/eventSelect.js index 3bee58a..ffd823f 100644 --- a/app/spiffworkflow/eventSelect.js +++ b/app/spiffworkflow/eventSelect.js @@ -148,7 +148,7 @@ function getTextFieldForExtension(eventDetails, label, description, catching) { const debounce = useService('debounceInput'); const translate = useService('translate'); const root = getRoot(element.businessObject); - const extensionName = (catching) ? 'spiffworkflow:variableName' : 'spiffworkflow:payloadExpression'; + const extensionName = (catching) ? 'spiffworkflow:VariableName' : 'spiffworkflow:PayloadExpression'; const getEvent = () => { const eventDef = element.businessObject.eventDefinitions.find(v => v.$type == eventDefType); diff --git a/app/spiffworkflow/extensions/extensionHelpers.js b/app/spiffworkflow/extensions/extensionHelpers.js index 1a6cbf1..342b8f0 100644 --- a/app/spiffworkflow/extensions/extensionHelpers.js +++ b/app/spiffworkflow/extensions/extensionHelpers.js @@ -1,5 +1,5 @@ -const SPIFF_PARENT_PROP = 'spiffworkflow:properties'; -const SPIFF_PROP = 'spiffworkflow:property'; +const SPIFF_PARENT_PROP = 'spiffworkflow:Properties'; +const SPIFF_PROP = 'spiffworkflow:Property'; const PREFIX = 'spiffworkflow:'; /** diff --git a/app/spiffworkflow/extensions/propertiesPanel/ExtensionsPropertiesProvider.js b/app/spiffworkflow/extensions/propertiesPanel/ExtensionsPropertiesProvider.js index 2fe3110..544c204 100644 --- a/app/spiffworkflow/extensions/propertiesPanel/ExtensionsPropertiesProvider.js +++ b/app/spiffworkflow/extensions/propertiesPanel/ExtensionsPropertiesProvider.js @@ -268,14 +268,14 @@ function createBusinessRuleGroup(element, translate, moddle, commandStack) { commandStack, component: SpiffExtensionSelect, optionType: OPTION_TYPE.dmn_files, - name: 'spiffworkflow:calledDecisionId', + name: 'spiffworkflow:CalledDecisionId', label: translate('Select Decision Table'), description: translate('Select a decision table from the list'), }, { element, component: SpiffExtensionLaunchButton, - name: 'spiffworkflow:calledDecisionId', + name: 'spiffworkflow:CalledDecisionId', label: translate('Launch Editor'), event: 'spiff.dmn.edit', description: translate('Modify the Decision Table'), @@ -306,7 +306,7 @@ function createUserInstructionsGroup ( moddle, commandStack, component: SpiffExtensionTextArea, - name: 'spiffworkflow:instructionsForEndUser', + name: 'spiffworkflow:InstructionsForEndUser', label: 'Instructions', description: 'Displayed above user forms or when this task is executing.', }, @@ -315,7 +315,7 @@ function createUserInstructionsGroup ( moddle, commandStack, component: SpiffExtensionLaunchButton, - name: 'spiffworkflow:instructionsForEndUser', + name: 'spiffworkflow:InstructionsForEndUser', label: translate('Launch Editor'), event: 'spiff.markdown.edit', listenEvent: 'spiff.markdown.update', @@ -347,7 +347,7 @@ function createAllowGuestGroup ( moddle, commandStack, component: SpiffExtensionCheckboxEntry, - name: 'spiffworkflow:allowGuest', + name: 'spiffworkflow:AllowGuest', label: 'Guest can complete this task', description: 'Allow a guest user to complete this task without logging in. They will not be allowed to do anything but submit this task. If another task directly follows it that allows guest access, they could also complete that task.', }, @@ -356,7 +356,7 @@ function createAllowGuestGroup ( moddle, commandStack, component: SpiffExtensionTextArea, - name: 'spiffworkflow:guestConfirmation', + name: 'spiffworkflow:GuestConfirmation', label: 'Guest confirmation', description: 'This is markdown that is displayed to the user after they complete the task. If this is filled out then the user will not be able to complete additional tasks without a new link to the next task.', }, @@ -365,7 +365,7 @@ function createAllowGuestGroup ( moddle, commandStack, component: SpiffExtensionLaunchButton, - name: 'spiffworkflow:guestConfirmation', + name: 'spiffworkflow:GuestConfirmation', label: translate('Launch Editor'), event: 'spiff.markdown.edit', listenEvent: 'spiff.markdown.update', @@ -400,7 +400,7 @@ function createSignalButtonGroup ( moddle, commandStack, component: SpiffExtensionTextInput, - name: 'spiffworkflow:signalButtonLabel', + name: 'spiffworkflow:SignalButtonLabel', label: 'Button Label', description: description }, diff --git a/app/spiffworkflow/extensions/propertiesPanel/ScriptUnitTestArray.js b/app/spiffworkflow/extensions/propertiesPanel/ScriptUnitTestArray.js index c329f0f..03b17b1 100644 --- a/app/spiffworkflow/extensions/propertiesPanel/ScriptUnitTestArray.js +++ b/app/spiffworkflow/extensions/propertiesPanel/ScriptUnitTestArray.js @@ -16,7 +16,7 @@ const getScriptUnitTestsModdleElement = (shapeElement) => { return bizObj.extensionElements .get('values') .filter(function getInstanceOfType(e) { - return e.$instanceOf('spiffworkflow:unitTests'); + return e.$instanceOf('spiffworkflow:UnitTests'); })[0]; }; @@ -73,19 +73,19 @@ export function ScriptUnitTestArray(props) { if (!scriptUnitTestsModdleElement) { scriptUnitTestsModdleElement = scriptTaskModdleElement.$model.create( - 'spiffworkflow:unitTests' + 'spiffworkflow:UnitTests' ); scriptTaskModdleElement.extensionElements .get('values') .push(scriptUnitTestsModdleElement); } const scriptUnitTestModdleElement = scriptTaskModdleElement.$model.create( - 'spiffworkflow:unitTest' + 'spiffworkflow:UnitTest' ); const scriptUnitTestInputModdleElement = - scriptTaskModdleElement.$model.create('spiffworkflow:inputJson'); + scriptTaskModdleElement.$model.create('spiffworkflow:InputJson'); const scriptUnitTestOutputModdleElement = - scriptTaskModdleElement.$model.create('spiffworkflow:expectedOutputJson'); + scriptTaskModdleElement.$model.create('spiffworkflow:ExpectedOutputJson'); scriptUnitTestModdleElement.id = moddle.ids.nextPrefixed('ScriptUnitTest_'); scriptUnitTestInputModdleElement.value = '{}'; scriptUnitTestOutputModdleElement.value = '{}'; diff --git a/app/spiffworkflow/extensions/propertiesPanel/SpiffExtensionServiceProperties.js b/app/spiffworkflow/extensions/propertiesPanel/SpiffExtensionServiceProperties.js index 57ffeaf..bb5e0b0 100644 --- a/app/spiffworkflow/extensions/propertiesPanel/SpiffExtensionServiceProperties.js +++ b/app/spiffworkflow/extensions/propertiesPanel/SpiffExtensionServiceProperties.js @@ -12,9 +12,11 @@ let serviceTaskOperators = []; const previouslyUsedServiceTaskParameterValuesHash = {}; const LOW_PRIORITY = 500; -const SERVICE_TASK_OPERATOR_ELEMENT_NAME = `${SPIFFWORKFLOW_XML_NAMESPACE}:serviceTaskOperator`; -const SERVICE_TASK_PARAMETERS_ELEMENT_NAME = `${SPIFFWORKFLOW_XML_NAMESPACE}:parameters`; -const SERVICE_TASK_PARAMETER_ELEMENT_NAME = `${SPIFFWORKFLOW_XML_NAMESPACE}:parameter`; +// I'm not going to change these variable names, but this is actually the name of the modeller +// type (as defined in moddle/spiffworkflow.json) NOT the element name (which is lowercase) +const SERVICE_TASK_OPERATOR_ELEMENT_NAME = `${SPIFFWORKFLOW_XML_NAMESPACE}:ServiceTaskOperator`; +const SERVICE_TASK_PARAMETERS_ELEMENT_NAME = `${SPIFFWORKFLOW_XML_NAMESPACE}:Parameters`; +const SERVICE_TASK_PARAMETER_ELEMENT_NAME = `${SPIFFWORKFLOW_XML_NAMESPACE}:Parameter`; /** * A generic properties' editor for text input. diff --git a/app/spiffworkflow/extensions/propertiesPanel/SpiffScriptGroup.js b/app/spiffworkflow/extensions/propertiesPanel/SpiffScriptGroup.js index 0d45c7f..665c859 100644 --- a/app/spiffworkflow/extensions/propertiesPanel/SpiffScriptGroup.js +++ b/app/spiffworkflow/extensions/propertiesPanel/SpiffScriptGroup.js @@ -9,8 +9,8 @@ import { ScriptUnitTestArray } from './ScriptUnitTestArray'; export const SCRIPT_TYPE = { bpmn: 'bpmn:script', - pre: 'spiffworkflow:preScript', - post: 'spiffworkflow:postScript', + pre: 'spiffworkflow:PreScript', + post: 'spiffworkflow:PostScript', }; function PythonScript(props) { diff --git a/app/spiffworkflow/messages/propertiesPanel/MessagePayload.js b/app/spiffworkflow/messages/propertiesPanel/MessagePayload.js index cfa82b8..106a5c1 100644 --- a/app/spiffworkflow/messages/propertiesPanel/MessagePayload.js +++ b/app/spiffworkflow/messages/propertiesPanel/MessagePayload.js @@ -18,7 +18,7 @@ export function MessagePayload(props) { return messageElement.extensionElements .get('values') .filter(function getInstanceOfType(e) { - return e.$instanceOf('spiffworkflow:messagePayload'); + return e.$instanceOf('spiffworkflow:MessagePayload'); })[0]; } } @@ -37,7 +37,7 @@ export function MessagePayload(props) { let messagePayloadObject = getMessagePayloadObject(); if (!messagePayloadObject) { messagePayloadObject = messageElement.$model.create( - 'spiffworkflow:messagePayload' + 'spiffworkflow:MessagePayload' ); if (!messageElement.extensionElements) { messageElement.extensionElements = messageElement.$model.create( diff --git a/app/spiffworkflow/messages/propertiesPanel/MessageVariable.js b/app/spiffworkflow/messages/propertiesPanel/MessageVariable.js index b50c337..4cbba9a 100644 --- a/app/spiffworkflow/messages/propertiesPanel/MessageVariable.js +++ b/app/spiffworkflow/messages/propertiesPanel/MessageVariable.js @@ -18,7 +18,7 @@ export function MessageVariable(props) { return messageElement.extensionElements .get('values') .filter(function getInstanceOfType(e) { - return e.$instanceOf('spiffworkflow:messageVariable'); + return e.$instanceOf('spiffworkflow:MessageVariable'); })[0]; } } @@ -37,7 +37,7 @@ export function MessageVariable(props) { let messageVariableObject = getMessageVariableObject(); if (!messageVariableObject) { messageVariableObject = messageElement.$model.create( - 'spiffworkflow:messageVariable' + 'spiffworkflow:MessageVariable' ); if (!messageElement.extensionElements) { messageElement.extensionElements = messageElement.$model.create( diff --git a/app/spiffworkflow/moddle/spiffworkflow.json b/app/spiffworkflow/moddle/spiffworkflow.json index 6a5b0b6..8b04a81 100644 --- a/app/spiffworkflow/moddle/spiffworkflow.json +++ b/app/spiffworkflow/moddle/spiffworkflow.json @@ -3,9 +3,10 @@ "uri": "http://spiffworkflow.org/bpmn/schema/1.0/core", "prefix": "spiffworkflow", "associations": [], + "xml": { "tagAlias": "lowerCase" }, "types": [ { - "name": "preScript", + "name": "PreScript", "superClass": [ "Element" ], "properties": [ { @@ -16,7 +17,7 @@ ] }, { - "name": "postScript", + "name": "PostScript", "superClass": [ "Element" ], "properties": [ { @@ -27,7 +28,7 @@ ] }, { - "name": "messagePayload", + "name": "MessagePayload", "superClass": [ "Element" ], "properties": [ { @@ -38,7 +39,7 @@ ] }, { - "name": "messageVariable", + "name": "MessageVariable", "superClass": [ "Element" ], "properties": [ { @@ -49,7 +50,7 @@ ] }, { - "name": "calledDecisionId", + "name": "CalledDecisionId", "superClass": [ "Element" ], "properties": [ { @@ -60,7 +61,7 @@ ] }, { - "name": "instructionsForEndUser", + "name": "InstructionsForEndUser", "superClass": [ "Element" ], "properties": [ { @@ -71,7 +72,7 @@ ] }, { - "name": "allowGuest", + "name": "AllowGuest", "superClass": [ "Element" ], "properties": [ { @@ -82,7 +83,7 @@ ] }, { - "name": "guestConfirmation", + "name": "GuestConfirmation", "superClass": [ "Element" ], "properties": [ { @@ -93,7 +94,7 @@ ] }, { - "name": "signalButtonLabel", + "name": "SignalButtonLabel", "superClass": [ "Element" ], "properties": [ { @@ -104,20 +105,20 @@ ] }, { - "name": "properties", + "name": "Properties", "superClass": [ "Element" ], "properties": [ { "name": "properties", - "type": "property", + "type": "Property", "isMany": true } ] }, { - "name": "property", + "name": "Property", "superClass": [ "Element" ], "properties": [ { @@ -133,7 +134,7 @@ ] }, { - "name": "serviceTaskOperator", + "name": "ServiceTaskOperator", "superClass": [ "Element" ], @@ -155,20 +156,20 @@ ] }, { - "name": "parameters", + "name": "Parameters", "superClass": [ "Element" ], "properties": [ { "name": "parameters", - "type": "parameter", + "type": "Parameter", "isMany": true } ] }, { - "name": "parameter", + "name": "Parameter", "superClass": [ "Element" ], "properties": [ { @@ -189,20 +190,20 @@ ] }, { - "name": "unitTests", + "name": "UnitTests", "superClass": [ "Element" ], "properties": [ { "name": "unitTests", - "type": "unitTest", + "type": "UnitTest", "isMany": true } ] }, { - "name": "unitTest", + "name": "UnitTest", "superClass": [ "Element" ], "properties": [ { @@ -212,16 +213,16 @@ }, { "name": "inputJson", - "type": "inputJson" + "type": "InputJson" }, { "name": "expectedOutputJson", - "type": "expectedOutputJson" + "type": "ExpectedOutputJson" } ] }, { - "name": "inputJson", + "name": "InputJson", "superClass": [ "Element" ], "properties": [ { @@ -232,7 +233,7 @@ ] }, { - "name": "expectedOutputJson", + "name": "ExpectedOutputJson", "superClass": [ "Element" ], "properties": [ { @@ -243,7 +244,7 @@ ] }, { - "name": "payloadExpression", + "name": "PayloadExpression", "superClass": [ "Element" ], "properties": [ { @@ -254,7 +255,7 @@ ] }, { - "name": "variableName", + "name": "PariableName", "superClass": [ "Element" ], "properties": [ { @@ -265,7 +266,7 @@ ] }, { - "name": "scriptsOnInstances", + "name": "ScriptsOnInstances", "extends": [ "bpmn:MultiInstanceLoopCharacteristics", "bpmn:StandardLoopCharacteristics" diff --git a/test/spec/BusinessRulePropsSpec.js b/test/spec/BusinessRulePropsSpec.js index 5777714..e5294de 100644 --- a/test/spec/BusinessRulePropsSpec.js +++ b/test/spec/BusinessRulePropsSpec.js @@ -49,7 +49,7 @@ describe('Business Rule Properties Panel', function () { modeler.get('eventBus').once('spiff.dmn_files.requested', return_files); expectSelected('business_rule_task'); // THEN - a properties panel exists with a section for editing that script - const entry = findEntry('extension_spiffworkflow:calledDecisionId', getPropertiesPanel()); + const entry = findEntry('extension_spiffworkflow:CalledDecisionId', getPropertiesPanel()); expect(entry, 'No Entry').to.exist; const selectList = findSelect(entry); expect(selectList, 'No Select').to.exist; @@ -60,7 +60,7 @@ describe('Business Rule Properties Panel', function () { const modeler = getBpmnJS(); modeler.get('eventBus').once('spiff.dmn_files.requested', return_files); const businessRuleTask = await expectSelected('business_rule_task'); - const entry = findEntry('extension_calledDecisionId', getPropertiesPanel()); + const entry = findEntry('extension_CalledDecisionId', getPropertiesPanel()); const selectList = findSelect(entry); changeInput(selectList, 'Decision_Pizza_Price'); @@ -73,7 +73,7 @@ describe('Business Rule Properties Panel', function () { 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'); - const entry = findEntry('extension_calledDecisionId', getPropertiesPanel()); + const entry = findEntry('extension_CalledDecisionId', getPropertiesPanel()); const selectList = findSelect(entry); expect(selectList.value, "initial value is wrong").to.equal('test_decision'); diff --git a/test/spec/MessagesSpec.js b/test/spec/MessagesSpec.js index c3dadca..8b0d240 100644 --- a/test/spec/MessagesSpec.js +++ b/test/spec/MessagesSpec.js @@ -80,7 +80,7 @@ describe('Messages should work', function () { // Select the second Task const sendShape = await expectSelected('ActivitySendLetter'); expect(sendShape, "Can't find Send Task").to.exist; - + // THEN - there is a payload. const payload = findEntry('messagePayload', container); expect(payload, "Can't find the message payload").to.exist; diff --git a/test/spec/ScriptsPropsSpec.js b/test/spec/ScriptsPropsSpec.js index a905acf..0d483ff 100644 --- a/test/spec/ScriptsPropsSpec.js +++ b/test/spec/ScriptsPropsSpec.js @@ -62,10 +62,10 @@ describe('Properties Panel Script Tasks', function () { expect(scriptInput.value).to.equal('x = 100'); }); - it('should parse the bpmn:script tag when you open an existing file', async function () { + it('should parse the spiffworkflow:prescript tag when you open an existing file', async function () { await expectSelected('task_confirm'); const entry = findEntry( - 'pythonScript_spiffworkflow:preScript', + 'pythonScript_spiffworkflow:PreScript', PROPERTIES_PANEL_CONTAINER ); const scriptInput = domQuery('textarea', entry); diff --git a/test/spec/UserTaskPropsSpec.js b/test/spec/UserTaskPropsSpec.js index 7d2b031..ebbcea8 100644 --- a/test/spec/UserTaskPropsSpec.js +++ b/test/spec/UserTaskPropsSpec.js @@ -129,7 +129,7 @@ describe('Properties Panel for User Tasks', function () { // The change is reflected in the business object let instructions = getExtensionValue( userElement, - 'spiffworkflow:instructionsForEndUser' + 'spiffworkflow:InstructionsForEndUser' ); expect(instructions).to.equal('#Hello!'); });