@Scope(value=CONVERSATION) @Name(value="routingTaskActions") public class RoutingTaskActionsBean extends Object implements Serializable
| Modifier and Type | Class and Description |
|---|---|
class |
RoutingTaskActionsBean.TaskInfo |
| Modifier and Type | Field and Description |
|---|---|
protected ActionContextProvider |
actionContextProvider |
protected org.nuxeo.ecm.platform.actions.ejb.ActionManager |
actionService |
protected String |
button |
static String |
CACHE_ACTIONS_PER_TASK_TYPE_PROP_NAME
Runtime property name, that makes it possible to cache actions available
on a given task, depending on its type.
|
protected org.nuxeo.ecm.platform.contentview.seam.ContentViewActions |
contentViewActions |
protected Task |
currentTask |
protected org.nuxeo.ecm.core.api.CoreSession |
documentManager |
protected DocumentsListsManager |
documentsListsManager |
protected org.jboss.seam.faces.FacesMessages |
facesMessages |
protected Map<String,String> |
messages |
protected NavigationContext |
navigationContext |
static String |
SUBJECT_PATTERN |
protected Map<String,RoutingTaskActionsBean.TaskInfo> |
tasksInfoCache |
| Constructor and Description |
|---|
RoutingTaskActionsBean() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canBeReassign() |
String |
delegateTask(RoutingTaskActionsBean.TaskInfo taskInfo) |
String |
endTask(Task task) |
String |
endTasks(String selectionListName,
org.nuxeo.ecm.platform.actions.Action taskAction)
Ends a task given a selection list name and an action
|
Task |
getCurrentTask() |
List<String> |
getCurrentTaskTargetDocumentsIds()
Added to avoid an error when opening a task created @before 5.8 see
NXP-14047
|
Map<String,Serializable> |
getFormVariables(Task task) |
protected String |
getTaskActionId(Task task,
String buttonId)
Helper to generate a unique action id for all task types
|
List<org.nuxeo.ecm.platform.actions.Action> |
getTaskActions(String selectionListName)
Returns actions for task document buttons defined in the workflow graph
|
List<org.nuxeo.ecm.platform.actions.Action> |
getTaskActions(Task task) |
Map<String,org.nuxeo.ecm.platform.actions.Action> |
getTaskActionsMap(Task task) |
List<org.nuxeo.ecm.platform.actions.Action> |
getTaskButtons(Task task) |
RoutingTaskActionsBean.TaskInfo |
getTaskInfo(Task task,
boolean getFormVariables) |
String |
getTaskLayout(Task task) |
String |
getWorkflowTitle(String instanceId) |
protected boolean |
isLayoutEmpty(String layoutName) |
boolean |
isRoutingTask(Task task) |
String |
navigateToTask(org.nuxeo.ecm.core.api.DocumentModel taskDoc) |
String |
navigateToTasksView() |
void |
OnTaskCompleted() |
String |
reassignTask(RoutingTaskActionsBean.TaskInfo taskInfo) |
void |
setCurrentTask(Task currentTask) |
void |
validateSubject(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
Object value) |
void |
validateTaskDueDate(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
Object value) |
public static final String SUBJECT_PATTERN
public static final String CACHE_ACTIONS_PER_TASK_TYPE_PROP_NAME
This caching is global to all tasks in the platform, and will not work correctly if some tasks are filtering some actions depending on local variables, for instance.
@In(create=true,
required=false)
protected transient org.nuxeo.ecm.core.api.CoreSession documentManager
@In(required=true,
create=true)
protected NavigationContext navigationContext
@In(create=true,
required=false)
protected org.jboss.seam.faces.FacesMessages facesMessages
@In(create=true) protected transient DocumentsListsManager documentsListsManager
@In(create=true,
required=false)
protected transient ActionContextProvider actionContextProvider
@In(create=true,
required=false)
protected org.nuxeo.ecm.platform.contentview.seam.ContentViewActions contentViewActions
@RequestParameter(value="button") protected String button
protected org.nuxeo.ecm.platform.actions.ejb.ActionManager actionService
protected Map<String,RoutingTaskActionsBean.TaskInfo> tasksInfoCache
protected Task currentTask
public void validateTaskDueDate(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
Object value)
public void validateSubject(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
Object value)
public String getTaskLayout(Task task) throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic List<org.nuxeo.ecm.platform.actions.Action> getTaskButtons(Task task) throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic String endTask(Task task) throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic Map<String,Serializable> getFormVariables(Task task) throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic RoutingTaskActionsBean.TaskInfo getTaskInfo(Task task, boolean getFormVariables) throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic boolean isRoutingTask(Task task)
public List<org.nuxeo.ecm.platform.actions.Action> getTaskActions(Task task) throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionprotected boolean isLayoutEmpty(String layoutName)
protected String getTaskActionId(Task task, String buttonId) throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic Map<String,org.nuxeo.ecm.platform.actions.Action> getTaskActionsMap(Task task) throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic List<org.nuxeo.ecm.platform.actions.Action> getTaskActions(String selectionListName) throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic String endTasks(String selectionListName, org.nuxeo.ecm.platform.actions.Action taskAction) throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientException@Observer(value={"workflowTaskCompleted","workflowTaskReassigned","workflowTaskDelegated"})
@BypassInterceptors
public void OnTaskCompleted()
public String reassignTask(RoutingTaskActionsBean.TaskInfo taskInfo)
public String delegateTask(RoutingTaskActionsBean.TaskInfo taskInfo)
public String navigateToTask(org.nuxeo.ecm.core.api.DocumentModel taskDoc)
public String navigateToTasksView()
public Task getCurrentTask()
public void setCurrentTask(Task currentTask)
public List<String> getCurrentTaskTargetDocumentsIds() throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic boolean canBeReassign()
throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionCopyright © 2019 Nuxeo SA. All rights reserved.