|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.workflow.WorkflowManager
public class WorkflowManager
Workflow state machine Notes: Determining item status from the database: When an item has not been submitted yet, it is in the user's personal workspace (there is a row in PersonalWorkspace pointing to it.) When an item is submitted and is somewhere in a workflow, it has a row in the WorkflowItem table pointing to it. The state of the workflow can be determined by looking at WorkflowItem.getState() When a submission is complete, the WorkflowItem pointing to the item is destroyed and the archive() method is called, which hooks the item up to the archive. Notification: When an item enters a state that requires notification, (WFSTATE_STEP1POOL, WFSTATE_STEP2POOL, WFSTATE_STEP3POOL,) the workflow needs to notify the appropriate groups that they have a pending task to claim. Revealing lists of approvers, editors, and reviewers. A method could be added to do this, but it isn't strictly necessary. (say public List getStateEPeople( WorkflowItem wi, int state ) could return people affected by the item's current state.
| Field Summary | |
|---|---|
static int |
WFSTATE_ARCHIVE
|
static int |
WFSTATE_STEP1
|
static int |
WFSTATE_STEP1POOL
|
static int |
WFSTATE_STEP2
|
static int |
WFSTATE_STEP2POOL
|
static int |
WFSTATE_STEP3
|
static int |
WFSTATE_STEP3POOL
|
static int |
WFSTATE_SUBMIT
|
static String[] |
workflowText
Symbolic names of workflow steps. |
| Constructor Summary | |
|---|---|
WorkflowManager()
|
|
| Method Summary | |
|---|---|
static void |
abort(Context c,
WorkflowItem wi,
EPerson e)
abort() aborts a workflow, completely deleting it (administrator do this) (it will basically do a reject from any state - the item ends up back in the user's PersonalWorkspace |
static void |
advance(Context c,
WorkflowItem wi,
EPerson e)
approveAction() sends an item forward in the workflow (reviewers, approvers, and editors all do an 'approve' to move the item forward) if the item arrives at the submit state, then remove the WorkflowItem and call the archive() method to put it in the archive, and email notify the submitter of a successful submission |
static void |
claim(Context c,
WorkflowItem wi,
EPerson e)
claim() claims a workflow task for an EPerson |
static String |
getItemTitle(WorkflowItem wi)
get the title of the item in this workflow |
static List |
getOwnedTasks(Context c,
EPerson e)
getOwnedTasks() returns a List of WorkflowItems containing the tasks claimed and owned by an EPerson. |
static List |
getPooledTasks(Context c,
EPerson e)
getPooledTasks() returns a List of WorkflowItems an EPerson could claim (as a reviewer, etc.) for display on a user's MyDSpace page. |
static String |
getSubmitterName(WorkflowItem wi)
get the name of the eperson who started this workflow |
static int |
getWorkflowID(String state)
Translate symbolic name of workflow state into number. |
static WorkspaceItem |
reject(Context c,
WorkflowItem wi,
EPerson e,
String rejection_message)
rejects an item - rejection means undoing a submit - WorkspaceItem is created, and the WorkflowItem is removed, user is emailed rejection_message. |
static WorkflowItem |
start(Context c,
WorkspaceItem wsi)
startWorkflow() begins a workflow - in a single transaction do away with the PersonalWorkspace entry and turn it into a WorkflowItem. |
static WorkflowItem |
startWithoutNotify(Context c,
WorkspaceItem wsi)
startWithoutNotify() starts the workflow normally, but disables notifications (useful for large imports,) for the first workflow step - subsequent notifications happen normally |
static void |
unclaim(Context c,
WorkflowItem wi,
EPerson e)
unclaim() returns an owned task/item to the pool |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int WFSTATE_SUBMIT
public static final int WFSTATE_STEP1POOL
public static final int WFSTATE_STEP1
public static final int WFSTATE_STEP2POOL
public static final int WFSTATE_STEP2
public static final int WFSTATE_STEP3POOL
public static final int WFSTATE_STEP3
public static final int WFSTATE_ARCHIVE
public static final String[] workflowText
| Constructor Detail |
|---|
public WorkflowManager()
| Method Detail |
|---|
public static int getWorkflowID(String state)
state - symbolic name of workflow state, must be one of
the elements of workflowText array.
public static WorkflowItem start(Context c,
WorkspaceItem wsi)
throws SQLException,
AuthorizeException,
IOException
c - Contextwsi - The WorkspaceItem to convert to a workflow item
SQLException
AuthorizeException
IOException
public static WorkflowItem startWithoutNotify(Context c,
WorkspaceItem wsi)
throws SQLException,
AuthorizeException,
IOException
SQLException
AuthorizeException
IOException
public static List getOwnedTasks(Context c,
EPerson e)
throws SQLException
e - The EPerson we want to fetch owned tasks for.
SQLException
public static List getPooledTasks(Context c,
EPerson e)
throws SQLException
e - The Eperson we want to fetch the pooled tasks for.
SQLException
public static void claim(Context c,
WorkflowItem wi,
EPerson e)
throws SQLException,
IOException,
AuthorizeException
wi - WorkflowItem to do the claim one - The EPerson doing the claim
SQLException
IOException
AuthorizeException
public static void advance(Context c,
WorkflowItem wi,
EPerson e)
throws SQLException,
IOException,
AuthorizeException
c - Contextwi - WorkflowItem do do the approval one - EPerson doing the approval
SQLException
IOException
AuthorizeException
public static void unclaim(Context c,
WorkflowItem wi,
EPerson e)
throws SQLException,
IOException,
AuthorizeException
c - Contextwi - WorkflowItem to operate one - EPerson doing the operation
SQLException
IOException
AuthorizeException
public static void abort(Context c,
WorkflowItem wi,
EPerson e)
throws SQLException,
AuthorizeException,
IOException
c - Contextwi - WorkflowItem to operate one - EPerson doing the operation
SQLException
AuthorizeException
IOException
public static WorkspaceItem reject(Context c,
WorkflowItem wi,
EPerson e,
String rejection_message)
throws SQLException,
AuthorizeException,
IOException
c - Contextwi - WorkflowItem to operate one - EPerson doing the operationrejection_message - message to email to user
SQLException
AuthorizeException
IOException
public static String getItemTitle(WorkflowItem wi)
throws SQLException
wi - the workflow item object
SQLException
public static String getSubmitterName(WorkflowItem wi)
throws SQLException
wi - the workflow item
SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||