SBM AppScript Reference → Introduction to SBM AppScript → SBM AppScript Contexts → Transition-Related Contexts → Script Features by Transition Method
Transitions can be executed manually by users in the browser interface, automatically by transition actions such as triggers or sub-tasking, by special transitions such as post item or Create Subtask transitions, or in response to external programs. When a script runs because a transition was executed, certain browser-based features may not be available to the script depending on how the transition was executed, as shown in the following table.
Transition Method |
Shell object contains browser properties? |
Redirect† |
Write HTML† |
Reject transition by writing to Shell.RedoMessage |
---|---|---|---|---|
Standard transition by user |
Yes |
Yes |
Pre-Transition only |
Post-Transition, Pre-State, and Post-State only |
Post Item or Publish Problem transition |
Yes |
No |
Pre-Transition only |
Post-Transition, Pre-State, and Post-State only |
Copy transition |
Yes |
Yes |
Pre-Transition only |
Post-Transition, Pre-State, and Post-State only |
Mass updates |
Yes |
No |
Pre-Transition only |
Post-Transition, Pre-State, and Post-State only** |
Actions (Transition Trigger, Subtasks, etc.) |
N/A |
N/A |
N/A |
Post-Transition, Pre-State, and Post-State only*** |
API Call, External Post Transition, or E-mail Submission |
N/A |
N/A |
N/A |
Post-Transition, Pre-State, and Post-State only |
† When Shell.Rerun is True, a script may not redirect or write HTML.
** Mass updates enable users to transition multiple items at once. Each item runs its own Pre-Transition, Post-Transition, Pre-State, and Post-State script and can be rejected individually based on script logic. Each error message returned in Shell.RedoMessage is logged in the Windows Event Viewer and all messages are displayed together on the mass update results page. The first item receives special treatment, however. If any of its scripts write to Shell.RedoMessage, the form is redisplayed with that error message, and the entire mass update fails. Redirect is not available because each item's script might specify a different redirect location and because mass updates depend on a built-in redirect.
*** Transitions that execute based on actions, such as Triggers or subtasking, behave similarly to mass updates. Depending on project and workflow settings, a transition may execute a batch of other transitions, each of which may run a script. If none of the scripts reject their items by writing to Shell.RedoMessage, the Last Transition Sequence displays information to the user about the executed batch of transition. If some transitions are rejected, all Shell.RedoMessage values are displayed on an error page in the browser and each is sent to the Event Viewer.
Copyright © 2007–2018 Serena Software, Inc., a Micro Focus company. All rights reserved.