@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 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 ContentViewActions |
contentViewActions |
protected Task |
currentTask |
protected CoreSession |
documentManager |
protected DocumentsListsManager |
documentsListsManager |
protected org.jboss.seam.faces.FacesMessages |
facesMessages |
protected List<String> |
formVariablesToKeep |
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,
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<Action> |
getTaskActions(String selectionListName)
Returns actions for task document buttons defined in the workflow graph
|
List<Action> |
getTaskActions(Task task) |
Map<String,Action> |
getTaskActionsMap(Task task) |
List<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(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 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 ContentViewActions contentViewActions
protected ActionManager actionService
protected Map<String,RoutingTaskActionsBean.TaskInfo> tasksInfoCache
protected Task currentTask
protected List<String> formVariablesToKeep
public RoutingTaskActionsBean()
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)
public List<Action> getTaskButtons(Task task)
public Map<String,Serializable> getFormVariables(Task task)
public RoutingTaskActionsBean.TaskInfo getTaskInfo(Task task, boolean getFormVariables)
public boolean isRoutingTask(Task task)
public List<Action> getTaskActions(Task task)
protected boolean isLayoutEmpty(String layoutName)
protected String getTaskActionId(Task task, String buttonId)
public Map<String,Action> getTaskActionsMap(Task task)
public List<Action> getTaskActions(String selectionListName)
public String endTasks(String selectionListName, Action taskAction)
@Observer(value={"workflowTaskCompleted","workflowTaskReassigned","workflowTaskDelegated"}) @BypassInterceptors public void OnTaskCompleted()
public String reassignTask(RoutingTaskActionsBean.TaskInfo taskInfo)
public String getWorkflowTitle(String instanceId)
public String delegateTask(RoutingTaskActionsBean.TaskInfo taskInfo)
public String navigateToTask(DocumentModel taskDoc)
public String navigateToTasksView()
public Task getCurrentTask()
public void setCurrentTask(Task currentTask)
public List<String> getCurrentTaskTargetDocumentsIds()
public boolean canBeReassign()
Copyright © 2019 Nuxeo. All rights reserved.