@@ -44,6 +44,7 @@ interface StoredWorkflowMeta {
4444 prompt_on_run ?: boolean ;
4545 required ?: boolean ;
4646 } > ;
47+ close_browser_on_complete ?: boolean ;
4748 start_position ?: {
4849 x ?: number ;
4950 y ?: number ;
@@ -450,6 +451,7 @@ export function buildTaskPayload(
450451 required : variable . promptOnRun === true && variable . required === true ,
451452 } ) )
452453 . filter ( ( variable ) => variable . name ) ,
454+ close_browser_on_complete : config . closeBrowserOnComplete === true ,
453455 start_position : specialPositions . start ,
454456 end_position : specialPositions . end ,
455457 } ,
@@ -514,13 +516,14 @@ export function mapTaskDetailToEditorState(detail: RpaTaskDetailDto): EditorStat
514516 runMode : detail . task . run_mode === 'parallel' ? 'parallel' : 'sequential' ,
515517 globalVariables : storedGlobalVariables ,
516518 retryCount : detail . task . retry_count ?? 3 ,
517- retryInterval : detail . task . retry_interval ?? 5 ,
518- timeout : detail . task . timeout ?? 300 ,
519- concurrency : detail . task . concurrency ?? 1 ,
520- stopOnError : detail . task . stop_on_error ?? true ,
521- notifyOnComplete : detail . task . notify_on_complete ?? false ,
522- notifyOnError : detail . task . notify_on_error ?? true ,
523- } ;
519+ retryInterval : detail . task . retry_interval ?? 5 ,
520+ timeout : detail . task . timeout ?? 300 ,
521+ concurrency : detail . task . concurrency ?? 1 ,
522+ stopOnError : detail . task . stop_on_error ?? true ,
523+ closeBrowserOnComplete : storedWorkflowMeta ?. close_browser_on_complete === true ,
524+ notifyOnComplete : detail . task . notify_on_complete ?? false ,
525+ notifyOnError : detail . task . notify_on_error ?? true ,
526+ } ;
524527
525528 return {
526529 config,
@@ -610,6 +613,7 @@ export function mapPortableTaskToEditorState(document: PortableRpaTaskDocument):
610613 timeout : document . task . timeout ?? 300 ,
611614 concurrency : document . task . concurrency ?? 1 ,
612615 stopOnError : document . task . stop_on_error ?? true ,
616+ closeBrowserOnComplete : storedWorkflowMeta ?. close_browser_on_complete === true ,
613617 notifyOnComplete : document . task . notify_on_complete ?? false ,
614618 notifyOnError : document . task . notify_on_error ?? true ,
615619 } ;
0 commit comments