Configuring CMI for Compass state transitions
The Change Management Interface (CMI) performs state transitions on Compass records according to the schema rules for the default transitions for a record type.
For example, the sample UCM schema that is included with Compass defines the following default transitions for
the BaseCMActivity record type:
- Submitted transitions to Assigned
- Assigned transitions to Opened
- Opened transitions to Resolved
- Resolved transitions to Closed
To configure CMI for state transitions, you use the mkcmprovider command to
establish the rules by which a VersionVault
operation is to transition a Compass record
type from one state to another:
- cleartool mkcmprovider ... -context "userdb:userdb,dbset:dbset,queryuri:queryuri,state-transition-rules" ...
where state-transition-rules is of the form:
- cmtrans:[vobOp:operation ;recordType:record-type;startState:record-start-state;endState:record-end-state][ ... ]
- cmtrans specifies one or more record state-transition
rules, where
- vobOp:operation specifies a VersionVault operation.
- For base VersionVault, only checkout is valid. (Specify mkcmprovider -brtype...)
- For UCM, only setactivity and deliver -complete are valid. (Specify mkcmprovider -stream ...)
- recordType:record-type specifies a Compass record type. You can define the same transition for different record types, but there must be a separate definition for each type.
- startState:record-start-state specifies the state of the record that is required before the transition can take place.
- endState:record-end-state specifies the destination state of the record; attaining the destination state can involve multiple actions.
- vobOp:operation specifies a VersionVault operation.
Transitions are not completed if any of the following
conditions is true:
- The schema does not define a default transition for the current state of the record.
- A field in the record lacks a value that is required to complete the transition.
- The record would transition to the startState value.
- More than one vobOp;recordType;startState triplet with the same values is defined.
- One of the four key:value pairs does not exist.
- Compass returns some error.
Examples
Configure a base VersionVault branch (the line breaks are for legibility only)
cleartool mkcmprovider -brtype main
-context "userdb:CQWAN,dbset:CQWAN,
queryuri:http://qwin319:12080/cqweb/oslc/repo/CQWAN/db/CQWAN/query/?rcm.name=Public%20Queries/testquery,
cmtrans:
[vobOp:checkout;recordType:BaseCMActivity;startState:Ready;endState:Complete]
[vobOp:checkout;recordType:BaseCMActivity; startState:Active;endState:Complete]
[vobOp:checkout;recordType:BaseCMActivity;startState:Submitted;endState:Ready]
[vobOp:checkout;recordType:BaseCMActivity;startState:Complete;endState:Submitted]"
CQ_PROV
Configure a UCM stream:
cleartool mkcmprovider -stream trans_proj_dev@/trans_pvob
-options validate:true,activityFormat:TEST%task-id_%stream-name
-context "userdb:CQWAN,dbset:CQWAN,
queryuri:http://qwin319:12080/cqweb/oslc/repo/CQWAN/db/CQWAN/query/?rcm.name=Public%20Queries/testquery,
cmtrans:
[vobOp:set_activity;recordType:BaseCMActivity;startState:Ready;endState:Complete]
[vobOp:deliver_complete;recordType:BaseCMActivity;startState:Active;endState:Complete]
[vobOp:set_activity;recordType:BaseCMActivity;startState:Submitted;endState:Ready]
[vobOp:set_activity;recordType:BaseCMActivity;startState:Complete;endState:Submitted]"
-enable "true" CQ_PROV