Merge pull request #28 from sartography/bug/browser_lock_on_dmn_selection
Bug/browser lock on dmn selection
This commit is contained in:
commit
b96b4d1596
|
@ -46,9 +46,9 @@ export function SpiffExtensionSelect(props) {
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!(optionType in spiffExtensionOptions) ||
|
!(optionType in spiffExtensionOptions) ||
|
||||||
spiffExtensionOptions[optionType].length === 0
|
spiffExtensionOptions[optionType] === null
|
||||||
) {
|
) {
|
||||||
spiffExtensionOptions[optionType] = [];
|
spiffExtensionOptions[optionType] = null;
|
||||||
requestOptions(eventBus, element, commandStack, optionType);
|
requestOptions(eventBus, element, commandStack, optionType);
|
||||||
}
|
}
|
||||||
const getOptions = () => {
|
const getOptions = () => {
|
||||||
|
|
|
@ -33,8 +33,8 @@ describe('Business Rule Properties Panel', function () {
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
function addOptionsToEventBus(bpmnModeler) {
|
|
||||||
bpmnModeler.on('spiff.dmn_files.requested', (event) => {
|
const return_files = (event) => {
|
||||||
event.eventBus.fire('spiff.dmn_files.returned', {
|
event.eventBus.fire('spiff.dmn_files.returned', {
|
||||||
options: [
|
options: [
|
||||||
{ label: 'Calculate Pizza Price', value: 'Decision_Pizza_Price' },
|
{ label: 'Calculate Pizza Price', value: 'Decision_Pizza_Price' },
|
||||||
|
@ -42,14 +42,12 @@ describe('Business Rule Properties Panel', function () {
|
||||||
{ label: 'Test Decision', value: 'test_decision' },
|
{ label: 'Test Decision', value: 'test_decision' },
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
it('should display a dropdown to select from available decision tables', async function () {
|
it('should display a dropdown to select from available decision tables', async function () {
|
||||||
const modeler = getBpmnJS();
|
const modeler = getBpmnJS();
|
||||||
addOptionsToEventBus(modeler);
|
modeler.get('eventBus').once('spiff.dmn_files.requested', return_files);
|
||||||
expectSelected('business_rule_task');
|
expectSelected('business_rule_task');
|
||||||
|
|
||||||
// THEN - a properties panel exists with a section for editing that script
|
// 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;
|
expect(entry, 'No Entry').to.exist;
|
||||||
|
@ -60,7 +58,7 @@ describe('Business Rule Properties Panel', function () {
|
||||||
it('should update the spiffworkflow:calledDecisionId tag when you modify the called decision select box', async function () {
|
it('should update the spiffworkflow:calledDecisionId tag when you modify the called decision select box', async function () {
|
||||||
// IF - a script tag is selected, and you change the script in the properties panel
|
// IF - a script tag is selected, and you change the script in the properties panel
|
||||||
const modeler = getBpmnJS();
|
const modeler = getBpmnJS();
|
||||||
addOptionsToEventBus(modeler);
|
modeler.get('eventBus').once('spiff.dmn_files.requested', return_files);
|
||||||
const businessRuleTask = await expectSelected('business_rule_task');
|
const businessRuleTask = await expectSelected('business_rule_task');
|
||||||
const entry = findEntry('extension_calledDecisionId', getPropertiesPanel());
|
const entry = findEntry('extension_calledDecisionId', getPropertiesPanel());
|
||||||
const selectList = findSelect(entry);
|
const selectList = findSelect(entry);
|
||||||
|
@ -85,4 +83,5 @@ describe('Business Rule Properties Panel', function () {
|
||||||
const element = businessObject.extensionElements.values[0];
|
const element = businessObject.extensionElements.values[0];
|
||||||
expect(element.value).to.equal('test_decision');
|
expect(element.value).to.equal('test_decision');
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
"bootstrap": "^5.2.0",
|
"bootstrap": "^5.2.0",
|
||||||
"bpmn-js": "^9.3.2",
|
"bpmn-js": "^9.3.2",
|
||||||
"bpmn-js-properties-panel": "^1.10.0",
|
"bpmn-js-properties-panel": "^1.10.0",
|
||||||
"bpmn-js-spiffworkflow": "sartography/bpmn-js-spiffworkflow#feature/more_launch_buttons_and_dropdowns",
|
"bpmn-js-spiffworkflow": "sartography/bpmn-js-spiffworkflow#main",
|
||||||
"craco": "^0.0.3",
|
"craco": "^0.0.3",
|
||||||
"date-fns": "^2.28.0",
|
"date-fns": "^2.28.0",
|
||||||
"diagram-js": "^8.5.0",
|
"diagram-js": "^8.5.0",
|
||||||
|
@ -7485,7 +7485,7 @@
|
||||||
},
|
},
|
||||||
"node_modules/bpmn-js-spiffworkflow": {
|
"node_modules/bpmn-js-spiffworkflow": {
|
||||||
"version": "0.0.8",
|
"version": "0.0.8",
|
||||||
"resolved": "git+ssh://git@github.com/sartography/bpmn-js-spiffworkflow.git#84593aee1ead7328efdc7da03ab3c9cd34364496",
|
"resolved": "git+ssh://git@github.com/sartography/bpmn-js-spiffworkflow.git#24c2cc36067adf8fed75990c6bf4a1a67bc9122b",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"inherits": "^2.0.4",
|
"inherits": "^2.0.4",
|
||||||
|
@ -35755,8 +35755,8 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bpmn-js-spiffworkflow": {
|
"bpmn-js-spiffworkflow": {
|
||||||
"version": "git+ssh://git@github.com/sartography/bpmn-js-spiffworkflow.git#84593aee1ead7328efdc7da03ab3c9cd34364496",
|
"version": "git+ssh://git@github.com/sartography/bpmn-js-spiffworkflow.git#24c2cc36067adf8fed75990c6bf4a1a67bc9122b",
|
||||||
"from": "bpmn-js-spiffworkflow@sartography/bpmn-js-spiffworkflow#feature/more_launch_buttons_and_dropdowns",
|
"from": "bpmn-js-spiffworkflow@sartography/bpmn-js-spiffworkflow#main",
|
||||||
"requires": {
|
"requires": {
|
||||||
"inherits": "^2.0.4",
|
"inherits": "^2.0.4",
|
||||||
"inherits-browser": "^0.0.1",
|
"inherits-browser": "^0.0.1",
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
"bootstrap": "^5.2.0",
|
"bootstrap": "^5.2.0",
|
||||||
"bpmn-js": "^9.3.2",
|
"bpmn-js": "^9.3.2",
|
||||||
"bpmn-js-properties-panel": "^1.10.0",
|
"bpmn-js-properties-panel": "^1.10.0",
|
||||||
"bpmn-js-spiffworkflow": "sartography/bpmn-js-spiffworkflow#feature/more_launch_buttons_and_dropdowns",
|
"bpmn-js-spiffworkflow": "sartography/bpmn-js-spiffworkflow#main",
|
||||||
"craco": "^0.0.3",
|
"craco": "^0.0.3",
|
||||||
"date-fns": "^2.28.0",
|
"date-fns": "^2.28.0",
|
||||||
"diagram-js": "^8.5.0",
|
"diagram-js": "^8.5.0",
|
||||||
|
|
|
@ -107,7 +107,6 @@ export default function ProcessModelEditDiagram() {
|
||||||
};
|
};
|
||||||
|
|
||||||
if (params.file_name) {
|
if (params.file_name) {
|
||||||
console.log(`processModelPath: ${processModelPath}`);
|
|
||||||
HttpService.makeCallToBackend({
|
HttpService.makeCallToBackend({
|
||||||
path: `/${processModelPath}/files/${params.file_name}`,
|
path: `/${processModelPath}/files/${params.file_name}`,
|
||||||
successCallback: fileResult,
|
successCallback: fileResult,
|
||||||
|
@ -689,9 +688,8 @@ export default function ProcessModelEditDiagram() {
|
||||||
const file = findFileNameForReferenceId(processId, 'bpmn');
|
const file = findFileNameForReferenceId(processId, 'bpmn');
|
||||||
if (file) {
|
if (file) {
|
||||||
const path = generatePath(
|
const path = generatePath(
|
||||||
'/admin/process-models/:process_group_id/:process_model_id/files/:file_name',
|
'/admin/process-models/:process_model_id/files/:file_name',
|
||||||
{
|
{
|
||||||
process_group_id: params.process_group_id,
|
|
||||||
process_model_id: params.process_model_id,
|
process_model_id: params.process_model_id,
|
||||||
file_name: file.name,
|
file_name: file.name,
|
||||||
}
|
}
|
||||||
|
@ -701,9 +699,8 @@ export default function ProcessModelEditDiagram() {
|
||||||
};
|
};
|
||||||
const onLaunchJsonEditor = (fileName: string) => {
|
const onLaunchJsonEditor = (fileName: string) => {
|
||||||
const path = generatePath(
|
const path = generatePath(
|
||||||
'/admin/process-models/:process_group_id/:process_model_id/form/:file_name',
|
'/admin/process-models/:process_model_id/files/:file_name',
|
||||||
{
|
{
|
||||||
process_group_id: params.process_group_id,
|
|
||||||
process_model_id: params.process_model_id,
|
process_model_id: params.process_model_id,
|
||||||
file_name: fileName,
|
file_name: fileName,
|
||||||
}
|
}
|
||||||
|
@ -714,9 +711,8 @@ export default function ProcessModelEditDiagram() {
|
||||||
const file = findFileNameForReferenceId(processId, 'dmn');
|
const file = findFileNameForReferenceId(processId, 'dmn');
|
||||||
if (file) {
|
if (file) {
|
||||||
const path = generatePath(
|
const path = generatePath(
|
||||||
'/admin/process-models/:process_group_id/:process_model_id/files/:file_name',
|
'/admin/process-models/:process_model_id/files/:file_name',
|
||||||
{
|
{
|
||||||
process_group_id: params.process_group_id,
|
|
||||||
process_model_id: params.process_model_id,
|
process_model_id: params.process_model_id,
|
||||||
file_name: file.name,
|
file_name: file.name,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue