Skip to content

Commit

Permalink
Merge branch 'main' of github.com:PROCEED-Labs/proceed into ms2/refer…
Browse files Browse the repository at this point in the history
…enced-process-export
  • Loading branch information
jjoderis committed Oct 19, 2023
2 parents 63de34d + 01dc07d commit c81d1b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const request = require('supertest')('localhost');
const { startMockEngineProcesses } = require('./startEngines.js');
const { ensureCorrectProceedNamespace } = require('@proceed/bpmn-helper');

jest.setTimeout(60000);
jest.setTimeout(100000);

function killEngineProcess(engineProcess) {
return new Promise((resolve) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export type ProcessExportData = {
name?: string;
bpmn: string;
isImport: boolean;
subprocesses: { id: string; name: string }[];
subprocesses: { id: string; name?: string }[];
imports: { definitionId: string; processVersion: string }[];
};
};
Expand Down Expand Up @@ -111,7 +111,7 @@ function getImagesReferencedByHtml(html: string) {
*
* @param bpmn
*/
async function getCollapsedSubprocessIds(bpmn: string) {
async function getCollapsedSubprocessInfos(bpmn: string) {
const definitions = await toBpmnObject(bpmn);
const subprocesses = getElementsByTagName(definitions, 'bpmn:SubProcess');

Expand All @@ -134,7 +134,7 @@ type ExportMap = {
name?: string;
bpmn: string;
isImport: boolean;
subprocesses: { id: string; name: string }[];
subprocesses: { id: string; name?: string }[];
imports: { definitionId: string; processVersion: string }[];
};
};
Expand Down Expand Up @@ -253,7 +253,7 @@ export async function prepareExport(
if (options.subprocesses) {
for (const [version, { bpmn }] of Object.entries(exportData[definitionId].versions)) {
exportData[definitionId].versions[version].subprocesses = (
await getCollapsedSubprocessIds(bpmn)
await getCollapsedSubprocessInfos(bpmn)
).reverse();
}
}
Expand Down

0 comments on commit c81d1b3

Please sign in to comment.