Merge branch 'main' into feature/process-nav-improvements
This commit is contained in:
commit
2071317e91
|
@ -1050,8 +1050,8 @@ export default function ProcessInstanceListTable({
|
|||
}
|
||||
return null;
|
||||
}}
|
||||
placeholder="Process Initiator"
|
||||
titleText="PROC"
|
||||
placeholder="Starting typing username"
|
||||
titleText="Process Initiator"
|
||||
selectedItem={processInitiatorSelection}
|
||||
/>
|
||||
</Column>
|
||||
|
|
|
@ -39,6 +39,7 @@ export interface ProcessInstanceTask {
|
|||
updated_at_in_seconds: number;
|
||||
current_user_is_potential_owner: number;
|
||||
potential_owner_usernames: string;
|
||||
calling_subprocess_task_id: string;
|
||||
}
|
||||
|
||||
export interface ProcessReference {
|
||||
|
|
|
@ -200,11 +200,18 @@ export default function ProcessInstanceShow({ variant }: OwnProps) {
|
|||
const taskIds = { completed: [], readyOrWaiting: [] };
|
||||
if (tasks) {
|
||||
tasks.forEach(function getUserTasksElement(task: ProcessInstanceTask) {
|
||||
if (task.state === 'COMPLETED') {
|
||||
(taskIds.completed as any).push(task);
|
||||
}
|
||||
if (task.state === 'READY' || task.state === 'WAITING') {
|
||||
(taskIds.readyOrWaiting as any).push(task);
|
||||
const callingSubprocessId = searchParams.get('call_activity_task_id');
|
||||
if (
|
||||
!callingSubprocessId ||
|
||||
callingSubprocessId === task.calling_subprocess_task_id
|
||||
) {
|
||||
console.log('callingSubprocessId', callingSubprocessId);
|
||||
if (task.state === 'COMPLETED') {
|
||||
(taskIds.completed as any).push(task);
|
||||
}
|
||||
if (task.state === 'READY' || task.state === 'WAITING') {
|
||||
(taskIds.readyOrWaiting as any).push(task);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -474,7 +481,10 @@ export default function ProcessInstanceShow({ variant }: OwnProps) {
|
|||
});
|
||||
} else if (tasks) {
|
||||
const matchingTask: any = tasks.find((task: any) => {
|
||||
const callingSubprocessId = searchParams.get('call_activity_task_id');
|
||||
return (
|
||||
(!callingSubprocessId ||
|
||||
callingSubprocessId === task.calling_subprocess_task_id) &&
|
||||
task.name === shapeElement.id &&
|
||||
bpmnProcessIdentifiers.includes(task.process_identifier)
|
||||
);
|
||||
|
@ -667,7 +677,7 @@ export default function ProcessInstanceShow({ variant }: OwnProps) {
|
|||
buttons.push(
|
||||
<Link
|
||||
data-qa="go-to-call-activity-result"
|
||||
to={`${window.location.pathname}?process_identifier=${task.call_activity_process_identifier}`}
|
||||
to={`${window.location.pathname}?process_identifier=${task.call_activity_process_identifier}&call_activity_task_id=${task.id}`}
|
||||
target="_blank"
|
||||
>
|
||||
View Call Activity Diagram
|
||||
|
|
Loading…
Reference in New Issue