Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion public/locales/de-DE/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,21 @@
"startedAfter": "startedAfter",
"finished": "finished"
},
"manage_title": "Prozessinstanz-Filter verwalten"
"manage_title": "Prozessinstanz-Filter verwalten",
"delete": {
"open": "Auswahl löschen",
"title": "Laufende Prozessinstanzen löschen",
"reason": "Löschgrund",
"skip-custom-listeners": "Benutzerdefinierte Listener überspringen",
"skip-subprocesses": "Unterprozesse überspringen",
"skip-io-mappings": "IO-Mappings überspringen",
"confirm": "Instanzen löschen",
"select-all": "Alle Instanzen auswählen",
"count": "{{count}} ausgewählt",
"batch-created": "Batch erstellt:",
"view-batch": "Batch anzeigen",
"success": "Lösch-Batch gestartet."
}
},
"history-mode-na": "Live-Daten – der Verlaufsmodus gilt hier nicht.",
"filter": {
Expand Down
16 changes: 15 additions & 1 deletion public/locales/en-US/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,21 @@
"startedAfter": "startedAfter",
"finished": "finished"
},
"manage_title": "Manage process-instance filters"
"manage_title": "Manage process-instance filters",
"delete": {
"open": "Delete selected",
"title": "Delete running process instances",
"reason": "Delete reason",
"skip-custom-listeners": "Skip custom listeners",
"skip-subprocesses": "Skip subprocesses",
"skip-io-mappings": "Skip IO mappings",
"confirm": "Delete instances",
"select-all": "Select all instances",
"count": "{{count}} selected",
"batch-created": "Batch created:",
"view-batch": "View batch",
"success": "Delete batch started."
}
},
"history-mode-na": "Live data — history mode does not apply here.",
"filter": {
Expand Down
14 changes: 14 additions & 0 deletions src/api/resources/process_instance.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,19 @@ const modify_process_instance_async = (
state.api.process.instance.modification,
);

/**
* Deletes multiple running process instances asynchronously.
* Returns a Batch the user can monitor on the Batches page.
* @see https://docs.camunda.org/manual/latest/reference/rest/process-instance/post-delete/
*/
const delete_process_instances_async = (state, body) =>
POST(
"/process-instance/delete",
body,
state,
state.api.process.instance.delete_async,
);

const process_instance = {
one: get_process_instance,
variables: get_process_instance_variables,
Expand All @@ -113,6 +126,7 @@ const process_instance = {
activity_instances: get_activity_instances,
modify: modify_process_instance,
modify_async: modify_process_instance_async,
delete_async: delete_process_instances_async,
};

export default process_instance;
17 changes: 17 additions & 0 deletions src/api/resources/process_instance.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,21 @@ describe("api/resources/process_instance", () => {
signal: state.api.process.instance.modification,
});
});

it("delete_async() POSTs a batch delete to /process-instance/delete", () => {
const body = {
processInstanceIds: ["inst-1", "inst-2"],
deleteReason: "obsolete",
skipCustomListeners: true,
skipSubprocesses: true,
skipIoMappings: false,
};
process_instance.delete_async(state, body);
expect_api_call(POST, {
url: "/process-instance/delete",
body,
state,
signal: state.api.process.instance.delete_async,
});
});
});
52 changes: 52 additions & 0 deletions src/css/components.css
Original file line number Diff line number Diff line change
Expand Up @@ -869,6 +869,58 @@ div.accordion {
color: var(--text-2);
}

/* process instance bulk actions */

.bulk-instance-delete {
margin-bottom: var(--spacing-2);
padding: var(--spacing-1);
border: var(--border);
border-radius: var(--border-radius);
background: var(--background-1);
}

.bulk-instance-delete fieldset {
display: grid;
grid-template-columns: minmax(14rem, 1fr) repeat(3, max-content);
gap: var(--spacing-1);
align-items: end;
}

.bulk-instance-delete legend {
grid-column: 1 / -1;
}

.bulk-instance-delete label {
display: flex;
flex-direction: column;
gap: var(--spacing-half);
}

.bulk-instance-delete label:has(input[type="checkbox"]) {
flex-direction: row;
align-items: center;
}

.bulk-instance-delete input[type="checkbox"] {
width: auto;
}

.bulk-instance-delete .button-group {
grid-column: 1 / -1;
display: flex;
gap: var(--spacing-1);
}

.bulk-instance-delete .info-box {
margin-top: var(--spacing-1);
}

@media (max-width: 840px) {
.bulk-instance-delete fieldset {
grid-template-columns: 1fr;
}
}

/* task detail cards */

.task-cards {
Expand Down
Loading