Hitachi

uCosminexus Service Platform Reference Guide


cscpidelete (Deleting the process instance execution log)

Organization of this page

Format

cscpidelete [-h]
 -user login-user-ID
 -pass login-password
 -csc HCSC-server-name
 {-where where-clause
 |-idlist name-of- file-containing-list-of-process-instance-identifiers
 |-wherefile name-of-file-containing-where-clause
 |[-processname business-process-definition-name]
 [-date [inquiry-start-date-and-time],inquiry-end-date-and-time]
 [-status {executing|completed|faulted|error|all}]
 |-force}
 [-encoding encoding-name]
 [-canceltimer cancellation-time]

Function

For an HCSC server that is already set up, this command deletes the process instance execution logs according to specified conditions.

By setting up default values for mandatory options, such as the login user ID, in the HCSC-Manager command definition file, you can omit the specification of these values in this command.

For details on how to use this command, see 6.1.4 Deleting process instance execution logs in the Service Platform Setup and Operation Guide.

Arguments

-h

Displays the usage of commands. When you specify this option, all other options are ignored even if specified.

-user login-user-ID ~ <one-byte alphanumeric characters and underscores (_)> ((1 to 16 characters))

Specifies the user ID that is used to log in to HCSC-Manager.

-pass login-password ~ <one-byte alphanumeric characters and underscores (_)> ((1 to 16 characters))

Specifies the password that is used to log in to HCSC-Manager.

-csc HCSC-server-name ~ <one-byte alphanumeric characters and underscores (_)> ((1 to 8 characters))

Specifies the name of the HCSC server that executes SQL statements.

-where where-clause ~ ((at least 1 character))

Specifies the where clause to search for the process summary information for the process instance to be deleted. For details on the information that can be specified in the where clause, see the SQL reference documentation for the database in use.

Note that you cannot specify a table name and add a comment line in the where clause. The following are the examples of correct and incorrect settings for the where clause:

Examples of settings 1
 Example of incorrect settings: Table name is specified
 P.Status='Completed'
 Example of correct settings: Table name is not specified
 Status='Completed'
Examples of settings 2
 Example of incorrect settings: Comment line is added
 Status='Completed' AND
 # ProcessDefinitionName like 'BP%'
 Example of correct settings: Comment line is not added
 Status='Completed' AND
 ProcessDefinitionName like 'BP%'

-idlist name-of-file-containing-list-of-process-instance-identifiers ~ ((1 to 200 bytes))

Specifies the name of the file that contains the list of process instance identifiers. Specify the list of process instance identifiers using a linefeed as a delimiter (\r\n or \n). Specify the file path as an absolute or relative path. The leading and trailing spaces on each new line are deleted. The example of settings is as follows.

Example of settings

To delete the business processes with Process IDs 11111, 44444, and 77777 (\n indicates the linefeed code)

11111\n
44444\n
77777\n

-wherefile name-of-file-containing-where-clause ~ ((1 to 200 bytes))

Specifies the name of the file containing the where clause using an absolute or relative path. The linefeed code in the specified file is replaced with spaces to search for the process summary information, and then the corresponding process instance execution log is deleted.

-processname business-process-definition-name ~ ((at least 1 character))

Deletes the process instance of the specified business process definition name.

-date [inquiry-start-date-and-time],inquiry-end-date-and-time ~ <one-byte numeric characters>

Deletes the process instances started from the specified inquiry start date and time to the inquiry end date and time. If the inquiry start date and time is omitted, the process instances started before the inquiry end date and time will be deleted. Do not place a space before or after the commas (,) separating the inquiry start date and time and the inquiry end date and time. Specify the inquiry start date and time and the inquiry end date and time in the format shown below. Make sure that you use the default time zone to specify the dates and times.

  • Inquiry start date and time: Specify the value in the YYYYMMDDhhmmss format.

  • Inquiry end date and time: Specify the value in the YYYYMMDDhhmmss format.

    YYYY: Year (1970 [Figure]YYYY)

    MM: Month (01 [Figure]MM [Figure]12)

    DD: Date (01 [Figure]DD [Figure]31)

    hh: Hours (00 [Figure]hh [Figure]23)

    mm: Minutes (00 [Figure]mm [Figure]59)

    ss: Seconds (00 [Figure]ss [Figure]59)

-status {executing|completed|faulted|error|all} ~ <<completed>>

Deletes the process instances with the specified status. If the options -where, -idlist, -wherefile, -status, and -force are all omitted, completed is enabled in this option.

  • executing

    The log information for the process instances with the executing status will be deleted.

  • completed

    The log information for the process instances with the completed status will be deleted.

  • faulted

    The log information for the process instances with the faulted status will be deleted.

  • error

    The log information for the process instances with the error status will be deleted.

  • all

    The log information for the process instances with all the above statuses will be deleted.

-force

Deletes the information about all the process instances from the database.

-encoding encoding-name ~ ((at least 1 character)) <<Default Java VM encoding>>

Specifies the encoding used in the input file specified in the options -wherefile or -idlist. You can specify the following encoding names:

  • UTF-8

  • US-ASCII

  • ISO-8859-1

  • Encoding names supported by Java VM

-canceltimer cancellation-time ~ ((0 to 86400)) <<0>>

This option enables you to cancel the processing if the processing does not end even after the lapse of a specified time. Specify the time until the cancellation of processing in seconds.

  • If a value other than 0 is specified

    After the lapse of the specified time, the processing will be cancelled and the resources will be released even if records matching the conditions are left behind. The command ends normally with the return value 10. In this case, a warning message is output to the message log and the console.

  • If 0 is specified

    The processing is not cancelled until all the records matching the conditions are processed.

Examples of input

(1) To delete the entire information
cscpidelete -user admin -pass admin -csc HCSC -force
(2) To delete all the processes with the Completed status
cscpidelete -user admin -pass admin -where "State='Completed'"
(3) To delete the processes with Process IDs 11111, 22222, and 33333
  • When the process IDs are specified in a file containing the where clause

    cscpidelete -user admin -pass admin -wherefile delete_where.txt -csc HCSC

    Contents of delete_where.txt

    ProcessID='11111' OR ProcessID='22222' OR ProcessID='33333'

  • When the process IDs are specified in a file containing a list of process instance identifiers separated by linefeeds

    cscpidelete -user admin -pass admin -idlist idlist.txt -csc HCSC

    Contents of idlist.txt

    11111

    22222

    33333

(4) To delete all the processes with the Completed status; however, cancel the deletion of the remaining processes if the deletion processing does not end even after the lapse of 300 seconds.
cscpiselect -user admin -pass admin -where "State = 'Completed'" -canceltimer 300

Return values

Return value

Meaning

0

The command terminated normally.

1

The command terminated abnormally.

2

A communication timeout occurred.

3

An exclusion error occurred.

9

An error occurred when checking the execution permission.

10

Processing will be cancelled because the specified cancellation time elapsed.

Notes