Interface IWorkflowConfig
public interface IWorkflowConfig
- Author:
- Michal Dobisek, Polarion Software
-
Method Summary
Modifier and TypeMethodDescriptioncreateAction
(String id, String name) Creates new action instance.createOperation
(String name, Map<String, String> arguments) Creates new operation instance, which can be insterted intoIAction
.createTransition
(String from, String to, String actionId) Creates new transition instance.Returns the action with given name.Returns id of the initial action used for workflow, ornull
if initial action is not defined.Returns the initial status used for workflow.Returns the prototype for which this workflow configuration is targeted.getTransitionAction
(String sourceStatusId, String targetStatusId) Returns the transition action.Returns the transitions defined for this configuration.serializeToXML
(IContributionsManager contribs) Verifies this configuration and then serializes it into the XML Document.void
setInitialActionId
(String actionId) void
setInitialStatus
(String status) void
verify
(IContributionsManager contribs) Verifies the consistency of the workflow and also checks that all referenced contributions do actually exist.
-
Method Details
-
getPrototype
Returns the prototype for which this workflow configuration is targeted.- Since:
- 3.8.1
-
getInitialStatus
Returns the initial status used for workflow. Returns an empty string if the initial status is not defined. -
setInitialStatus
-
getInitialActionId
Returns id of the initial action used for workflow, ornull
if initial action is not defined.- Since:
- 3.1.2
-
setInitialActionId
- Since:
- 3.1.2
-
getTransitions
Returns the transitions defined for this configuration.- Returns:
Set
ofITransition
s in this configuration. Modifications to the returned set do apply to this congiguration.- See Also:
-
getAction
Returns the action with given name.- Parameters:
actionId
-- Returns:
- the action with given name or
null
if no such action exists.
-
getTransitionAction
@Nullable IAction getTransitionAction(@Nullable String sourceStatusId, @NotNull String targetStatusId) Returns the transition action.- Since:
- 3.9.0
-
getActions
- Returns:
- The live collection of existing
IAction
s. Modifications to the collection apply to this configuration.
-
getActionsMap
- Returns:
- The live map of actionId ->
IAction
. Modifications to the map apply to this configuration.
-
verify
Verifies the consistency of the workflow and also checks that all referenced contributions do actually exist.- Parameters:
contribs
- Notnull
, used to check validity of used functions, conditions and validators.- Throws:
VerificationException
-
serializeToXML
@NotNull Document serializeToXML(@NotNull IContributionsManager contribs) throws VerificationException Verifies this configuration and then serializes it into the XML Document.- Parameters:
contribs
- Notnull
, needed for the verification.- Returns:
- a
Document
representing the workflow configuration - Throws:
VerificationException
-
createTransition
@NotNull ITransition createTransition(@NotNull String from, @NotNull String to, @NotNull String actionId) Creates new transition instance. The resulting instance is NOT inserted into this configuration.- Parameters:
from
- Initial status idto
- Final status idactionId
- Id of action to perform.- Returns:
- New transition instance.
- See Also:
-
createAction
Creates new action instance. The resulting instance is NOT inserted into this configuration.- Parameters:
id
- Action ID.name
- User friendly action name.- Returns:
- New action instance.
-
createOperation
Creates new operation instance, which can be insterted intoIAction
.- Parameters:
name
- Operation name (must be a name of defined operation - not checked).arguments
- Map of String name -> String value- Returns:
- The new instance.
-