cscpiselect (Finding process instances)
Format
cscpiselect [-h]
-user login-user-ID
-pass login-password
-csc HCSC-server-name
-table
{process|activity|link|set|string|numeric|boolean
|message|relation|process_set}
[-detail]
[-separator {comma|tab}]
[{-count|-orderby sort-condition}]
[{-where where-clause
|-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
|executingwait|completedwait|all}]
[-targetcsc HCSC-server-name-to-be-searched]}]
[-encoding encoding-name]
[-canceltimer cancellation-time]
Function
Searches the business process information for the set up HCSC server according to specified conditions, and outputs the information in the CSV or TSV format.
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 the following locations in the uCosminexus Service Platform System Setup and Operation Guide according to the purpose of use:
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 executing SQL statements.
-table {process|activity|link|set|string|numeric|boolean|message|relation|process_set}
Specifies the table to be searched.
When process_set is specified in this option, the process summary information and correlation set information are linked internally to perform the search. Therefore, to specify a process information column or a correlation set information column in the search condition, add P or C in the where clause respectively.
If a value other than process_set is specified in this option, the table name need not be specified in the where clause. For the information that can be specified in the where clause, see the SQL reference documentation for the database in use.
Example of incorrect settings: Table name is specified
P.Status='Completed'
Example of correct settings: Table name is not specified
Status='Completed'
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%'
Example of incorrect settings: Table name is not specified
State='Completed'
Example of correct settings1: Table name is specified
P.State='Completed'
Example of correct settings2: Table name is specified
P.State='Completed' AND
C.ProcessDefinitionName like 'BP%'
-detail
Specify this option to output all the table information.
-separator {comma|tab} ~<<comma>>
Specifies the separator for demarcating the information.
-count
Specifies that only the number of search result rows is output. Use this option to obtain only the number of searched items when the search result contains large amount of data (this corresponds to count(*) in SQL statements).
-orderby sort-condition ~ ((at least 1 character))
Specifies the data sorting condition. This corresponds to the order by clause in SQL statements. The options -orderby and -count cannot be simultaneously specified. For the information that can be specified in the order by clause, see the SQL reference documentation for the database in use. If the -orderby option is not specified, the command assumes that the order by clause is not specified.
-where where-clause ~ ((at least 1 character))
Specifies the where clause. For the information that can be specified in the where clause, see the SQL reference documentation for the database in use.
If the SplitKey string is used for search, the information about the SplitKey string is not output. Also, depending on the value specified in the -table option, you must add the SplitKey string in the view table described in the following table. For details about the view table configuration, see the explanation of the view table information in C.1 Tables for managing the process instance execution log in the uCosminexus Service Platform System Setup and Operation Guide.
Table 5-4 View table that requires the addition of the SplitKey string
Value set in the -table option | View table that requires the addition of the SplitKey string in advance |
---|---|
process | None |
activity | CSCBP_cluster-name_V_ACTIVITY |
link | CSCBP_cluster-name_V_LINK |
set | None |
string | CSCBP_cluster-name_V_STR_VARIABLE |
numeric | CSCBP_cluster-name_V_NUM_VARIABLE |
boolean | CSCBP_cluster-name_V_BOOL_VARIABLE |
message | CSCBP_cluster-name_V_MSG_VARIABLE |
relation | None |
process_set | None |
-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, and then the SQL statement is executed. For the information that can be specified, see the SQL reference documentation for the database in use.
Note that the precautions for using the SplitKey string for a search are the same as those for the -where option.
-processname business-process-definition-name ~ ((at least 1 character))
Specify this option to perform a search using the business process definition name. You can specify this option only when a value other than relation or process_set is specified in the -table option.
-date [inquiry-start-date-and-time],inquiry-end-date-and-time ~ <one-byte numeric characters>
Specify this option to search by the start date and time of a process instance. This option searches the process instances that started from the specified inquiry start date and time to the inquiry end date and time. You can specify this option only when process or activity is specified in the -table option. If the inquiry start date and time is omitted, the search is performed from the process instances that started before the inquiry end date and time. Do not place a space before or after the comma (,) separating the inquiry start date and time from 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.
-status {executing|completed|faulted|error|executingwait|completedwait|all} ~ <<all>>
Specify this option to perform a search using the status of the process instance and activity instance.
You can only specify the arguments executing, completed, faulted, and error when process or activity is specified in the -table option. Also, you can only specify the arguments executingwait and completedwait when activity is specified in the -table option.
The following are examples of incorrect and correct settings for the -table option with an example of specifying the executingwait argument in the -status option:
Example of incorrect settings: activity is not specified in the -table option
-table process -status executingwait
Example of correct settings: activity is specified in the -table option
-table activity -status executingwait
-targetcsc HCSC-server-name-to-be-searched ~ ((1 to 8 characters))
Specifies the name of the HCSC server to be searched. The process instances executed on the specified HCSC server will be searched. Note that the process instances executed in 08-70 or earlier will not be searched.
If this option is omitted, the process instances executed on all the HCSC servers will be searched.
-encoding encoding-name ~ <<Default JavaVM encoding>> ((at least 1 character))
Specifies the name of the encoding used in the input file specified in the -wherefile option. You can specify the following encoding names:
-canceltimer cancellation-time ~ ((0 to 86400)) <<0>>
This option enables you to cancel the processing if the processing does not end even after the specified time has lapsed. Specify the time until the cancellation of processing in seconds. If the -count option is specified, this option is ignored even if specified.
Examples of input
cscpiselect -user admin -pass admin -csc HCSC -table process
cscpiselect -user admin -pass admin -wherefile sql_where.txt -csc HCSC -table process_set
Contents of sql_where.txt
C.CorrelationSetName = 'rentalNumber' AND C.CorrelationSetValue = '100'
cscpiselect -user admin -pass admin -count -wherefile sql_where.txt -csc HCSC -table activity
Contents of sql_where.txt
ProcessDefinitionName like 'BP%'
cscpiselect -user admin -pass admin -csc HCSC -table link
cscpiselect -user admin -pass admin -csc HCSC -table set
cscpiselect -user admin -pass admin -wherefile sql_where.txt -csc HCSC -table string
Contents of sql_where.txt
ProcessID = '11111'
cscpiselect -user admin -pass admin -wherefile sql_where.txt -csc HCSC -table numeric
Contents of sql_where.txt
ProcessID = '11111' AND ProcessDefinitionName like 'BP%'
cscpiselect -user admin -pass admin -where "ProcessID = '11111' AND VariableValue = 0" -csc HCSC -table boolean
cscpiselect -user admin -pass admin -wherefile sql_where.txt -orderby "ProcessID DESC"-csc HCSC -table message
Contents of sql_where.txt
ProcessID = '11111' AND VariableName like '%ABC%'
cscpiselect -user admin -pass admin -csc CSCSrv1 -table process -targetcsc CSCsrv2
cscpiselect -user admin -pass admin -csc CSCSrv1 -table process -date ,20120331235959 -canceltimer 300
Display format
ProcessID,ProcessDefinitionName,ProcessDefinitionVersion,State,StartTime,EndTime,CSCServerName |
ProcessID,ProcessDefinitionName,ProcessDefinitionVersion,State,StartTime,EndTime,ChangeCount,CSCServerName |
Display item | Content | Description |
---|---|---|
ProcessID | PI identifier | Indicates the process instance identifier. |
ProcessDefinitionName | Business process definition name | Indicates the business process definition name. |
ProcessDefinitionVersion | Business process definition version | Indicates the business process definition version. |
State | PI status | Indicates the status of the process instance. |
StartTime | PI start time | Indicates the process instance start time (GMT). The start time is output in the format YYYY/MM/DD hh:mm:ss that is defined as java.text.SimpleDateFormat:
|
EndTime | PI end time | Indicates the process instance end time (GMT). The end time is output in the format YYYY/MM/DD hh:mm:ss that is defined as java.text.SimpleDateFormat:
|
ChangeCount | Update count | Indicates the data update count. |
CSCServerName# | HCSC server name | Indicates the name of the last executed HCSC server. |
ProcessID,ActivityNumber,ActivityDefinitionName,ActivityKind,State,StartTime,EndTime,WaitTime |
ProcessID,ActivityNumber,ProcessDefinitionName, |
Display item | Content | Description |
---|---|---|
ProcessID | PI identifier | Indicates the process instance identifier. |
ActivityNumber | ACI identifier | Indicates the activity instance identification number. This is a unique value in process instances. |
ProcessDefinitionName | Business process definition name | Indicates the business process definition name. |
ProcessDefinitionVersion | Business process definition version | Indicates the business process definition version. |
ActivityDefinitionName | AC definition name | Indicates the activity definition name. |
ActivityKind | AC type | Indicates the activity type. |
ParentNumber | Parent ACI identification number | Indicates the identification number of the parent activity instance. |
ScopeNumber | Subordinate SCI identification number | Indicates the identification number of the subordinate scope instance. |
RepeatNumber | Subordinate RP identification number | Indicates the identification number of the subordinate iteration processing. |
State | ACI status | Indicates the status of the activity instance. |
FirstChildNumber | First child ACI identification number | Indicates the identification number of the first child activity instance. |
LastChildNumber | Last child ACI identification number | Indicates the identification number of the last child activity instance. |
StartTime# | AC start time | Indicates the activity start time (GMT). The start time is output in the format YYYY/MM/DD hh:mm:ss that is defined as java.text.SimpleDateFormat:
|
EndTime# | AC end time | Indicates the activity end time (GMT). The end time is output in the format YYYY/MM/DD hh:mm:ss that is defined as java.text.SimpleDateFormat:
|
WaitTime# | AC wait time | Indicates the activity wait time (GMT). The wait time is output in the format YYYY/MM/DD hh:mm:ss that is defined as java.text.SimpleDateFormat:
|
CSCServerName# | HCSC server name | Indicates the name of the last executed HCSC server. |
ProcessID,LinkDefinitionName,State |
ProcessID,ProcessDefinitionName,ProcessDefinitionVersion, |
Display item | Content | Description |
---|---|---|
ProcessID | PI identifier | Indicates the process instance identifier. |
ProcessDefinitionName | Business process definition name | Indicates the business process definition name. |
ProcessDefinitionVersion | Business process definition version | Indicates the business process definition version. |
LinkDefinitionName | Link definition name | Indicates the link definition name. |
RepeatNumber | Subordinate RP identification number | Indicates the identification number of a subordinate iteration processing. |
State | Link status | Indicates the status of the link (true value). |
ProcessID,CorrelationSetName,CorrelationSetValue |
ProcessID,ProcessDefinitionName,ProcessDefinitionVersion,ScopeDefinitionName, |
Display item | Content | Description |
---|---|---|
ProcessID | PI identifier | Indicates the process instance identifier. |
ProcessDefinitionName | Business process definition name | Indicates the business process definition name. |
ProcessDefinitionVersion | Business process definition version | Indicates the business process definition version. |
ScopeDefinitionName | SC definition name | Indicates the scope definition name. |
ScopeNumber | SCI identification number | Indicates the identification number of the scope instance. |
CorrelationSetName | Correlation set definition name | Indicates the correlation set definition name. |
CorrelationSetValue | Correlation set value | Indicates the correlation set value. This value is converted to a character string, linked, and then stored. |
State | Validity of correlation set | Indicates the validity of a correlation set (true value). |
ProcessID,VariableName,VariableValue |
ProcessID,ProcessDefinitionName,ProcessDefinitionVersion, |
Display item | Content | Description |
---|---|---|
ProcessID | PI identifier | Indicates the process instance identifier. |
ProcessDefinitionName | Business process definition name | Indicates the business process definition name. |
ProcessDefinitionVersion | Business process definition version | Indicates the business process definition version. |
ScopeDefinitionName | SC definition name | Indicates the scope definition name. |
ScopeNumber | SCI identification number | Indicates the identification number of the scope instance. |
VariableName | Variable definition name | Indicates the variable definition name. |
VariableValue | Variable value | Indicates the variable value. |
ProcessID,VariableName,VariableValue |
ProcessID,ProcessDefinitionName,ProcessDefinitionVersion, |
Display item | Content | Description |
---|---|---|
ProcessID | PI identifier | Indicates the process instance identifier. |
ProcessDefinitionName | Business process definition name | Indicates the business process definition name. |
ProcessDefinitionVersion | Business process definition version | Indicates the business process definition version. |
ScopeDefinitionName | SC definition name | Indicates the scope definition name. |
ScopeNumber | SCI identification number | Indicates the identification number of the scope instance. |
VariableName | Variable definition name | Indicates the variable definition name. |
VariableValue | Variable value | Indicates the variable value. |
ProcessID,VariableName,VariableValue |
ProcessID,ProcessDefinitionName,ProcessDefinitionVersion, |
Display item | Content | Description |
---|---|---|
ProcessID | PI identifier | Indicates the process instance identifier. |
ProcessDefinitionName | Business process definition name | Indicates the business process definition name. |
ProcessDefinitionVersion | Business process definition version | Indicates the business process definition version. |
ScopeDefinitionName | SC definition name | Indicates the scope definition name. |
ScopeNumber | SCI identification number | Indicates the identification number of the scope instance. |
VariableName | Variable definition name | Indicates the variable definition name. |
VariableValue | Variable value | Indicates the variable value. |
ProcessID,VariableName, |
ProcessID,ProcessDefinitionName,ProcessDefinitionVersion, |
Display item | Content | Description |
---|---|---|
ProcessID | PI identifier | Indicates the process instance identifier. |
ProcessDefinitionName | Business process definition name | Indicates the business process definition name. |
ProcessDefinitionVersion | Business process definition version | Indicates the business process definition version. |
ScopeDefinitionName | SC definition name | Indicates the scope definition name. |
ScopeNumber | SCI identification number | Indicates the identification number of the scope instance. |
VariableName | Variable definition name | Indicates the variable definition name. |
VariableValue | Variable value | Indicates the variable value. |
MessageID,ProcessID,ActivityNumber,SendOrReceive |
MessageID,ProcessID,ActivityNumber,SendOrReceive,AsynchronousMessagingID |
Display item | Content | Description |
---|---|---|
MessageID | MSG identifier | Indicates the message identifier. |
ProcessID | PI identifier | Indicates the process instance identifier. |
ActivityNumber | ACI identification number | Indicates the identification number of the activity instance. |
SendOrReceive | Send and receive flag | Indicates the send and receive flag for the message. |
AsynchronousMessagingID | ID | Indicates the ID of an asynchronous message that uses Reliable Messaging. |
(10) Count display
KEOS52029-I: row count is number-of-rows |
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