fixed issue displaying task data for call activities called multiple times in a diagram w/ burnettk
This commit is contained in:
parent
c2a197d8bb
commit
e2c6c00dc3
|
@ -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);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -470,7 +477,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)
|
||||
);
|
||||
|
@ -664,7 +674,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