B4A.BASE.JOBI.PROCESS-RESULTS

Summary

Object type
JOBI
Object Folder
PACKAGES/BEST4AUTOMIC/B4A.BASE/SOURCE/RUN
Title
Parses the results of b4A tool run and find out about how many steps were successful, failed and has been ignored.
Archive Key 1
-
Archive Key 2
-
Created
WRITER/B4A am: 2022-03-24 08:01:41
Last Modified
WRITER/B4A am: 2024-01-09 10:09:54 14 x
Last Used
-

Description

The include will parse the report to find details about the result of the last executed phase of the b4A module. The numbers of successful, failed and ignored steps will be published.

Parameter

.

Input

Output

&B4AB_SUCCESS_O#
number of successfully executed steps
&B4AB_FAILED_O#
number of failed steps
&B4AB_IGNORED_O#
number of ignored/skipped steps

Example

    :include B4A.BASE.JOBI.PROCESS_RESULTS

Process

!success: 63, failed: 0, ignored: 0

:set &found# = 'N'
:set &hnd# = prep_process_report( JOBS, &$RESTART_RUNID#, REP, "*success: *, failed: *, ignored: *", "COL=DELIMITER,DELIMITER=*,*" )
:process &hnd#
:  set &found# = 'Y'
:  set &success# = get_process_line( &hnd#, 1 )
:  set &failed# = get_process_line( &hnd#, 2 )
:  set &ignored# = get_process_line( &hnd#, 3 )
:  set &colon# = str_find_reverse( &success#, ":" )
:  set &colon# = &colon# + 2
:  set &success# = str_cut( &success#, &colon# )
:  set &colon# = str_find( &failed#, ":" )
:  set &colon# = &colon# + 2
:  set &failed# = str_cut( &failed#, &colon# )
:  set &colon# = str_find( &ignored#, ":" )
:  set &colon# = &colon# + 2
:  set &ignored# = str_cut( &ignored#, &colon# )
:endprocess
:close_process &hnd#

:if &found# = 'N'
:  set &hnd# = prep_process_report( JOBS, &$RESTART_RUNID#, REP, "*erfolgreich: *, fehlgeschlagen: *, ignoriert: *", "COL=DELIMITER,DELIMITER=*,*" )
:  process &hnd#
:    set &success# = get_process_line( &hnd#, 1 )
:    set &failed# = get_process_line( &hnd#, 2 )
:    set &ignored# = get_process_line( &hnd#, 3 )
:    set &colon# = str_find_reverse( &success#, ":" )
:    set &colon# = &colon# + 2
:    set &success# = str_cut( &success#, &colon# )
:    set &colon# = str_find( &failed#, ":" )
:    set &colon# = &colon# + 2
:    set &failed# = str_cut( &failed#, &colon# )
:    set &colon# = str_find( &ignored#, ":" )
:    set &colon# = &colon# + 2
:    set &ignored# = str_cut( &ignored#, &colon# )
:  endprocess
:  close_process &hnd#
:endif

:p "Success: '&success#'"
:p "Failed : '&failed#'"
:p "Ignored: '&ignored#'"

:publish &success#, B4AB_SUCCESS_O#, WORKFLOW
:publish &failed#, B4AB_FAILED_O#, WORKFLOW
:publish &ignored#, B4AB_IGNORED_O#, WORKFLOW

Variable Publications

Found 3 variable publications (WORKFLOW)

Zeilennummer Scriptzeile
45 :publish &success#, B4AB_SUCCESS_O#, WORKFLOW
46 :publish &failed#, B4AB_FAILED_O#, WORKFLOW
47 :publish &ignored#, B4AB_IGNORED_O#, WORKFLOW