@StableMinor(version="12.5", sinceVersion="4.2") public interface IWorkflowManager
Modifier and Type | Field and Description |
---|---|
static String |
ASSIGNED_TO_KEEP_SAME_VALUE
The value used by some methods to indicate that the current
assigned to value must be kept.
|
Modifier and Type | Method and Description |
---|---|
boolean |
autoArchivePublishedContent(ContentLocale contentLocale,
ITransaction transaction)
Used for the automatic content archiving process.
|
boolean |
contentMayBePublished(SessionConfig sessionConfig,
ContentLocale contentLocale,
ITransaction transaction)
Indicates if a content version may be published according to its
workflow state.
|
boolean |
contentMayBePublished(SessionConfig sessionConfig,
String itemId,
String serviceInstanceId,
String sourceId,
ITransaction transaction)
Deprecated.
Since 4.2.0, replaced by
contentMayBePublished(SessionConfig, ContentLocale, ITransaction) . |
void |
createNewContentWorkflowMetaData(SessionConfig sessionConfig,
ContentLocale contentLocale,
String assignedTo,
ITransaction transaction)
Creates a new content workflow metadata for a content locale.
|
void |
createNewContentWorkflowMetaData(SessionConfig sessionConfig,
String itemId,
String serviceInstanceId,
String sourceId,
String assignedTo,
ITransaction transaction)
Deprecated.
Since 4.2.0, replaced by
createNewContentWorkflowMetaData(SessionConfig, ContentLocale, String, ITransaction) . |
void |
deleteAllContentWorkflowMetaData(SessionConfig sessionConfig,
String serviceInstanceId,
ITransaction transaction)
Deletes all the workflow metadata that is assocated to a specified
service instance.
|
void |
deleteContentWorkflowMetaData(SessionConfig sessionConfig,
ContentLocale contentLocale,
ITransaction transaction)
Deletes the content workflow metadata of the given content locale.
|
void |
deleteContentWorkflowMetaData(SessionConfig sessionConfig,
String itemId,
String serviceInstanceId,
String sourceId,
ITransaction transaction)
Deprecated.
Since 4.2.0 replaced by
deleteContentWorkflowMetaData(SessionConfig, ContentLocale, ITransaction) . |
void |
destroyServiceInstanceWorkflow(SessionConfig sessionConfig,
String serviceInstanceId,
ITransaction transaction)
Destroys the service instance workflow, so that the service instance can be correctly removed.
|
void |
executeAction(SessionConfig sessionConfig,
ContentLocale contentLocale,
String performedTransitionId,
String newAssignedTo,
ITransaction transaction)
Executes an action on a content's workflow.
|
void |
executeAction(SessionConfig sessionConfig,
String itemId,
String serviceInstanceId,
String sourceId,
String performedTransitionId,
String newAssignedTo,
ITransaction transaction)
Deprecated.
Since 4.2.0, replaced by
executeAction(SessionConfig, ContentLocale, String, String, ITransaction) . |
Collection<WorkflowStateConfig> |
getAccessibleStates(SessionConfig sessionConfig,
String serviceInstanceId,
boolean includeScopeAll,
boolean includeScopeAssignedTo,
ITransaction transaction)
Deprecated.
Since 6.0.2, replaced by
getAccessibleStates(SessionConfig, String, EnumSet, ITransaction) |
Collection<WorkflowStateConfig> |
getAccessibleStates(SessionConfig sessionConfig,
String serviceInstanceId,
EnumSet<StateScope> scopes,
ITransaction transaction)
Returns a collection of workflow's accessible states.
|
Collection<WorkflowTransitionConfig> |
getAccessibleTransitions(SessionConfig sessionConfig,
ContentLocale contentLocale,
ITransaction transaction)
Returns the transitions that are accessible by the
sessionConfig 's user for a specified contentLocale. |
Collection<WorkflowTransitionConfig> |
getAccessibleTransitions(SessionConfig sessionConfig,
String itemId,
String serviceInstanceId,
String sourceId,
ITransaction transaction)
Deprecated.
|
Collection<WorkflowTransitionConfig> |
getAccessibleTransitions(SessionConfig sessionConfig,
WorkflowStateConfig state,
String serviceInstanceId,
boolean includeScopeAssignedTo,
ITransaction transaction)
Deprecated.
Since 6.0.2, replaced by
getAccessibleTransitions(SessionConfig, WorkflowStateConfig, String, EnumSet, ITransaction) |
Collection<WorkflowTransitionConfig> |
getAccessibleTransitions(SessionConfig sessionConfig,
WorkflowStateConfig state,
String serviceInstanceId,
EnumSet<TransitionScope> scopes,
ITransaction transaction)
Returns the transitions that are accessible by the
sessionConfig 's user, originating from a specific workflow
state in the specified service instance. |
Collection<WorkflowConfig> |
getAllWorkflows(SessionConfig sessionConfig,
ITransaction transaction)
Returns all registered workflows.
|
ContentWorkflowMetaData |
getContentWorkflowMetaData(SessionConfig sessionConfig,
ContentLocale contentLocale,
ITransaction transaction)
Returns the content workflow metadata for a content locale.
|
ContentWorkflowMetaData |
getContentWorkflowMetaData(SessionConfig sessionConfig,
String itemId,
String serviceInstanceId,
String sourceId,
ITransaction transaction)
Deprecated.
Since 4.2.0, replaced by
getContentWorkflowMetaData(SessionConfig, ContentLocale, ITransaction) . |
Collection<String> |
getPossibleAssignedTo(SessionConfig sessionConfig,
String serviceInstanceId,
WorkflowStateConfig workflowState,
ITransaction transaction)
Returns the possible assignedTo values for a workflow state.
|
Collection<String> |
getPossibleAssignedToForAction(SessionConfig sessionConfig,
String itemId,
String serviceInstanceId,
String sourceId,
String transitionId,
ITransaction transaction)
Deprecated.
Since 4.2.0, replaced by
getPossibleAssignedTo(SessionConfig, String, WorkflowStateConfig, ITransaction) . |
WorkflowConfig |
getServiceInstanceWorkflow(SessionConfig sessionConfig,
String serviceInstanceId,
ITransaction transaction)
Returns the workflow of a service instance.
|
WorkflowStateConfig |
getState(SessionConfig sessionConfig,
String workflowId,
String stateId,
ITransaction transaction)
Returns a workflow state.
|
WorkflowTransitionConfig |
getTransition(SessionConfig sessionConfig,
String workflowId,
String transitionId,
ITransaction transaction)
Returns a workflow transition.
|
List<WorkflowTransitionConfig> |
getTransitionsByStateId(SessionConfig sessionConfig,
String workflowId,
String stateId,
ITransaction transaction)
Returns the transitions for a workflow state.
|
WorkflowConfig |
getWorkflow(SessionConfig sessionConfig,
String workflowId,
ITransaction transaction)
Returns a workflow.
|
Collection<WorkflowPermission> |
getWorkflowPermissions(SessionConfig sessionConfig,
String serviceInstanceId,
ITransaction transaction)
Returns the permissions set for a workflow in a service instance.
|
boolean |
hasEditPermission(SessionConfig sessionConfig,
ContentLocale contentLocale,
ITransaction transaction)
Returns true if the sessionConfig's user has edit permission to the
specified content, according to the workflow's definition, state and
assigned to.
|
boolean |
hasEditPermission(SessionConfig sessionConfig,
String itemId,
String serviceInstanceId,
String sourceId,
ITransaction transaction)
Deprecated.
Since 4.2.0, replaced by
hasEditPermission(SessionConfig, ContentLocale, ITransaction) . |
void |
register(SessionConfig sessionConfig,
String workflowConfigPath,
ITransaction transaction)
Register a workflow.
|
void |
setServiceInstanceWorkflow(SessionConfig sessionConfig,
String serviceInstanceId,
String workflowId,
ITransaction transaction)
Sets the workflow to be used in a service instance.
|
void |
setWorkflowPermissions(SessionConfig sessionConfig,
String serviceInstanceId,
Collection<WorkflowPermission> permissions,
ITransaction transaction)
Updates the workflow permissions in a service instance.
|
void |
unregister(SessionConfig sessionConfig,
String workflowId,
ITransaction transaction)
Removes a workflow from the register.
|
void |
updateRegister(SessionConfig sessionConfig,
String workflowId,
ITransaction transaction)
Updates the register of a workflow.
|
static final String ASSIGNED_TO_KEEP_SAME_VALUE
void register(SessionConfig sessionConfig, String workflowConfigPath, ITransaction transaction) throws PortalException
sessionConfig
- the user session information.workflowConfigPath
- the path, relative to the definition directory,
to the directory with the workflow's definition.transaction
- the transaction for persistence access.PortalException
void updateRegister(SessionConfig sessionConfig, String workflowId, ITransaction transaction) throws PortalException
sessionConfig
- the user session information.workflowId
- the workflow id.transaction
- the transaction for persistence access.PortalException
void unregister(SessionConfig sessionConfig, String workflowId, ITransaction transaction) throws PortalException
sessionConfig
- the user session information.workflowId
- the workflow's identifier.transaction
- the transaction for persistence access.PortalException
WorkflowConfig getWorkflow(SessionConfig sessionConfig, String workflowId, ITransaction transaction) throws PortalException
sessionConfig
- the user session information.workflowId
- the workflow's identifier.transaction
- the transaction for persistence access.PortalException
WorkflowStateConfig getState(SessionConfig sessionConfig, String workflowId, String stateId, ITransaction transaction) throws PortalException
sessionConfig
- the user session information.workflowId
- the identifier of the state's workflow.stateId
- the state's identifier.transaction
- the transaction for persistence access.PortalException
WorkflowTransitionConfig getTransition(SessionConfig sessionConfig, String workflowId, String transitionId, ITransaction transaction) throws PortalException
sessionConfig
- the user session information.workflowId
- the identifier of the state's workflow.transitionId
- the transition's identifier.transaction
- the transaction for persistence access.PortalException
List<WorkflowTransitionConfig> getTransitionsByStateId(SessionConfig sessionConfig, String workflowId, String stateId, ITransaction transaction) throws PortalException
sessionConfig
- the user session information.workflowId
- the identifier of the state's workflow.stateId
- the state's identifier.transaction
- the transaction for persistence access.PortalException
@Deprecated Collection<WorkflowTransitionConfig> getAccessibleTransitions(SessionConfig sessionConfig, String itemId, String serviceInstanceId, String sourceId, ITransaction transaction) throws PortalException
getAccessibleTransitions(SessionConfig, ContentLocale, ITransaction)
and getAccessibleTransitions(SessionConfig, WorkflowStateConfig, String, boolean, ITransaction)
.sessionConfig
's user for a specified content.sessionConfig
- the user session information.itemId
- the content's itemId.serviceInstanceId
- the content's service instance identifier.sourceId
- the content's source identifier.transaction
- the transaction for persistence access.PortalException
Collection<WorkflowTransitionConfig> getAccessibleTransitions(SessionConfig sessionConfig, ContentLocale contentLocale, ITransaction transaction) throws PortalException
sessionConfig
's user for a specified contentLocale.sessionConfig
- the user session information.contentLocale
- the contentLocale.transaction
- the transaction for persistence access.PortalException
@Deprecated Collection<WorkflowTransitionConfig> getAccessibleTransitions(SessionConfig sessionConfig, WorkflowStateConfig state, String serviceInstanceId, boolean includeScopeAssignedTo, ITransaction transaction) throws PortalException
getAccessibleTransitions(SessionConfig, WorkflowStateConfig, String, EnumSet, ITransaction)
sessionConfig
's user, originating from a specific workflow
state in the specified service instance.sessionConfig
- the user session information.state
- the transition state origin.serviceInstanceId
- the service instance identifier.includeScopeAssignedTo
- if true, transitions that the user
has permission to access only when the content is assigned to him are
also included in the returned collection.transaction
- the transaction for persistence access.PortalException
@Deprecated Collection<WorkflowStateConfig> getAccessibleStates(SessionConfig sessionConfig, String serviceInstanceId, boolean includeScopeAll, boolean includeScopeAssignedTo, ITransaction transaction) throws PortalException
getAccessibleStates(SessionConfig, String, EnumSet, ITransaction)
sessionConfig
- user session information.serviceInstanceId
- the content service instance id.includeScopeAll
- if the states with permission scope all are to be included.includeScopeAssignedTo
- if the states with permission scope assigned to are to be included.transaction
- the transaction for persistence access.PortalException
Collection<WorkflowTransitionConfig> getAccessibleTransitions(SessionConfig sessionConfig, WorkflowStateConfig state, String serviceInstanceId, EnumSet<TransitionScope> scopes, ITransaction transaction) throws PortalException
sessionConfig
's user, originating from a specific workflow
state in the specified service instance.sessionConfig
- user session information.state
- the transition state origin.serviceInstanceId
- the content service instance id.scopes
- transitions scopes that the user
has permission to access TransitionScope
}transaction
- the transaction for persistence access.PortalException
Collection<WorkflowStateConfig> getAccessibleStates(SessionConfig sessionConfig, String serviceInstanceId, EnumSet<StateScope> scopes, ITransaction transaction) throws PortalException
sessionConfig
- user session information.serviceInstanceId
- the content service instance id.scopes
- states scope that the user
has permission to access StateScope
}transaction
- the transaction for persistence access.PortalException
WorkflowConfig getServiceInstanceWorkflow(SessionConfig sessionConfig, String serviceInstanceId, ITransaction transaction) throws PortalException
sessionConfig
- user session information.serviceInstanceId
- the service instance's id.transaction
- the transaction for persistence access.PortalException
void setServiceInstanceWorkflow(SessionConfig sessionConfig, String serviceInstanceId, String workflowId, ITransaction transaction) throws PortalException
sessionConfig
- user session information.serviceInstanceId
- the service instance's id.workflowId
- the workflow's id.transaction
- the transaction for persistence access.PortalException
void destroyServiceInstanceWorkflow(SessionConfig sessionConfig, String serviceInstanceId, ITransaction transaction) throws PortalException
sessionConfig
- user session information.serviceInstanceId
- the service instance's id.transaction
- the transaction for persistence access.PortalException
void deleteAllContentWorkflowMetaData(SessionConfig sessionConfig, String serviceInstanceId, ITransaction transaction) throws PortalException
sessionConfig
- the user session information.serviceInstanceId
- the service instance identifier.transaction
- the transaction for persistence access.PortalException
Collection<WorkflowConfig> getAllWorkflows(SessionConfig sessionConfig, ITransaction transaction) throws PortalException
sessionConfig
- the user session information.transaction
- the transaction for persistence access.PortalException
Collection<WorkflowPermission> getWorkflowPermissions(SessionConfig sessionConfig, String serviceInstanceId, ITransaction transaction) throws PortalException
sessionConfig
- user session information.serviceInstanceId
- the service instance's id.transaction
- the transaction for persistence access.PortalException
void setWorkflowPermissions(SessionConfig sessionConfig, String serviceInstanceId, Collection<WorkflowPermission> permissions, ITransaction transaction) throws PortalException
sessionConfig
- user session information.serviceInstanceId
- the service instance's id.permissions
- the set of permissions to be set in the service instance. All
previous permissions will be deleted.transaction
- the transaction for persistence access.PortalException
@Deprecated ContentWorkflowMetaData getContentWorkflowMetaData(SessionConfig sessionConfig, String itemId, String serviceInstanceId, String sourceId, ITransaction transaction) throws PortalException
getContentWorkflowMetaData(SessionConfig, ContentLocale, ITransaction)
.sessionConfig
- user session information.itemId
- the content's item id.serviceInstanceId
- the content's service instance id.sourceId
- the content's source id.transaction
- the transaction for persistence access.PortalException
ContentWorkflowMetaData getContentWorkflowMetaData(SessionConfig sessionConfig, ContentLocale contentLocale, ITransaction transaction) throws PortalException
sessionConfig
- user session information.contentLocale
- the content locale-specific object.transaction
- the transaction for persistence access.PortalException
@Deprecated void createNewContentWorkflowMetaData(SessionConfig sessionConfig, String itemId, String serviceInstanceId, String sourceId, String assignedTo, ITransaction transaction) throws PortalException
createNewContentWorkflowMetaData(SessionConfig, ContentLocale, String, ITransaction)
.sessionConfig
- user session information.itemId
- the content's item id.serviceInstanceId
- the content's service instance id.sourceId
- the content's source id.assignedTo
- the principal identifier to be assigned to.transaction
- the transaction for persistence access.PortalException
void createNewContentWorkflowMetaData(SessionConfig sessionConfig, ContentLocale contentLocale, String assignedTo, ITransaction transaction) throws PortalException
sessionConfig
- user session information.contentLocale
- the content locale.serviceInstanceId
- the content's service instance id.sourceId
- the content's source id.assignedTo
- the principal identifier to be assigned to.transaction
- the transaction for persistence access.PortalException
@Deprecated void deleteContentWorkflowMetaData(SessionConfig sessionConfig, String itemId, String serviceInstanceId, String sourceId, ITransaction transaction) throws PortalException
deleteContentWorkflowMetaData(SessionConfig, ContentLocale, ITransaction)
.sessionConfig
- user session information.itemId
- the content's item id.serviceInstanceId
- the content's service instance id.sourceId
- the content's source id.transaction
- the transaction for persistence access.PortalException
void deleteContentWorkflowMetaData(SessionConfig sessionConfig, ContentLocale contentLocale, ITransaction transaction) throws PortalException
sessionConfig
- user session information.contentLocale
- the content locale.transaction
- the transaction for persistence access.PortalException
@Deprecated void executeAction(SessionConfig sessionConfig, String itemId, String serviceInstanceId, String sourceId, String performedTransitionId, String newAssignedTo, ITransaction transaction) throws PortalException
executeAction(SessionConfig, ContentLocale, String, String, ITransaction)
.sessionConfig
- user session information.itemId
- the content's item id.serviceInstanceId
- the content's service instance id.sourceId
- the content's source id.performedTransitionId
- the transition action performed. If null, no transition is
performed.newAssignedTo
- the new assigned to principal id.transaction
- the transaction for persistence access.PortalException
void executeAction(SessionConfig sessionConfig, ContentLocale contentLocale, String performedTransitionId, String newAssignedTo, ITransaction transaction) throws PortalException
After the action is executed, this method sends a WorkflowActionExecutedEvent
.
sessionConfig
- user session information.contentLocale
- the content locale specific object.performedTransitionId
- the transition action performed. If null, no transition is
performed.newAssignedTo
- the new assigned to principal id.transaction
- the transaction for persistence access.PortalException
@Deprecated boolean hasEditPermission(SessionConfig sessionConfig, String itemId, String serviceInstanceId, String sourceId, ITransaction transaction) throws PortalException
hasEditPermission(SessionConfig, ContentLocale, ITransaction)
.If there is no workflow, or no content workflow metadata, true is returned.
sessionConfig
- user session information.itemId
- the content's item id.serviceInstanceId
- the content's service instance id.sourceId
- the content's source id.transaction
- the transaction for persistence access.PortalException
boolean hasEditPermission(SessionConfig sessionConfig, ContentLocale contentLocale, ITransaction transaction) throws PortalException
If there is no workflow, or no content workflow metadata, true is returned.
sessionConfig
- user session information.contentLocale
- the content.transaction
- the transaction for persistence access.PortalException
@Deprecated Collection<String> getPossibleAssignedToForAction(SessionConfig sessionConfig, String itemId, String serviceInstanceId, String sourceId, String transitionId, ITransaction transaction) throws PortalException
getPossibleAssignedTo(SessionConfig, String, WorkflowStateConfig, ITransaction)
.sessionConfig
- user session information.serviceInstanceId
- the content's service instance id.sourceId
- the content's source id.transitionId
- the workflow's transition id.transaction
- the transaction for persistence access.PortalException
Collection<String> getPossibleAssignedTo(SessionConfig sessionConfig, String serviceInstanceId, WorkflowStateConfig workflowState, ITransaction transaction) throws PortalException
sessionConfig
- user session information.serviceInstanceId
- the service instance identifier.workflowState
- the workflow's state.transaction
- the transaction for persistence access.PortalException
@Deprecated boolean contentMayBePublished(SessionConfig sessionConfig, String itemId, String serviceInstanceId, String sourceId, ITransaction transaction) throws PortalException
contentMayBePublished(SessionConfig, ContentLocale, ITransaction)
.sessionConfig
- user session information.itemId
- the content's item id.serviceInstanceId
- the content's service instance id.sourceId
- the content's source id.transaction
- the transaction for persistence access.PortalException
boolean contentMayBePublished(SessionConfig sessionConfig, ContentLocale contentLocale, ITransaction transaction) throws PortalException
sessionConfig
- user session information.contentLocale
- the content version.transaction
- the transaction for persistence access.PortalException
boolean autoArchivePublishedContent(ContentLocale contentLocale, ITransaction transaction) throws PortalException
If the given content version is not in a published state or is already in an archived state or is not after its publishing period then nothing is done.
contentLocale
- the content version.transaction
- the transaction for persistence access.PortalException
LumisXP 12.5.0.200928 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.