From 5c0e6084abb187e434b3c9dd7bf582a3740d5b3f Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 20 Apr 2023 15:26:54 -0400 Subject: [PATCH] * Because end events won't always have information, allow the interstitial api endpoint to return the last task, even if it doesn't have any end user information. This prevents us from just redirecting everthing back to the home page and encourages better end event messaging. * Cleaning up icons so they are a little smaller and more consistent. * Always show that action column. * Improve the state managment and layout of the interstitial page. --- .../routes/tasks_controller.py | 9 +- .../public/interstitial/checkmark.png | Bin 2995 -> 0 bytes .../public/interstitial/clock.png | Bin 4172 -> 0 bytes .../public/interstitial/completed.png | Bin 0 -> 2009 bytes .../public/interstitial/lock.png | Bin 2392 -> 0 bytes .../public/interstitial/locked.png | Bin 0 -> 1898 bytes .../public/interstitial/redirect.png | Bin 0 -> 1881 bytes .../public/interstitial/waiting.png | Bin 0 -> 1750 bytes .../src/components/InstructionsForEndUser.tsx | 3 +- .../src/components/MyCompletedInstances.tsx | 1 + .../src/routes/CompletedInstances.tsx | 3 + .../src/routes/ProcessInstanceList.tsx | 2 +- .../src/routes/ProcessInterstitial.tsx | 112 ++++++++++-------- 13 files changed, 74 insertions(+), 56 deletions(-) delete mode 100644 spiffworkflow-frontend/public/interstitial/checkmark.png delete mode 100644 spiffworkflow-frontend/public/interstitial/clock.png create mode 100644 spiffworkflow-frontend/public/interstitial/completed.png delete mode 100644 spiffworkflow-frontend/public/interstitial/lock.png create mode 100644 spiffworkflow-frontend/public/interstitial/locked.png create mode 100644 spiffworkflow-frontend/public/interstitial/redirect.png create mode 100644 spiffworkflow-frontend/public/interstitial/waiting.png diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/routes/tasks_controller.py b/spiffworkflow-backend/src/spiffworkflow_backend/routes/tasks_controller.py index c836456a..4e1de9a5 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/routes/tasks_controller.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/routes/tasks_controller.py @@ -396,9 +396,6 @@ def _interstitial_stream(process_instance_id: int) -> Generator[str, str, None]: process_instance = _find_process_instance_by_id_or_raise(process_instance_id) processor = ProcessInstanceProcessor(process_instance) reported_ids = [] # bit of an issue with end tasks showing as getting completed twice. - - # return Response(get_data(), mimetype='text/event-stream') - spiff_task = processor.next_task() last_task = None while last_task != spiff_task: @@ -413,7 +410,11 @@ def _interstitial_stream(process_instance_id: int) -> Generator[str, str, None]: spiff_task = processor.next_task() # Note, this has to be done in case someone leaves the page, # which can otherwise cancel this function and leave completed tasks un-registered. - processor.save() # Fixme - maybe find a way not to do this on every method? + processor.save() # Fixme - maybe find a way not to do this on every loop? + if len(reported_ids) == 0: + # Always provide some response, in the event no instructions were provided. + task = ProcessInstanceService.spiff_task_to_api_task(processor, processor.next_task()) + yield f"data: {current_app.json.dumps(task)} \n\n" def interstitial(process_instance_id: int) -> Response: diff --git a/spiffworkflow-frontend/public/interstitial/checkmark.png b/spiffworkflow-frontend/public/interstitial/checkmark.png deleted file mode 100644 index 6467b220ca806199b59f43a13b315f2efcd967ba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2995 zcmZuzc{tQ-8y==+tXV>6@H5GhWo9f{vr8ytD@$mMVdfY!V`dDpWQvr?5|VvvCFev@ zIJU_aO7>4>-=YXvB9w2`IoJ2kcU`~d_g>fY-1l=o&wagrytgmdTJrNq@_;}feycO) z_UzMnKe!<5e?TfylYMZL&$v)QAP8f)Ne!^a`{Mq`#r-Pz1QH1U zfYks;9F~FwXgGGTg#r9Nm&Dd0phEz~-zor{ibH#og5dgqKiV4$_)^$45|I!B_>d?7 z9Z$u3;R$$Jh*D}d=@NT8+5PRz*!%9U1~}sVu^@FMQb!eqR8>Feh(hYIKP}yjNMaWo zZ1daiKney6!qI4CsvZJCB4ddd0-lVf(DqG7cw=d3JOP2y)j?_?{*U3RULmUgI83$A z#u%~NI{%u1L=K_s8vrshLjo59y$E;=U{3N!kAATNU$bVmg*>us?}N z{iRI)#qs_{L0rXBNC=b~645qY|DAn(^sLNH9D}pIW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+6JIrBF5bXLEsL?BFXKHy4TQgfU&GXH ze`19m-ZPTe%3|(PCOkPdT$%5UD;^x4PHdKLz7HSYP$~0wd^XczJ?hU|=9^u5rm3cI zQ4w}lUzcoYUnSY;R#5BoU3W#Hd954nw&Kbhe#y*@^xr!Vi@o|a==vatlXaw1bvF)Co zFzk_On(}&1M?v;<;O3BMtNJ=3JJl0gBS*wo6;ym2s_NAA7xxA|51KT*+?gc$Rtz z1qr`IfBNulX6mX~jofJr=gR4k`b|J6DDgw@U(#|FC|;?V+THn|&itr+p-}~j!<*QQ zp0X2LHy_@WQJ$@s0j)gN=|W;^nv`7Wp~9|dRU|m|$csFzlc8XR5F{(Ap(RfJ+uth= zMNOx+ilXSsvs&+sb%%VO15jo6tekw-`qM+}`cm5W!sF;CR>+}dwzANl>OGMo zo%sQ7;`u$-OM6KY?g`ZbI}V-aE$9~6w=ne??=^10n#MSGgjrRC*tyV%Gm8N~+t@s}n z$5yn~>9B%ym^LD-qbD#%EhI~FT*RwIbAqE!VfeK*=F&^}NKH$}kRKkuNK*lJ8m97B zhu`RAF4jt%w3m6+_#sJF)_=h;^3Sx-JZp)s6Z_*vViqSc3Klzg{8p$gz2V*%)pJ$F z^Tto^c6~SlGc_P+__0c)bStwrrUl?JE@1^9i_iu?U%ri)ab31SO2a#hH7HMe^>+6% zSm5?TZ7(v%i`tL`S)qjmp}C~i8z=d>NB;yxFuw4td3e{U5~z+dPyE!q%4egbc8sEQ zE`5XF!y)<>6ac7~ylit{0Au$*95Mwbt!_k5(d0yxTijiu2(m1^hA{GIM^EKg$zdC5 z$e2^G@&ZT!9(pZT)Y2ma;cbI>Bfmu^IvZ93iZrRKp@#h8QL z3&uU1310-ys^wR`q(SpQ`^?C*X;ATub^0;8WvSF_Rml_&FOdTAR>jYJd*F>LwpQC4 TDyHn08pz7R*8GX-mFxcnUld#B diff --git a/spiffworkflow-frontend/public/interstitial/clock.png b/spiffworkflow-frontend/public/interstitial/clock.png deleted file mode 100644 index 3e4e5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vh50^!AJ4PwC{J>cfwoQHZMHSGCG%yT=Gz@6;zA76{ka4y9hew=w<>H)79S_^TB|V zE24VpQ`pQfY`F1OrW?rzRul7KFHg?Lg_Mob&hzQA^Pl*{aK^tuLzZ)7GLB=f&O{~1 Ul-wu*4*4JxLvw>#J=cW)0YkePV*mgE diff --git a/spiffworkflow-frontend/public/interstitial/completed.png b/spiffworkflow-frontend/public/interstitial/completed.png new file mode 100644 index 0000000000000000000000000000000000000000..e5cf351003c99da93b6b5cbd63cf3debd8255275 GIT binary patch literal 2009 zcmYjSdpOg5AO3AL*&MDXCg;s5#F+D8rDmg(isdOe)Mkd&PHkfmwNX+^)`3T(ywvu3 zyd|fkl@==UIK7c$=8X$aLJvz$>D}~P*ZcnQ`QF#}{(SE5egF0OUJ5?2OB-qo1pq*M z&u%cswU6 z<0OYnVo{u!>^RZPHe=R0J0cHY+O8SSyW?9LjR6L%-A+xD0E|tjuXiV}+ zq#cVC6GNjQRTq0CmCR%~v#4Y)GmcH7Z@hAoq!e1Hgg7>Zq*5V6sdNh9igs~Bxu8*K z&rlZ+U$lp>s|RDm1fv`d{24KUO{M_xTrP{_>+H;AQ5a+zl|^E6RXLqwC|nYi=Ir9_ z?&<2`ta3)Fj8V}^sP(|8pPhJ(>*2~5!`AJYtRyxyE}jeEaA;(3LNtv^M&g-t5|x3( zQ(~y(pW#%FN<;E`*hC7MNvAUzoOM&yx+Z2_;+#xjGo4+W(9W+%pDzIb#B~oI8+y86 zx`0aiH9()g<7wvxYXUqgLSH)^Z*d-f!M_OZzBN8Fq0NTiz3 z5bm|9B+>4Mn`wjYV$@Iuwj=`gXNl;Bqn~VyHhyx;U%T9aGW~MfV5p7x^p3?8&(Aa*AR+!$uC-jOM z+F0*Opz&beQ=5l^Oyu+`{nHryg2u?{Bk2dS^aSOn5Pd;qQ;%0-G9zKE>@ut*!0HR8 zZo@c}XvFfG3pNIsLbYZXZ$LNr{jw~XPI`9j)9H5bLO5+&gTZqj@AlrT86HOL1^0q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dwp7q z_70phbpCqE3w20$pVpn5uMR|jEh8t_yx&v`%%gwoT*}pN*-V~r3d9a=0`r0+dY=h5 zy*ze_khl;=V3JgqQdgg1^k`z+l$3_&d&p@rP1fi)!rYH5<-J=yVh>RZ3;|*l)1IgTLl)+}$-Xp~e+l z-XGI(_`8<+1U_N+@So}*({7(%HB&P(zc7-}ba7~K(M?Ri+-6~iqw{8I8pVjbQ z!I@OqWypPc{Vm+n-|aOxOIj$R1~yVLO2&k#U`~B_ z?H&-pnss*ZMTxGB)`x+Mb%@$pFlSuJcin?IZD`SVQrhYPq^RmjD_gHvjxp$G>-4O_ zTzQ{ATDAOpY4)ulPHpMg$*-*IC2d_X`+0RjjgrE-3sNteb*pD9ogg0$d0Lfr{a{%4 pv5A}P^tnkxj^Y2`MQ5E&u%Ddr!$-obK=CgC;EZv%uRI=_`ajjVMb!WR diff --git a/spiffworkflow-frontend/public/interstitial/locked.png b/spiffworkflow-frontend/public/interstitial/locked.png new file mode 100644 index 0000000000000000000000000000000000000000..fd39fb0d155874ff51f96917cc8f8600bfac1918 GIT binary patch literal 1898 zcmY*aX;_l!8vX!7%Y|Gj5H-vcTM*F9tz1|XbrdUeOlJ}V5(4=MQBg}PvrZE#n6_wT zi^@1%TIu9z8S|@-hUQkbpt+T6V>+g0Y1={jbIy&N))sy7v>Fg@*$9n08{eMJElyZ0gUnY|zcoK=AgeT^R1QNDXwvdy^<;mCr5s~b^ zX|uB{alx6eU`&WjAuI+a{J7!k=SAr@MlRZek`$>RjxPhKR1z*MF;*nt;AmhxTOh{K zcw7PJN4Nz?ogrs2Y!Z(H#>a!=ghf-yqK3ODA*S-AAd&1uA~p=v&H=!Zhk-P|aQV6M zbFV;)ooFZ{TDwwsoKb%lW*T3hSMePG`HlU1`hU>dXr}a``)=k6OOWV58(4i1nR%IJ zzkbCPRNI0aFRb`^IvfInFaEo&9>jmWoe;LZkMgxZ3QCdaq#l3Gs`n&V@HyNSej~L#! z(mj`T7ylNQI2_J0e~;LNw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@2S%X2eyuQh6E4A()p=dnp;mje?aahaC4c}rRIVc4%WhUVFb)$?#!mE zOZ&(v?n|&{cE?2CM-Mz8o@~A&F`S2)`y{#?_uQPla?m~e%#}Le-?5K6tt8k<;gQz1 zGn7@a!>ptL4ocd7r*KGv(Ogp1B2#BwvL^VSn*B|t&dz)ZP;$aIs08sG-;`{q6sm=U z7Zib=#d+@sw%u%3=s8VOCa&vZSa>RK9eN!{2?H$bZt*~Bb z!hW(ToYq=@{(K(uYzacH|MeTqRREV`tEmU^#?#6TQ87CXu+k3URj&fi;;v@Cn^tj3 ztTm3Y-c`$Y&#h*f0DbV7HDi`_YH|7hznzO6^qoem*>^Xi&|UXs0D<&SS|x>b_`iaS BNCyA_ literal 0 HcmV?d00001 diff --git a/spiffworkflow-frontend/public/interstitial/redirect.png b/spiffworkflow-frontend/public/interstitial/redirect.png new file mode 100644 index 0000000000000000000000000000000000000000..b9de365bce9554d6dcfb2c2c36bbace3a1f60971 GIT binary patch literal 1881 zcmZ8iX*?9_9-eMlGleW8+jQ==8-o~{W6emDY#|~vW~P~8wlg!9j3sLrlBKepqf?3K zr0j)Iwz9W6jx^lpyWwO0000)o=02~ zqPK9|#YKgy@}-syAxKcqU!em4Am08QiV@dO6p~5|dvAt22SWmHKn@B+ew^UNvV4R$dLP77s5fW?9G(HNvoi#{h6EA`XfT38LJ`Pd1QtU; z|0uVgC=5g&lnuqADI^kwOg{*v9(XVZ7H9;PMu8d`7(zQZOk(eKGQmvq z^OW!8eeAiZsxG2yt{@|hKQI4pq>gU8Ns>)Mi?wzKKCUA9kPhDg;gtMQTf#>=5FjJ2 zDT)6{*3cqNw%yz4WFkPp*Ysi1_PJ~D;>5nq&cLkhl}{VLF;~ybPwDIwJTuArgsWit z)BCJ~xlPXRF~)fpHM9Q*dXC1X$ZYw=hIq3)%_S>Z_D03Vjab$kmreQT*Z|I__0I;t zV=WF;Xej#kIKJ}8Y+IHUI~g6M+?q?%HhAY=CSr;`J{^_2G_zxCk*?f!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6MzLsay9boK!Uepc8FrTwATvOQK5llKYrLZ1h3 z{Y33Q)Mz5J8Cng?ygOtr%p>a2CBstNNeAgdw9_t&*Kym(F}kh$V|T9+5K|t~Ta%1V z@3}+$))O&MecO=f#bQtMiA&`tG3P|T&r1sX(w{u`F#qgw;^edt^jLBee-}hKbgTRJ z@@-om9}vY^rc1M;M{G&)=i98ksbw};F+K{2?QMbYw!r98$2zWhMOJpTKdT=aVceMS z1*k5GH}*Iqrgu){Rpc6(B>jwD-zL58_;fP%3UXE2NQ`L^HrVTB?})Jrq?ANOij|gr zWtYx=c;mSu8iULBYn%SZ7dD!YaZHrCf7s_Tm{)Pqt7Ga4%pCnpfc^6)ue>ktxU;nh zI+9Y!zz)yOx?;Uw`>n@JN*ASJ!YmE*;WAu9yr1mud23fOg|>QF&bu!7}x z&MiC89+_d(StPj`iyGZJ8zZkJu2|fS9{X5q$=;T+dEY5|MHSNhG%GQ%`Z;WR$18mg zzSs993l3%MAKU$n1`C4=qLeeeSpNG|JOo56rmO07|S&p?1r L2&wTv!ViA|qFMt2 literal 0 HcmV?d00001 diff --git a/spiffworkflow-frontend/src/components/InstructionsForEndUser.tsx b/spiffworkflow-frontend/src/components/InstructionsForEndUser.tsx index c779e952..2a6cecdb 100644 --- a/spiffworkflow-frontend/src/components/InstructionsForEndUser.tsx +++ b/spiffworkflow-frontend/src/components/InstructionsForEndUser.tsx @@ -6,8 +6,7 @@ export default function InstructionsForEndUser({ task }: any) { if (!task) { return null; } - let instructions = ''; - console.log('I was passed a task: ', task); + let instructions = 'There is no additional instructions or information for this task.'; const { properties } = task; const { instructionsForEndUser } = properties; if (instructionsForEndUser) { diff --git a/spiffworkflow-frontend/src/components/MyCompletedInstances.tsx b/spiffworkflow-frontend/src/components/MyCompletedInstances.tsx index 47042e91..f0f9705e 100644 --- a/spiffworkflow-frontend/src/components/MyCompletedInstances.tsx +++ b/spiffworkflow-frontend/src/components/MyCompletedInstances.tsx @@ -10,6 +10,7 @@ export default function MyCompletedInstances() { perPageOptions={[2, 5, 25]} reportIdentifier="system_report_completed_instances_initiated_by_me" showReports={false} + showActionsColumn /> ); } diff --git a/spiffworkflow-frontend/src/routes/CompletedInstances.tsx b/spiffworkflow-frontend/src/routes/CompletedInstances.tsx index 78f73e92..6d43020d 100644 --- a/spiffworkflow-frontend/src/routes/CompletedInstances.tsx +++ b/spiffworkflow-frontend/src/routes/CompletedInstances.tsx @@ -33,6 +33,7 @@ export default function CompletedInstances() { showReports={false} textToShowIfEmpty="This group has no completed instances at this time." additionalParams={`user_group_identifier=${userGroup}`} + showActionsColumn /> ); @@ -61,6 +62,7 @@ export default function CompletedInstances() { textToShowIfEmpty="You have no completed instances at this time." paginationClassName="with-large-bottom-margin" autoReload + showActionsColumn />

{groupTableComponents()} diff --git a/spiffworkflow-frontend/src/routes/ProcessInstanceList.tsx b/spiffworkflow-frontend/src/routes/ProcessInstanceList.tsx index ca69eb7d..d4677843 100644 --- a/spiffworkflow-frontend/src/routes/ProcessInstanceList.tsx +++ b/spiffworkflow-frontend/src/routes/ProcessInstanceList.tsx @@ -51,7 +51,7 @@ export default function ProcessInstanceList({ variant }: OwnProps) {
{processInstanceBreadcrumbElement()} {processInstanceTitleElement()} - + ); } diff --git a/spiffworkflow-frontend/src/routes/ProcessInterstitial.tsx b/spiffworkflow-frontend/src/routes/ProcessInterstitial.tsx index 0e6b3c63..8d5fb0e8 100644 --- a/spiffworkflow-frontend/src/routes/ProcessInterstitial.tsx +++ b/spiffworkflow-frontend/src/routes/ProcessInterstitial.tsx @@ -14,7 +14,7 @@ import { ProcessInstanceTask } from '../interfaces'; export default function ProcessInterstitial() { const [data, setData] = useState([]); const [lastTask, setLastTask] = useState(null); - const [status, setStatus] = useState('running'); + const [state, setState] = useState('RUNNING'); const params = useParams(); const navigate = useNavigate(); const userTasks = ['User Task', 'Manual Task']; @@ -31,62 +31,74 @@ export default function ProcessInterstitial() { setLastTask(task); }, onclose() { - setStatus('closed'); - console.log('Connection Closed by the Server'); + setState('CLOSED'); }, } ); // eslint-disable-next-line react-hooks/exhaustive-deps }, []); // it is critical to only run this once. + const shouldRedirect = (myTask: ProcessInstanceTask): boolean => { + return myTask && myTask.can_complete && userTasks.includes(myTask.type); + }; + useEffect(() => { // Added this seperate use effect so that the timer interval will be cleared if // we end up redirecting back to the TaskShow page. - if ( - lastTask && - lastTask.can_complete && - userTasks.includes(lastTask.type) - ) { + if (shouldRedirect(lastTask)) { + setState('REDIRECTING'); + lastTask.properties.instructionsForEndUser = ''; const timerId = setInterval(() => { navigate(`/tasks/${lastTask.process_instance_id}/${lastTask.id}`); - }, 1000); + }, 2000); return () => clearInterval(timerId); } return undefined; }, [lastTask, navigate, userTasks]); - const processStatusImage = () => { - if (status !== 'running') { - setStatus(lastTask.state); - } + const getStatus = (): string => { if (!lastTask.can_complete && userTasks.includes(lastTask.type)) { - setStatus('LOCKED'); + return 'LOCKED'; } - switch (status) { - case 'running': + if (state === 'CLOSED') { + return lastTask.state; + } + console.log('The State is: ', state); + return state; + }; + + const getStatusImage = () => { + switch (getStatus()) { + case 'RUNNING': return ( ); - case 'WAITING': - return Waiting ....; - case 'COMPLETED': - return Completed; case 'LOCKED': - return ( - Locked, Waiting on someone else. - ); - default: - return null; + return Locked; + case 'REDIRECTING': + return Redirecting ....; + case 'WAITING': + return Waiting ....; + case 'COMPLETED': + return Completed; } }; + function capitalize(str: string): string { + console.log('Capitalizing: ', str); + if (str && str.length > 0) { + return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase(); + } + return ''; + } + const userMessage = (myTask: ProcessInstanceTask) => { if (!myTask.can_complete && userTasks.includes(myTask.type)) { return
This next task must be completed by a different person.
; } + if (shouldRedirect(myTask)) { + return
Redirecting you to the next task now ...
; + } return (
@@ -96,7 +108,7 @@ export default function ProcessInterstitial() { /** In the event there is no task information and the connection closed, * redirect to the home page. */ - if (status === 'closed' && lastTask === null) { + if (state === 'closed' && lastTask === null) { navigate(`/tasks`); } if (lastTask) { @@ -113,26 +125,28 @@ export default function ProcessInterstitial() { [`Process Instance Id: ${lastTask.process_instance_id}`], ]} /> -

- {processStatusImage()} - {lastTask.process_model_display_name}: {lastTask.process_instance_id} -

- - - - {data && - data.map((d) => ( -
-
- Task: {d.title} -
-
{userMessage(d)}
-
- ))} -
-
+
+ {getStatusImage()} +
+

+ {lastTask.process_model_display_name}:{' '} + {lastTask.process_instance_id} +

+
Status: {capitalize(getStatus())}
+
+
+
+
+ {data.map((d) => ( + + + Task: {d.title} + + + {userMessage(d)} + + + ))} ); }