uCosminexus Service Platform, Setup and Operation Guide
When you resend requests or delete process instances whose execution has been tested, you can one by one delete the process instances execution log that is no longer needed.
Also, since the process instance execution log is added daily, unless the information is deleted periodically, a database capacity shortage may occur. Therefore, the administrator must periodically delete process instance execution log information from the execution log information table in the database. During daily operations, you can normally delete execution log information in batch mode.
You can use screen method, commands method or database creation utility (pdload) to delete process instance execution logs.
The procedure to delete a process instance execution log one by one using screen is as follows:
The procedure to delete process instance execution log in batch mode using screen is as follows:
Here it is explained about deleting execution log using cscpidelete command. For details on cscpidelete command, see "cscpidelete (Deleting process instance execution logs) " in "Service Platform Reference Guide".
The procedure to delete process instance execution log individually using command is as follows:
cscpidelete -user <Login user ID> -pass <Login password> -csc <HCSC server name> -where <where clause># |
cscpidelete -user <Login user ID> -pass <Login password> -csc <HCSC server name > -wherefile < file name in which the where clause is specified># |
cscpidelete -user < Login user ID > -pass < Login password > -csc <HCSC server name > -idlist < file name in which a list of ID is specified> |
cscpidelete -user < Login user ID > -pass < Login password > -csc HCSC -wherefile delete_where.txt |
ProcessID = 'J2EEServer_010209010042_XXXPurchaseRegisterService_1142479241203_760331597_2115' |
cscpidelete -user < Login user ID > -pass < Login password > -csc HCSC -idlist delete_id_list.txt |
J2EEServer_010209010042_XXXPurchaseRegisterService_1142479241203_760331597_2115 |
The procedure to specify business process definition name of process instance using command and deleting execution log in batch mode is as follows:
cscpidelete -user < Login user ID > -pass < Login password > -csc <HCSC server name > -where <where clause># |
cscpidelete -user < Login user ID > -pass < Login password > -csc <HCSC server name > -wherefile < file name in which the where clause is specified># |
cscpidelete -user < Login user ID > -pass < Login password > -csc <HCSC server name > -processname < Business process definition name > |
cscpidelete -user < Login user ID > -pass < Login password > -csc HCSC -wherefile delete_where.txt |
ProcessDefinitionName=' Hello business process ' |
cscpidelete -user < Login user ID > -pass < Login password > -csc HCSC -processname Hello business process |
The procedure to specify start date and time of process instance using command and deleting execution log in batch mode is as follows:
cscpidelete -user < Login user ID > -pass <Login password > -csc <HCSC server name> -where <where clause># |
cscpidelete -user < Login user ID > -pass <Login password > -csc <HCSC server name > -wherefile < file name in which the where clause is specified ># |
cscpidelete -user <Login user ID> -pass <Login password > -csc <HCSC server name > -date < inquiry start date and time>#,< inquiry end date and time > |
cscpidelete -user <Login user ID > -pass <Login password > -csc HCSC -wherefile delete_where.txt |
StartTime <= '2008-10-09 14:59:59' |
cscpidelete -user < Login user ID > -pass < Login password > -csc HCSC -date ,20081009235959# |
cscpidelete -user < Login user ID > -pass <Login password> -csc HCSC -wherefile delete_where.txt |
StartTime BETWEEN '2008-10-08 15:00:00' AND '2008-10-09 14:59:59' |
cscpidelete -user < Login user ID > -pass < Login password > -csc HCSC -date 20081009000000#,20081009235959# |
The procedure to use commands to specify the status of the process instances and delete execution logs in batch mode is as follows:
cscpidelete -user < Login user ID > -pass < Login password > -csc <HCSCserver name> -where <where clause># |
cscpidelete -user < Login user ID > -pass <Login password > -csc <HCSC server name> -wherefile < file name in which the where clause is specified># |
cscpidelete -user < Login user ID > -pass <Login password > -csc <HCSC server name> -status {executing | completed | faulted | error | all}#
|
cscpidelete -user < Login user ID > -pass <Login password > -csc HCSC -wherefile delete_where.txt |
State='Executing' |
cscpidelete -user < Login user ID > -pass <Login password > -csc HCSC -status executing |
The procedure to specify the after combining business process definition name of process instances, start date and time, and status using command, and deleting execution logs in a batch mode is as follows:
cscpidelete -user <Login user ID> -pass < Login password> -csc <HCSC server name> -where <where clause># |
cscpidelete -user < Login user ID> -pass <Login password > -csc <HCSC server name > -wherefile < file name in which the where clause is specified># |
cscpidelete -user <Login user ID> -pass <Login password> -csc <HCSC server name> -processname < Business process definition name > -date < inquiry start date and time>#1,< inquiry end date and time > -status {executing | completed | faulted | error | all}#2
|
cscpidelete -user <Login user ID> -pass <Login password> -csc HCSC -wherefile delete_where.txt |
ProcessDefinitionName='Hello business process' AND StartTime <= '2008-10-09 14:59:59' AND State='Executing' |
cscpidelete -user <Login user ID> -pass <Login password> -csc HCSC -processname Hello business process -date ,20081009235959# -status executing |
The procedure to use commands to delete all process instance execution logs in batch mode is as follows:
cscpidelete -user <Login user ID> -pass <Login password> -csc <HCSC server name> -force |
cscpidelete -user < Login user ID> -pass < Login password > -csc HCSC -force |
If the quantity of process instance execution logs that you want to delete is large, long period will be required for completing all the deletion processes. You can limit time required for batch deletion process so that deletion process will not affect request process.
You can specify the elapsed time till the deletion process is stopped in seconds in-canceltimer option of cscpidelete command. With this you can stop the deletion process if the time after commit is exceeds the specified time and the deletion process after this point will not be executed.
cscpidelete -csc CSCSrv1 -date ,20050331235959 -canceltimer 600 |
For details on cscpidelete command, see "cscpidelete (Deleting process instance execution logs) " in " Service Platform Reference Guide".
In the environment that uses table split function, you can delete execution log of business process RD area (Month) wise using HiRDB function. When you use table split function, in order to execute cyclic allocation of RD area, you must periodically delete execution logs which are added daily.
However, when you are using RD area wise deletion of execution log, data with status "Executing (Executing)" or "Error (Error)"is also deleted. Check in advance if the data that you do not want to delete is included using following method:
SELECT count(*) FROM CSCBP_<Cluster name>_PROCESS IN ('<RD area name 1 which you want to delete>,< RD area name 2 which you want to delete >,・) WHERE State IN ('Executing','Error') WITHOUT LOCK NOWAIT
|
Store the data that you do not want to delete in advance. The storage process and deletion process of execution log is as follows:
Prerequisites when storing data are as follows:
Storage process of data is as follows:
SELECT ProcessID FROM CSCBP_<Cluster name>_PROCESS
IN ('<RD area name 1 which you want to delete>,<RD area name 2 which you want to delete>,・)
WHERE State IN ('Executing', 'Error')
WITHOUT LOCK NOWAIT;
|
SELECT * FROM CSCBP_<Cluster name>_PROCESS
IN ('<RD area name 1 which you want to delete>,<RD area name 2 which you want to delete>,・)
WHERE ProcessID = <Process instance identifier> WITHOUT LOCK NOWAIT;
SELECT * FROM CSCBP_<Cluster name>_ACTIVITY
IN ('<RD area name 1 which you want to delete>,<RD area name 2 which you want to delete>,・)
WHERE ProcessID = <Process instance identifier> WITHOUT LOCK NOWAIT;
SELECT * FROM CSCBP_<Cluster name>_LINK
IN ('<RD area name 1 which you want to delete>,<RD area name 2 which you want to delete>,・)
WHERE ProcessID = <Process instance identifier> WITHOUT LOCK NOWAIT;
SELECT * FROM CSCBP_<Cluster name>_CORRELATIONSET
IN ('<RD area name 1 which you want to delete>,<RD area name 2 which you want to delete>,・)
WHERE ProcessID = <Process instance identifier> WITHOUT LOCK NOWAIT;
SELECT * FROM CSCBP_<Cluster name>_STR_VARIABLE
IN ('<RD area name 1 which you want to delete>,<RD area name 2 which you want to delete>,・)
WHERE ProcessID = <Process instance identifier> WITHOUT LOCK NOWAIT;
SELECT * FROM CSCBP_<Cluster name>_NUM_VARIABLE
IN ('<RD area name 1 which you want to delete>,<RD area name 2 which you want to delete>,・)
WHERE ProcessID = <Process instance identifier> WITHOUT LOCK NOWAIT;
SELECT * FROM CSCBP_<Cluster name>_BOOL_VARIABLE
IN ('<RD area name 1 which you want to delete>,<RD area name 2 which you want to delete>,・)
WHERE ProcessID = <Process instance identifier> WITHOUT LOCK NOWAIT;
SELECT * FROM CSCBP_<Cluster name>_MSG_VARIABLE
IN ('<RD area name 1 which you want to delete>,<RD area name 2 which you want to delete>,・)
WHERE ProcessID = <Process instance identifier> WITHOUT LOCK NOWAIT;
SELECT * FROM CSCBP_<Cluster name>_MSG_RELATION
IN ('<RD area name 1 which you want to delete>,<RD area name 2 which you want to delete>,・)
WHERE ProcessID = <Process instance identifier> WITHOUT LOCK NOWAIT;
|
INSERT INTO CSCBP_<Cluster name>_PROCESS (ProcessID,ProcessDefinitionName,ProcessDefinitionVersion,State,ChangeCount, StartTime,EndTime,CSCServerName,SplitKey) VALUES (<Data except for data in SplitKey example acquired in (i)>, '01'); INSERT INTO CSCBP_<Cluster name>_ACTIVITY (ProcessID,ActivityNumber,ActivityDefinitionName,ActivityKind,ParentNumber, ScopeNumber,RepeatNumber,State,FirstChildNumber,LastChildNumber,StartTime,EndTime, WaitTime,SplitKey) VALUES (<Data except for data in SplitKey example acquired in (i)>, '01'); INSERT INTO CSCBP_<Cluster name>_LINK (ProcessID,LinkDefinitionName,RepeatNumber,State,SplitKey) VALUES (<Data except for data in SplitKey example acquired in (i)>, '01'); INSERT INTO CSCBP_<Cluster name>_CORRELATIONSET (ProcessID,ProcessDefinitionName,ProcessDefinitionVersion,ScopeDefinitionName, ScopeNumber,CorrelationSetName,CorrelationSetValue,State,SplitKey) VALUES (<Data except for data in SplitKey example acquired in (i)>, '01'); INSERT INTO CSCBP_<Cluster name>_STR_VARIABLE (ProcessID,ScopeNumber,VariableName,VariableValue,SplitKey) VALUES (<Data except for data in SplitKey example acquired in (i)>, '01'); INSERT INTO CSCBP_<Cluster name>_NUM_VARIABLE (ProcessID,ScopeNumber,VariableName,VariableValue,SplitKey) VALUES (<Data except for data in SplitKey example acquired in (i)>, '01'); INSERT INTO CSCBP_<Cluster name>_BOOL_VARIABLE (ProcessID,ScopeNumber,VariableName,VariableValue,SplitKey) VALUES (<Data except for data in SplitKey example acquired in (i)>, '01'); INSERT INTO CSCBP_<Cluster name>_MSG_VARIABLE (ProcessID,ScopeNumber,VariableName,VariableValue,SplitKey) VALUES (<Data except for data in SplitKey example acquired in (i)>, '01'); INSERT INTO CSCBP_<Cluster name>_MSG_RELATION (MessageID,ProcessID,ActivityNumber,SendOrReceive, AsynchronousMessagingID,SplitKey) VALUES (<Data except for data in SplitKey example acquired in (i)>, '01'); |
Note #
The deletion procedure per RD area is as follows:
pdhold -r <RD area name> |
pdrorg -k unld -t <Table name>#1 -r <RD area name for data> <Control information file name>#2 |
unload < path of file that unloads data of each table> |
unload <Backend server name>:< path of file that unloads data of each table> |
pdload -d CSCBP_<Cluster name>_PROCESS <Control information file name> pdload -d CSCBP_<Cluster name>_ACTIVITY <Control information file name> pdload -d CSCBP_<Cluster name>_LINK <Control information file name> pdload -d CSCBP_<Cluster name>_CORRELATIONSET <Control information file name> pdload -d CSCBP_<Cluster name>_STR_VARIABLE <Control information file name> pdload -d CSCBP_<Cluster name>_NUM_VARIABLE <Control information file name> pdload -d CSCBP_<Cluster name>_BOOL_VARIABLE <Control information file name> pdload -d CSCBP_<Cluster name>_MSG_VARIABLE <Control information file name> pdload -d CSCBP_<Cluster name>_MSG_RELATION <Control information file name> |
source <RD area name for data> <Data file path> |
source < RD area name for data > <Backend server name>:< Data file path > |
pdrels -r <RD area name> |
Issue following SQL and confirm if RD area units are deleted correctly with this procedure:
SELECT count(*) FROM CSCBP_<Cluster name>_PROCESS IN ('<RD area name 1 which you want to delete>,<RD area name 2 which you want to delete>,・) WITHOUT LOCK NOWAIT;
|
All Rights Reserved. Copyright (C) 2015, Hitachi, Ltd.