info.magnolia.module.workflow
Class WorkflowUtil

java.lang.Object
  extended by info.magnolia.module.workflow.WorkflowUtil

public class WorkflowUtil
extends Object

Util to use the mangoila workflow module. Methods to launch and proceed.

Author:
jackie

Field Summary
static openwfe.org.engine.workitem.StringAttribute ATTRIBUTE_FALSE
           
static openwfe.org.engine.workitem.StringAttribute ATTRIBUTE_TRUE
           
 
Method Summary
static void assignWorkItemToUser(openwfe.org.engine.workitem.InFlowWorkItem wi, String userName)
          assign work item to a user, if userName = "", then assignment for the workItem will be deleted.
static void assignWorkItemToUser(String id, String userName)
          assign work item to a user, if userName = "", then assignment for the workItem will be deleted.
static void cancel(String id, String comment)
           
static List getGroupInbox(String GroupName)
          return a list of workItem for one group.
static String getId(openwfe.org.engine.workitem.InFlowItem wi)
           
static String getPath(String id)
           
static List getRoleInbox(String roleName)
          return a list of workItem for one role.
static List getUserInbox(String userName)
          return a list of workItem for one user.
static openwfe.org.engine.workitem.InFlowWorkItem getWorkItem(String id)
          Retrieves a workitem by id.
static List getWorkItems(String userName)
          get all work items for the user.
static JCRWorkItemStore getWorkItemStore()
           
static void launchFlow(openwfe.org.engine.workitem.LaunchItem li)
           
static void launchFlow(openwfe.org.engine.workitem.LaunchItem li, String flowName)
          Start a flow.
static void launchFlow(String repository, String path, String flowName)
          Simply launch a flow for the specified node.
static void proceed(openwfe.org.engine.workitem.InFlowWorkItem wi)
          Proceed this item.
static void proceed(String id)
           
static void proceed(String id, String action)
           
static void proceed(String id, String action, String comment)
           
static void reject(String id, String comment)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTRIBUTE_TRUE

public static final openwfe.org.engine.workitem.StringAttribute ATTRIBUTE_TRUE

ATTRIBUTE_FALSE

public static final openwfe.org.engine.workitem.StringAttribute ATTRIBUTE_FALSE
Method Detail

getWorkItemStore

public static JCRWorkItemStore getWorkItemStore()

launchFlow

public static void launchFlow(openwfe.org.engine.workitem.LaunchItem li)

launchFlow

public static void launchFlow(String repository,
                              String path,
                              String flowName)
                       throws Exception
Simply launch a flow for the specified node.

Throws:
Exception

launchFlow

public static void launchFlow(openwfe.org.engine.workitem.LaunchItem li,
                              String flowName)
                       throws FlowDefinitionException
Start a flow.

Parameters:
li - the prepared lunchItem
flowName - the flow to start
Throws:
FlowDefinitionException

proceed

public static void proceed(String id)

proceed

public static void proceed(String id,
                           String action)

proceed

public static void proceed(String id,
                           String action,
                           String comment)

reject

public static void reject(String id,
                          String comment)

cancel

public static void cancel(String id,
                          String comment)

proceed

public static void proceed(openwfe.org.engine.workitem.InFlowWorkItem wi)
Proceed this item.

Parameters:
wi -

getWorkItem

public static openwfe.org.engine.workitem.InFlowWorkItem getWorkItem(String id)
Retrieves a workitem by id.

Parameters:
id - identifier for the workitem as stored in the engine
Returns:
InFlowWorkItem corresponding to the workitem

getPath

public static String getPath(String id)

getWorkItems

public static List getWorkItems(String userName)
                         throws Exception
get all work items for the user.

Throws:
Exception

getId

public static String getId(openwfe.org.engine.workitem.InFlowItem wi)

assignWorkItemToUser

public static void assignWorkItemToUser(String id,
                                        String userName)
assign work item to a user, if userName = "", then assignment for the workItem will be deleted.


assignWorkItemToUser

public static void assignWorkItemToUser(openwfe.org.engine.workitem.InFlowWorkItem wi,
                                        String userName)
assign work item to a user, if userName = "", then assignment for the workItem will be deleted.


getUserInbox

public static List getUserInbox(String userName)
                         throws Exception
return a list of workItem for one user.

Throws:
Exception

getGroupInbox

public static List getGroupInbox(String GroupName)
                          throws Exception
return a list of workItem for one group.

Throws:
Exception

getRoleInbox

public static List getRoleInbox(String roleName)
                         throws Exception
return a list of workItem for one role.

Throws:
Exception


Copyright © 2003–2014 Magnolia International Ltd.. All rights reserved.