Hitachi

uCosminexus Service Platform Setup and Operation Guide


6.1.2 Searching the execution log of a process instance

You can use screen, command or SQL to search the execution log of a process instance. For SQL, search with the RD area name.

Regarding the execution log of a process instance, the following table describes Search Criteria that can be specified with screen and command:

Search Criteria

Search with screen

(execution management page)

Search with command

(cscpiselect command)

Reference location

Start date of process instance

Y

Y

"(2) Search with start time as a criteria"

"(6) Search with a combination of start time and status as a criteria"

State of process instance

(search by specifying "Executing", "Completed", "Occurrence of an error", or "End fault")

Y

Y

"(3) Search with status as a criteria"

"(6) Search with a combination of start time and status as a criteria"

State of activity instance

N

Y

--

Correlation set information (search by specifying the correlation set that uniquely specifies process instance)

Y

Y

"(4) Search with correlation set as a criteria"

Identifier of process instance

Y

Y

"(5) Search with the process instance identifier as a criteria"

Process overview information (search performed by using correlation set, search performed without using correlation set)

N

Y

--

Activity information

N

Y

--

Link information

N

Y

--

Variable information (string variable information, numeric variable information, boolean variable information, message variable information)

N

Y

--

Message associated information

N

Y

--

Information of all the

execution logs in the execution log information table

N

Y

--

Number of lines for search result

N

Y

--

Business process Definition Name

N

Y

"(1) Search with business process Definition Name as a criteria"

Name of the executed HCSC server

N

Y

"(7) Search with name of executed HCSC server as a criteria"

Legend:

Y: Search can be performed.

N: Search cannot be performed.

For details on log management page, see "4.6 Tracking Page" in "Service Platform Reference Guide".

Also, you can output the search result of command to CSV file. For details, see "cscpiselect (Finding process instances)" in "Service Platform Reference Guide".

Hereafter, search of the execution log of process instance is explained with search examples.

Organization of this subsection

(1) Search with business process Definition Name as a criteria

(a) Using screen to search execution log

On the screen, as there is no item with which you can search the execution log of process instance with business process definition name, all the execution logs are displayed, from this search the appropriate business process definition name. The procedure is as follows:

  1. Click the [Search by Date/ State] tab.

  2. Select the [Without specification] radio button of the start date of process instance.

  3. Check all the check boxes for the state of process instance (Executing, Completed, Occurrence of an error, or End fault).

  4. Select the sort method of search result in Search Criteria.

  5. Click the [Search] button.

    From all the execution logs displayed on the search result field, search the appropriate business process Definition Name in [Business process Definition Name].

(b) Using command to search execution log

The procedure to search the execution log of process instance by business process Definition Name is as follows:

  1. Determine the HCSC server to be accessed.

  2. Execute the following command to perform the search.

    • When directly specifying the where clause

      cscpiselect -user <Login user ID> -pass <Login password> -csc <HCSC server name> -where <where clause># -table process -orderby <Sort condition>
    Note#

    Specify the SQL condition for the column name ProcessDefinitionName.

    • When using a file in which the where clause is specified

      cscpiselect -user <Login user ID> -pass <Login password> -csc <HCSC server name> -wherefile <file name in which the where clause is specified># -table process -orderby <Sort condition> -encoding <Encoding name>
    Note #

    Specify the SQL condition for the column name ProcessDefinitionName.

    • When directly specifying the business process Definition Name

      cscpiselect -user <Login user ID> -pass <Login password> -csc <HCSC server name> -processname <Business process Definition Name> -table process -orderby <Sort condition>
Example: Enter the command with the following conditions to search the process instance execution log:
  • Business process Definition Name: Hello business process

  • HCSC server to be accessed: HCSC

  • Sort condition: Ascending order of start time

Command
  • When the -wherefile option is specified

    cscpiselect -user <Login user ID> -pass <Login password> -csc HCSC -wherefile sql_where.txt -table process -orderby "StartTime ASC"

    For sql_where.txt

    ProcessDefinitionName = 'Hello business process'
  • When the -processname option is specified

    cscpiselect -user <Login user ID> -pass <Login password> -csc HCSC -processname Hello business process -table process -orderby "StartTime ASC"
Output result

[Figure]

For details on the cscpiselect command, see "cscpiselect (Finding process instances)" in "Service Platform Reference Guide".

(2) Search with start time as a criteria

(a) Using screen to search execution log

The procedure to search the execution log of process instance by using start date is as follows:

  1. Click the [Search by Date/ State] tab.

  2. Select the [With specification] radio button of the start date of process instance.

  3. For the start time search range, enter the year and select the month, date, hour, minute, and second from the drop-down lists.

  4. For the search result sort condition, select the appropriate radio button.

  5. Click the [Search] button.

    The search result is displayed in the search result field.

(b) Using command to search execution log

The process to search execution log of process instance using start date is as follows:

Important note

The start date and time to be specified for search differs as per the hour system used in the option specified in the command.

  • When specified in the file in which the -where option or the where clause of the -wherefile option is specified: Greenwich mean time (GMT)

  • When specified in the -date option: Default time zone

  1. Determine the HCSC server to be accessed.

  2. Execute the following command to perform the search.

    • When directly specifying the where clause

      cscpiselect -user <Login user ID> -pass <Login password> -csc <HCSC server name> -where <where clause># -table process -orderby <Sort-condition>
    Note #

    Specify the SQL condition for the column name StartTime.

    • When using a file in which the where clause is specified

      cscpiselect -user <Login user ID> -pass <Login password> -csc <HCSC server name> -wherefile <file-name in which the where clause is specified># -table process -orderby <Sort-condition> -encoding <Encoding name>
    Note #

    Specify the SQL condition for the column name StartTime.

    • When directly specifying a start time range:

      cscpiselect -user <Login user ID> -pass <Login password> -csc <HCSC server name> -date <inquiry-start-date-and-time>#,<inquiry-end-date-and-time> -table process -orderby <Sort-condition>
    Note #

    Inquiry start date/time can be omitted.

(Example) Enter the command using the following conditions to search the process instance execution logs:
  • Business process definition name: Hello business-process

  • Start date and time range: Before 2011/12/28 14:59:59 (Greenwich mean time)

  • HCSC server to be accessed: HCSC

  • Sort condition: Ascending order by start time

Command
  • When the -wherefile option is specified:

    cscpiselect -user <Login user ID> -pass <Login password> -csc HCSC -wherefile sql_where.txt -table process -orderby "StartTime ASC"

    For contents of sql_where.txt

    ProcessDefinitionName = 'Hello business process' AND StartTime <= '2011-12-28 14:59:59'
  • When the -date option is specified:

    cscpiselect -user <Login user ID> -pass <Login password> -csc HCSC -processname Hello business process-date ,20111228235959# -table process -orderby "StartTime ASC"
Note #

By default, Japan time is used for time zone in -date option.

Output result

[Figure]

Example: Enter the command using the following conditions to search the process instance execution logs:
  • Business process Definition Name: Hello business process

  • Start date and time range: 2011/12/28 10:00:00 - 2011/12/29 14:59:59 ((Greenwich Mean Time)

  • HCSC server to be accessed: HCSC

  • Sort condition: Ascending order by start time

Command
  • When the -wherefile option is specified:

    cscpiselect -user <Login user ID> -pass <Login password> -csc HCSC -wherefile sql_where.txt -table process -orderby "StartTime ASC"

    For contents of sql_where.txt

    ProcessDefinitionName = 'Hello business process' AND StartTime BETWEEN '2011-12-28 10:00:00' AND '2011-12-29 14:59:59'
  • When the -date option is specified:

    cscpiselect -user <Login user ID> -pass <Login password> -csc HCSC -processname Hello business process-date 20111228190000# ,20111228235959# -table process -orderby "StartTime ASC"
Note #

By default, Japan time is used for time zone in -date option.

Output result

[Figure]

For details on cscpiselect command, See "cscpiselect (Finding process instances)" in "Service Platform Reference Guide".

(3) Search with status as a criteria

(a) Using screen to search execution log

The process to search execution log of process instance by status is as follows:

  1. Click the Search by [Date/Time or Status] tab.

  2. Select the check box for the status of the process instance that is to be searched (Executing, Completed, occurrence of error, or Faulted).

    If you select multiple check boxes, the status that satisfies one of the conditions is searched.

  3. For the search result sort condition, select the appropriate radio button.

  4. Click the [Search] button.

    The search result is displayed in the Search Results field.

(b) Using command to search execution log

The procedure to search execution logs of process instance by status is as follows:

  1. Determine the HCSC server to be accessed.

  2. Execute the following command to perform the search.

    • When directly specifying the where clause

      cscpiselect -user <Login user ID> -pass <Login password> -csc <HCSC server name> -where <where clause># -table process -orderby <Sort-condition>
    Note #

    Specify the SQL condition for the column name State.

    • When using a file in which the where clause is specified

      cscpiselect -user <Login user ID> -pass <Login password> -csc <HCSC server name> -wherefile <file name in which the where clause is specified># -table process -orderby <Sort condition> -encoding <Encoding name>
    Note #

    Specify the SQL condition for the column name State.

    • When directly specifying the status:

      cscpiselect -user <Login user ID> -pass <Login password> -csc <HCSC server name> -status {executing|completed|faulted|error|executingwait|completedwait|all}# -table process -orderby <Sort-condition>
    Note #

    Specify one of these items.

Example: Enter the command using the following conditions to search the process instance execution logs:
  • Business process definition name: Hello business process

  • Status of process instance: Occurrence of error

  • HCSC server to be accessed: HCSC

  • Sort condition: Ascending order by start time

Command
  • When the -wherefile option is specified

    cscpiselect -user <Login user ID> -pass <Login password> -csc HCSC -wherefile sql_where.txt -table process -orderby "StartTime ASC"

    For contents of sql_where.txt

    ProcessDefinitionName = 'Hello business process' AND State = 'Error'
  • When the -status option is specified

    cscpiselect -user <Login user ID> -pass <Login password> -csc HCSC -processname Hello business process -status error -table process -orderby "StartTime ASC"
Output result

[Figure]

For details on cscpiselect command, see "cscpiselect (Finding process instances)" in "Service Platform Reference Guide".

(4) Search with correlation set as a criteria

(a) Using screen to search execution log

The process to search execution log of process instance by correlation set is as follows:

  1. Click the [Search by Correlation Set] tab

  2. Enter the correlation set definition name and correlation set value. Make sure that you enter values in both fields.

  3. Click the [Search] button.

    The search result is displayed in the Search Results field.

How to specify the correlation set value

You can configure the correlation set by connecting one or multiple components included in message. If the correlation set is made persistent, treat one or more specified components as a correlation set value. The correlation set value is configured according to the following rules:

  • When there is only one component

    The component value is used as it is.

  • When there are multiple components

    Each component value is linked by ">".

(Example)

If the correlation set definition name "ABC" consists of two components X and Y, and their values are "100" and "300" respectively, then the correlation set value would be "100>300".

  • When a component value contains @

    Specify two consecutive "@" marks.

(Example)

If the correlation set definition name "ABC" contains the component X and its value is "@200", then the correlation set value would be "@@200".

  • When a component value contains ">"

    Replace it with "@G".

(Example)

If the correlation set definition name "ABC" contains the component X and its value is "30>", then the correlation set value would be "30@G".

(b) Using command to search execution log

The procedure to search execution log of process instance by correlation set is as follows:

  1. Determine the HCSC server to be accessed.

  2. Execute the following command to perform the search.

    • When directly specifying the where clause

      cscpiselect -user <Login user ID> -pass <Login password> -csc <HCSC server name> -where <where clause># -table process_set
    Note#

    If you conduct the search by correlation set definition name, specify the SQL condition for the column name CorrelationSetName. If you conduct the search by correlation set value, specify the SQL condition for the column name CorrelationSetValue.

    • When using a file in which the where clause is specified

      cscpiselect -user <Login user ID> -pass <Login password> -csc <HCSC> -wherefile <file name in which the where clause is specified># -table process_set -encoding <Encoding name>
    Note#

    If you conduct the search by correlation set definition name, specify the SQL condition for the column name CorrelationSetName. If you conduct the search by correlation set value, specify the SQL condition for the column name CorrelationSetValue.

Example: Enter the command using the following conditions to search the process instance execution logs:
  • Business process definition name: commodity arrangement

  • Correlation set definition name: set

  • Correlation set value: HDD compatible 60 inch Plasma TV

  • HCSC server to be accessed: HCSC

  • Sort condition: Ascending-order-of-start-time

Command
cscpiselect -user <Login user ID> -pass <Login password> -csc HCSC -wherefile sql_where.txt -table process_set -orderby "StartTime ASC"
For the contents of sql_where.txt
C.ProcessDefinitionName = 'Commodity arrangement' AND C.CorrelationSetName = 'set' AND C.CorrelationSetValue = 'HDD compatible 60 inch Plasma TV'
Output result

[Figure]

Example: Enter the command using the following conditions to search the process instance execution logs:
  • Business process definition name: Commodity arrangement

  • Correlation set definition name: set2

  • Correlation set value: HDD compatible 60-inch Plasma TV > 1( HDD compatible 60 inch Plasma TV)

  • HCSC server to be accessed: HCSC

  • Sort condition: Ascending-order-of-start-time

Command
cscpiselect -user <Login user ID> -pass <Login password> -csc HCSC -wherefile sql_where.txt -table process_set -orderby "StartTime ASC"
For the contents of sql_where.txt
C.ProcessDefinitionName = 'Commodity arrangement' AND C.CorrelationSetName = 'set2' AND C.CorrelationSetValue = ' HDD-compatible-60-inch-Plasma-TV>1'
Output result

[Figure]

For details on cscpiselect command, see "cscpiselect (Finding process instances)" in "Service Platform Reference Guide".

(5) Search with the process instance identifier as a criteria

(a) Using screen to search execution log

The process to search execution log of process instance by process instance identifier is as follows:

  1. Click the [Search by Identifier] tab.

  2. Enter the process instance identifier.

    Enter the process instance identifier acquired from a command or a log.

  3. Click the [Search] button.

    The search result is displayed in the Search Results field.

(b) Using command to search execution log

The process to search execution logs of process instance by process instance identifier.

  1. Determine the HCSC server to be accessed.

  2. Execute the following command to search:

    • When directly specifying the where clause

      cscpiselect -user <Login user ID> -pass <Login password> -csc <HCSC server name> -where <where clause># -table process -orderby <Sort condition>
    Note#

    Specify the SQL condition for the column name ProcessID.

    • When using a file in which the where clause is specified

      cscpiselect -user <Login user ID> -pass <Login password> -csc <HCSC server name> -wherefile <file name in which the where clause is specified># -table process -orderby <Sort condition> -encoding <Encoding name>
    Note#

    Specify the SQL condition for the column name ProcessID.

Example: Enter the command using the following conditions to search the process instance execution logs:
  • Business process definition name: Hello business process

  • Process instance identifier: J2EEServer_010210084218_Hello business process _1237946140968_3843192274_138

  • HCSC server to be accessed: HCSC

  • Sort condition: Ascending order of start time

Command
cscpiselect -user <Login user ID> -pass <Login password> -csc HCSC -wherefile sql_where.txt -table process -orderby "StartTime ASC"
For the contents of sql_where.txt
ProcessDefinitionName = 'Hello business process ' AND ProcessID = 'J2EEServer_192168116131_Hello business process_1325125384512_4896451771_139'
Output result

[Figure]

For details on cscpiselect command, see "cscpiselect (Finding process instances)" in "Service Platform Reference Guide".

(6) Search with a combination of start time and status as a criteria

(a) Using screen to search execution log

You can specify a combination of start time and status as the search condition.

The process to search execution log of process instance by using combination of start time and status is as follows:

  1. Click the [Search by Date/Time or Status] tab.

  2. Select [With specification] radio button of start time of process instance.

  3. For the start time search range, enter the year and select the month, date, hour, minute, and second from the drop-down lists.

  4. Select the check box for the status of the process instance that is to be searched (Executing, Completed, Error occurred, or Faulted).

    If you select multiple check boxes, the status that satisfies one of the conditions is searched.

  5. For the search result sort condition, select the appropriate radio button.

  6. Click the [Search] button.

    The search result is displayed in the Search Results field.

(b) Using command to search execution log

The process to search execution log of process instance by using combination of start time and status is as follows:

Important note

For Start time and date when you are searching, hours method used differs due to option specified in command.

  • When specified in the file in which the -where option or the where clause of the -wherefile option is specified: Greenwich Mean Time (GMT)

  • When specified in the -date option: Default time zone

  1. Determine the HCSC server to be accessed.

  2. Execute the following command to perform the search.

    • When directly specifying the where clause

      cscpiselect -user <Login user ID> -pass <Login password> -csc <HCSC server name> -where <where clause># -table process -orderby <Sort-condition>
    Note#

    Specify the SQL condition for the column names StartTime and State.

    • When using a file in which the where clause is specified

      cscpiselect -user <Login user ID> -pass <Login password> -csc <HCSC server name> -wherefile <file name in which the where clause is specified># -table process -orderby <Sort-condition> -encoding <Encoding name>
    Note#

    Specify the SQL condition for the column names StartTime and State

    • When directly specifying the start time range and status:

      cscpiselect -user <Login user ID> -pass <Login password> -csc <HCSC server name> -date <inquiry-start-date-and-time>#1,<inquiry end date and time> -status {executing|completed|faulted|error|executingwait|completedwait|all}#2 -table process -orderby <sort-condition>
    Note #1

    Inquiry start date/time can be omitted.

    Note #2

    Specify one of these items.

(Example) Enter the command using the following conditions to search the process instance execution logs:
  • Business process definition name: Hello Business Process

  • Start date and time range: 2011/12/27 15:00:00 - 2011/12/28 10:51:00 (Greenwich mean time)

  • Status: Occurrence of error

  • HCSC server to be accessed: HCSC

  • Sort condition: Ascending order by start time

Command
  • When the -wherefile option is specified

    cscpiselect -user <Login user ID> -pass <Login password> -csc HCSC -wherefile sql_where.txt -table process -orderby "StartTime ASC"

    For the contents of sql_where.txt

    ProcessDefinitionName = 'Hello business process' AND StartTime BETWEEN '2011-12-27 15:00:00' AND '2011-12-28 10:51:00' AND State = 'Error'
  • When the -date option and -status option are specified

    cscpiselect -user <Login user ID> -pass <Login password> -csc HCSC -processname Hello business process -date 20111228000000#,20111228195100# -status error -table process -orderby "StartTime ASC"
Note #

By default, Japan time is used for time zone in -date option.

Output result

[Figure]

For details on cscpiselect command, see "cscpiselect (Finding process instances)" in "Service Platform Reference Guide".

(7) Search with name of executed HCSC server as a criteria

The procedure to search execution logs of process instance using name of executed HCSC server as condition is as follows:

  1. Determine the HCSC server to be accessed.

  2. Execute the following command to perform the search.

    cscpiselect -user <Login user ID> -pass <Login password> -csc <HCSC server name> -table process -targetcsc <HCSC server name targeted to search>
(Example) Enter the command using the following conditions to search the process instance execution logs:
  • HCSC server to be accessed: CSCSrv1

  • Executed HCSC server: CSCSrv2

Command
cscpiselect -csc CSCSrv1 -table process -targetcsc CSCSrv2

For details on cscpiselect command, see "cscpiselect (Finding process instances)" in "Service Platform Reference Guide".

(8) Searching all execution logs of process instance

The procedure to search all execution logs of process instance is as follows: Further, you can search all execution logs of process instance only using command.

  1. Determine the HCSC server to be accessed.

  2. Execute the following command to perform the search.

    cscpiselect -user <Login user ID> -pass <Login password> -csc <HCSC server name> -table process
(Example) Enter the command using the following conditions to search the process instance execution logs:
  • HCSC server to be accessed: HCSC

Command
cscpiselect -user <Login user ID> -pass <Login password> -csc HCSC -table process
Output result

[Figure]

For details on cscpiselect command, see "cscpiselect (Finding process instances)" in "Service Platform Reference Guide".

(9) Search with RD area name as a criteria

If you specify "IN ('<RD area name>')" in SELECT statement of SQL, you can search in RD area unit. When you want to confirm data in RD area unit, check whether deletion of RD area unit is executed correctly or not.

(Example) CSCBP_<Cluster name>_in RD area of PROCESS table (RDA11, RDA21 and RDA31) , search how much data is stored.
SELECT count(*) FROM CSCBP_<Cluster name>_PROCESS IN ('RDA11,RDA21,RDA31') WITHOUT LOCK NOWAIT;

(10) Output of all execution logs to a CSV file

You can use the process instance execution logs as maintenance information by searching them periodically and saving all information as historical data in one CSV file HCSC server unit. The procedure to output execution logs of process instance to CSV file is as follows:

  1. Determine the HCSC server to be accessed.

  2. Execute the following command to perform the search.

    cscpiselect -user <Login user ID> -pass <Login password> -csc <HCSC server name> -detail -table {process|activity|link|set|string|numeric|boolean|message|relation}#
    Note #

    Specify one of these items.

(Example) Enter the command using the following conditions to output the process instance execution logs to CSV files in batch mode:
  • Store all information in HCSC server unit in CSV file.

  • HCSC server to be accessed: HCSC

Command
cscpiselect -user <Login user ID> -pass <Login password> -csc HCSC -detail -table process > yyyymmdd_process.csv
cscpiselect -user <Login user ID> -pass <Login password> -csc HCSC -detail -table activity > yyyymmdd_activity.csv
cscpiselect -user <Login user ID> -pass <Login password> -csc HCSC -detail -table link > yyyymmdd_link.csv
cscpiselect -user <Login user ID> -pass <Login password> -csc HCSC -detail -table set > yyyymmdd_set.csv
cscpiselect -user <Login user ID> -pass <Login password> -csc HCSC -detail -table string > yyyymmdd_string.csv
cscpiselect -user <Login user ID> -pass <Login password> -csc HCSC -detail -table numeric > yyyymmdd_numeric.csv
cscpiselect -user <Login user ID> -pass <Login password> -csc HCSC -detail -table boolean > yyyymmdd_boolean.csv
cscpiselect -user <Login user ID> -pass <Login password> -csc HCSC -detail -table message > yyyymmdd_message.csv
cscpiselect -user <Login user ID> -pass <Login password> -csc HCSC -detail -table relation> yyyymmdd_relation.csv

For details on cscpiselect command, see "cscpiselect (Finding process instances)" in "Service Platform Reference Guide".

(11) See search result by screen

Search result is displayed as total cases and list in search result field. List displays up to 20 cases at one time.

Also, as per time difference at the time of search, the search result, total number of cases and number of cases to be displayed may differ. For example, the total number of searched items might be 13, whereas the number of items displayed might be 60. In this case you must search again, because even if the number of items displayed exceeds 20, the Next button is disabled, making it impossible to display more than 20 items.

Also, after clicking [Back], [Next] button of search result list, number of cases of process instance may change. For example, if you click [Next] button when total number of cases are 45 and number of cases to be displayed are 21-40, total number of cases may become 10. In this case, 1-10 cases are displayed.