SBM ModScript Reference → Programming SBM ModScript → Object Types → VarRecord → VarRecord FinishTransition() Method
(SBM On-Premise/PaaS only) Finishes a transition on an item after StartTransition() has been invoked and field values have been set.
bool FinishTransition( trans [, bool stealLock ] [, signedUserID, signedUserPwd ] )
Parameter | Type | Description |
---|---|---|
trans |
Variant |
Can be transition ID, 0 (will use default Update transition for item), transition UUID, or transition internal name. |
stealLock |
bool |
Optional. If true, any item lock on this item will be stolen by this transition. If it was locked, the user who had the item locked (in transition) will not be able to complete their transition. Does not guarantee that the transition succeeds, as scripts can steal locks from each other. |
signedUserID |
string |
Optional. Provides the user name portion of the signature if the transition requires a user's signature. |
signedUserPwd |
string |
Optional, required if signedUserID is provided. Provides the password portion of the signature if the transition requires a user's signature. |
Type | Description |
---|---|
bool |
Returns true if transition completed successfully. If false, use Shell.GetLastErrorMessage() for more information. |
SBM ModScript version: 11.3.
// StartTransition was called previously if ( !varRecord.FinishTransition( transitionId )){ // write an error to Active Diagnostics ADLog.Message( __FILE__, __LINE__, ADLogLevelConstants.ERROR, "FinishTransition failed:\n" + Shell.GetLastErrorMessage() ); ExitScript(); }
Example with signature provided:
var finished = varRecord.FinishTransition( transId, true, "userName", "userPass" );
Copyright © 2007–2019 Micro Focus or one of its affiliates. All rights reserved.