@@ -27,7 +27,8 @@ const WAITING_ITEM_LABELS = {
2727 'job-inactive' : 'Job waiting to be activated' ,
2828 'user-task-form' : 'User task waiting for completion' ,
2929 'message-subscription' : 'Waiting for message' ,
30- 'boundary-event' : 'Boundary event triggered'
30+ 'boundary-event' : 'Boundary event triggered' ,
31+ 'event-sub-process' : 'Event sub-process triggered'
3132} ;
3233
3334const WAITING_ITEM_FINISHED_LABELS = {
@@ -60,8 +61,8 @@ function getWaitingItemDetails(item) {
6061 return [ ] ;
6162 }
6263
63- // Handle boundary events
64- if ( item . type === 'boundary-event' ) {
64+ // Handle boundary events and event sub-processes
65+ if ( item . type === 'boundary-event' || item . type === 'event-sub-process' ) {
6566 const details = [ ] ;
6667
6768 if ( item . data . elementId ) {
@@ -193,8 +194,8 @@ function getWaitingItemBadges(item) {
193194 badges . push ( { text : item . data . type } ) ;
194195 }
195196
196- // Boundary event badge - show element name or ID
197- if ( item . type === 'boundary-event' && item . data ) {
197+ // Boundary event or event sub-process badge - show element name or ID
198+ if ( ( item . type === 'boundary-event' || item . type === 'event-sub-process' ) && item . data ) {
198199 const label = item . data . elementName || item . data . elementId ;
199200 if ( label ) badges . push ( { text : label } ) ;
200201 }
@@ -415,7 +416,9 @@ function WaitingItem({ item, timestamp, isLast, isFinished, onSelectElement }) {
415416 const badges = getWaitingItemBadges ( item ) ;
416417
417418 const isBoundaryEvent = item . type === 'boundary-event' ;
418- const isClickable = isBoundaryEvent && onSelectElement && item . data ?. elementId ;
419+ const isEventSubProcess = item . type === 'event-sub-process' ;
420+ const isClickable = ( isBoundaryEvent || isEventSubProcess ) && onSelectElement && item . data ?. elementId ;
421+ const hasChildren = isEventSubProcess && item . children ?. length > 0 ;
419422
420423 const isPending = ! isFinished && isPendingItem ( item ) ;
421424
@@ -428,8 +431,10 @@ function WaitingItem({ item, timestamp, isLast, isFinished, onSelectElement }) {
428431 ? < ChevronDown size = { 14 } />
429432 : < ChevronRight size = { 14 } /> ;
430433
434+ const isExpandable = hasDetails || hasChildren ;
435+
431436 const handleExpandToggle = ( ) => {
432- if ( hasDetails ) {
437+ if ( isExpandable ) {
433438 setExpanded ( ! expanded ) ;
434439 }
435440 } ;
@@ -443,17 +448,17 @@ function WaitingItem({ item, timestamp, isLast, isFinished, onSelectElement }) {
443448
444449 const entryClass = [
445450 'execution-log__entry' ,
446- hasDetails ? 'execution-log__entry--expandable' : ''
451+ isExpandable ? 'execution-log__entry--expandable' : ''
447452 ] . filter ( Boolean ) . join ( ' ' ) ;
448453
449454 return (
450455 < li className = { `execution-log__entry-wrapper${ isPending ? ' execution-log__entry-wrapper--active' : '' } ` } >
451456 < span className = { dotClass } />
452457 < div
453458 className = { entryClass }
454- onClick = { hasDetails ? handleExpandToggle : undefined }
459+ onClick = { isExpandable ? handleExpandToggle : undefined }
455460 >
456- { hasDetails && < span className = "execution-log__toggle" > { toggleIcon } </ span > }
461+ { isExpandable && < span className = "execution-log__toggle" > { toggleIcon } </ span > }
457462 < span className = "execution-log__label" > { label } </ span >
458463 { badges . map ( ( badge , i ) => {
459464 const badgeClass = [
@@ -485,6 +490,13 @@ function WaitingItem({ item, timestamp, isLast, isFinished, onSelectElement }) {
485490 ) ) }
486491 </ dl >
487492 ) }
493+ { isEventSubProcess && item . children ?. length > 0 && (
494+ < ol className = "execution-log__children-list" >
495+ { item . children . map ( ( child , i ) => (
496+ < ChildElement key = { i } child = { child } />
497+ ) ) }
498+ </ ol >
499+ ) }
488500 </ li >
489501 ) ;
490502}
0 commit comments