Specifies the name of the next activity and the transition’s ID.
Here is how to finish a task:
try {
// Get all transitions for the task const exits = await task.getExits();
// Finish the task // Pass the transition ID and the form’s data await task.submitTask(exits[0].id, {comment: 'Task completed'});
} catch (e) {
// If the process is already finished, the exception can be processed
}
Transition from a process activity
Specifies the name of the next activity and the transition’s ID. Here is how to finish a task:
try { // Get all transitions for the task const exits = await task.getExits(); // Finish the task // Pass the transition ID and the form’s data await task.submitTask(exits[0].id, {comment: 'Task completed'}); } catch (e) { // If the process is already finished, the exception can be processed }