com.waveset.session
Class WorkflowServices

java.lang.Object
  extended bycom.waveset.session.WorkflowServices
All Implemented Interfaces:
WorkflowApplication

public class WorkflowServices
extends java.lang.Object
implements WorkflowApplication

A WorkflowApplication that provides a collection of Session-y operations packaged so they are more convenient to use from Workflow. Used in the implementation of the new workflow processes for reprovisioning, account deletion, and other system operations that need process customization.


Field Summary
static java.util.Map ACTION_MASK_MAP
           
static java.lang.String ARG_ACCOUNT_ID
          Argument containing a user account id, used by disableUser.
static java.lang.String ARG_ACTION
           
static java.lang.String ARG_ATTNAME
          Argument containing an attribute name for queries.
static java.lang.String ARG_ATTRIBUTES
           
static java.lang.String ARG_ATTVAL
          Argument containing the attribute value for queries.
static java.lang.String ARG_AUDITABLE_ATTRIBUTES_LIST
           
static java.lang.String ARG_AUTHORIZED
           
static java.lang.String ARG_CHECK_POLICY_RESULT
           
static java.lang.String ARG_DEFERRED_TASK_NAME
           
static java.lang.String ARG_DO_WAVESET
           
static java.lang.String ARG_ERROR
           
static java.lang.String ARG_FORM_ID
          Argument containing an alternate form id passed to getViewForm.
static java.lang.String ARG_ID
          Id of an object from which to build a view, combines with ARG_VIEW_TYPE.
static java.lang.String ARG_LOCK_WAIT
          Recognized by checkoutObject.
static java.lang.String ARG_LOCKED_BY
          Recognized by checkoutObject, checkinObject, and unlockObject Specifies the name of the repository "user" we will use when obtaining locks.
static java.lang.String ARG_LOG_RESULT_ERRORS
           
static java.lang.String ARG_MAP
           
static java.lang.String ARG_NAME
           
static java.lang.String ARG_NEW_NAME
           
static java.lang.String ARG_OBJECT
          Argument holding the PersistentObject passed to the checkinObject method.
static java.lang.String ARG_OP
           
static java.lang.String ARG_ORGANIZATIONS
           
static java.lang.String ARG_ORIG_ATTRIBUTES
           
static java.lang.String ARG_OVERFLOW_ATTRIBUTES
           
static java.lang.String ARG_OWNER
           
static java.lang.String ARG_PARAMETERS
           
static java.lang.String ARG_POLICY
           
static java.lang.String ARG_PROPERTY_NAME
           
static java.lang.String ARG_PROPERTY_VALUE
           
static java.lang.String ARG_PWD_HISTORY
           
static java.lang.String ARG_QUERY_ATTRIBUTES
          Argument containing a map of multiple query attributes.
static java.lang.String ARG_RAISE_VIEW_ERRORS
          When set, we will promote any error message left in the view into errors in the WavesetResult returned by getView, checkoutView, and refreshView.
static java.lang.String ARG_REASON
           
static java.lang.String ARG_RESOURCE
           
static java.lang.String ARG_RESULT
           
static java.lang.String ARG_RIGHT
           
static java.lang.String ARG_ROLE
           
static java.lang.String ARG_SERVICES
           
static java.lang.String ARG_SINGLE
          Argument holding the a boolan option for the query methods.
static java.lang.String ARG_STATUS
           
static java.lang.String ARG_SUBJECT
          Argument that may be passed into most methods to specify an alternate subject.
static java.lang.String ARG_SUBJECT_NONE
          Special value for the ARG_SUBJECT argument that indicates that no authorization is to be performed.
static java.lang.String ARG_TASK_DATE
          Deprecated. 2005Q4M3 - If you need a public constant, use com.waveset.object.Attribute.DATE.getName().
static java.lang.String ARG_TASK_DEFINITION
           
static java.lang.String ARG_TASK_DEFINITION_NAME
           
static java.lang.String ARG_TASK_DESCRIPTION
           
static java.lang.String ARG_TASK_EXECUTE_ONCE
           
static java.lang.String ARG_TASK_INSTANCE_NAME
           
static java.lang.String ARG_TASK_ORGANIZATION
           
static java.lang.String ARG_TASK_OWNER
           
static java.lang.String ARG_TASK_VARIABLES
           
static java.lang.String ARG_TYPE
          View type for use with create, get, and checkout.
static java.lang.String ARG_VALUE
           
static java.lang.String ARG_VIEW
          Argument used when passing in views as arguments, used by checkinView and unlockView.
static java.lang.String ARG_VIEW_ID
          View id for use with OP_CREATE_VIEW, OP_GET_VIEW, and OP_CHECKOUT_VIEW.
static java.lang.String code_id
           
static java.lang.String OP_ADD_DEFERRED_TASK
           
static java.lang.String OP_AUDIT
           
static java.lang.String OP_AUDIT_WORKFLOW
           
static java.lang.String OP_AUDITOR_POLICY_SCAN
           
static java.lang.String OP_AUTHORIZE
           
static java.lang.String OP_CHECK_STRING_QUALITY_POLICY
           
static java.lang.String OP_CHECKIN_OBJECT
           
static java.lang.String OP_CHECKIN_VIEW
           
static java.lang.String OP_CHECKOUT_OBJECT
           
static java.lang.String OP_CHECKOUT_VIEW
           
static java.lang.String OP_COMMIT_VIEW
           
static java.lang.String OP_CREATE_VIEW
           
static java.lang.String OP_DELETE_OBJECT
           
static java.lang.String OP_DELETE_ROLE
           
static java.lang.String OP_DISABLE_USER
           
static java.lang.String OP_ENABLE_USER
           
static java.lang.String OP_FIND_USER
           
static java.lang.String OP_GET_OBJECT
           
static java.lang.String OP_GET_PROPERTY
           
static java.lang.String OP_GET_VIEW
           
static java.lang.String OP_GET_VIEW_FORM
           
static java.lang.String OP_QUERY_OBJECT_NAMES
           
static java.lang.String OP_QUERY_OBJECTS
           
static java.lang.String OP_QUERY_REFERENCING_ROLES
           
static java.lang.String OP_REFRESH_VIEW
           
static java.lang.String OP_REMOVE_DEFERRED_TASK
           
static java.lang.String OP_REMOVE_PROPERTY
           
static java.lang.String OP_RENAME_OBJECT
           
static java.lang.String OP_SCHEDULE_TASK
           
static java.lang.String OP_SET_PROPERTY
           
static java.lang.String OP_UNLOCK_OBJECT
           
static java.lang.String OP_UNLOCK_VIEW
           
static java.lang.String RETURN_ACCOUNT_ID
          The variable we set when return an account ID from one of the find methods.
static java.lang.String RETURN_FORM
          The variable we set when returning forms from getViewForm.
static java.lang.String RETURN_OBJECT
          The variable we set when returning persistent objects.
static java.lang.String RETURN_PROPERTY_VALUE
           
static java.lang.String RETURN_QUERY_RESULT
          The variable set when we return a list from one of the query methods.
static java.lang.String RETURN_VIEW
          The variable we set when returning view objects.
protected static Trace trace
           
static java.lang.String WORKFLOW_TYPE
           
 
Constructor Summary
WorkflowServices()
           
 
Method Summary
 WavesetResult addDeferredTask(WorkflowContext context)
          Set a deferred task property.
 WavesetResult auditWorkflow(WorkflowContext context)
           
 WavesetResult call(WorkflowContext context)
          Called by the workflow engine when it wants us to do something.
 void destroy()
          Called by the workflow engine when it no longer needs us.
 WavesetResult getProperty(WorkflowContext context)
          Get a property value on an object.
 void init()
          Initializes the object for use as a Workflow application.
static void initActionMap()
           
 WavesetResult removeDeferredTask(WorkflowContext context)
          Remove a deferred task property.
 WavesetResult removeProperty(WorkflowContext context)
           
 WavesetResult scheduleTask(WorkflowContext context)
          Schedule a task definition or template for later execution.
 WavesetResult setProperty(WorkflowContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

code_id

public static final java.lang.String code_id
See Also:
Constant Field Values

trace

protected static final Trace trace

OP_AUTHORIZE

public static final java.lang.String OP_AUTHORIZE
See Also:
Constant Field Values

OP_AUDIT

public static final java.lang.String OP_AUDIT
See Also:
Constant Field Values

OP_GET_OBJECT

public static final java.lang.String OP_GET_OBJECT
See Also:
Constant Field Values

OP_CHECKOUT_OBJECT

public static final java.lang.String OP_CHECKOUT_OBJECT
See Also:
Constant Field Values

OP_CHECKIN_OBJECT

public static final java.lang.String OP_CHECKIN_OBJECT
See Also:
Constant Field Values

OP_UNLOCK_OBJECT

public static final java.lang.String OP_UNLOCK_OBJECT
See Also:
Constant Field Values

OP_DELETE_OBJECT

public static final java.lang.String OP_DELETE_OBJECT
See Also:
Constant Field Values

OP_RENAME_OBJECT

public static final java.lang.String OP_RENAME_OBJECT
See Also:
Constant Field Values

OP_CREATE_VIEW

public static final java.lang.String OP_CREATE_VIEW
See Also:
Constant Field Values

OP_GET_VIEW

public static final java.lang.String OP_GET_VIEW
See Also:
Constant Field Values

OP_CHECKOUT_VIEW

public static final java.lang.String OP_CHECKOUT_VIEW
See Also:
Constant Field Values

OP_CHECKIN_VIEW

public static final java.lang.String OP_CHECKIN_VIEW
See Also:
Constant Field Values

OP_COMMIT_VIEW

public static final java.lang.String OP_COMMIT_VIEW
See Also:
Constant Field Values

OP_UNLOCK_VIEW

public static final java.lang.String OP_UNLOCK_VIEW
See Also:
Constant Field Values

OP_REFRESH_VIEW

public static final java.lang.String OP_REFRESH_VIEW
See Also:
Constant Field Values

OP_GET_VIEW_FORM

public static final java.lang.String OP_GET_VIEW_FORM
See Also:
Constant Field Values

OP_AUDIT_WORKFLOW

public static final java.lang.String OP_AUDIT_WORKFLOW
See Also:
Constant Field Values

OP_CHECK_STRING_QUALITY_POLICY

public static final java.lang.String OP_CHECK_STRING_QUALITY_POLICY
See Also:
Constant Field Values

OP_AUDITOR_POLICY_SCAN

public static final java.lang.String OP_AUDITOR_POLICY_SCAN
See Also:
Constant Field Values

OP_DISABLE_USER

public static final java.lang.String OP_DISABLE_USER
See Also:
Constant Field Values

OP_ENABLE_USER

public static final java.lang.String OP_ENABLE_USER
See Also:
Constant Field Values

OP_FIND_USER

public static final java.lang.String OP_FIND_USER
See Also:
Constant Field Values

OP_QUERY_OBJECTS

public static final java.lang.String OP_QUERY_OBJECTS
See Also:
Constant Field Values

OP_QUERY_OBJECT_NAMES

public static final java.lang.String OP_QUERY_OBJECT_NAMES
See Also:
Constant Field Values

OP_QUERY_REFERENCING_ROLES

public static final java.lang.String OP_QUERY_REFERENCING_ROLES
See Also:
Constant Field Values

OP_GET_PROPERTY

public static final java.lang.String OP_GET_PROPERTY
See Also:
Constant Field Values

OP_SET_PROPERTY

public static final java.lang.String OP_SET_PROPERTY
See Also:
Constant Field Values

OP_REMOVE_PROPERTY

public static final java.lang.String OP_REMOVE_PROPERTY
See Also:
Constant Field Values

OP_ADD_DEFERRED_TASK

public static final java.lang.String OP_ADD_DEFERRED_TASK
See Also:
Constant Field Values

OP_REMOVE_DEFERRED_TASK

public static final java.lang.String OP_REMOVE_DEFERRED_TASK
See Also:
Constant Field Values

OP_SCHEDULE_TASK

public static final java.lang.String OP_SCHEDULE_TASK
See Also:
Constant Field Values

OP_DELETE_ROLE

public static final java.lang.String OP_DELETE_ROLE
See Also:
Constant Field Values

ARG_OP

public static final java.lang.String ARG_OP
See Also:
Constant Field Values

ARG_NAME

public static final java.lang.String ARG_NAME
See Also:
Constant Field Values

ARG_NEW_NAME

public static final java.lang.String ARG_NEW_NAME
See Also:
Constant Field Values

ARG_AUTHORIZED

public static final java.lang.String ARG_AUTHORIZED
See Also:
Constant Field Values

ARG_RIGHT

public static final java.lang.String ARG_RIGHT
See Also:
Constant Field Values

ARG_ACTION

public static final java.lang.String ARG_ACTION
See Also:
Constant Field Values

ARG_STATUS

public static final java.lang.String ARG_STATUS
See Also:
Constant Field Values

ARG_RESULT

public static final java.lang.String ARG_RESULT
See Also:
Constant Field Values

ARG_REASON

public static final java.lang.String ARG_REASON
See Also:
Constant Field Values

ARG_RESOURCE

public static final java.lang.String ARG_RESOURCE
See Also:
Constant Field Values

ARG_ERROR

public static final java.lang.String ARG_ERROR
See Also:
Constant Field Values

ARG_LOG_RESULT_ERRORS

public static final java.lang.String ARG_LOG_RESULT_ERRORS
See Also:
Constant Field Values

ARG_ATTRIBUTES

public static final java.lang.String ARG_ATTRIBUTES
See Also:
Constant Field Values

ARG_AUDITABLE_ATTRIBUTES_LIST

public static final java.lang.String ARG_AUDITABLE_ATTRIBUTES_LIST
See Also:
Constant Field Values

ARG_OVERFLOW_ATTRIBUTES

public static final java.lang.String ARG_OVERFLOW_ATTRIBUTES
See Also:
Constant Field Values

ARG_ORIG_ATTRIBUTES

public static final java.lang.String ARG_ORIG_ATTRIBUTES
See Also:
Constant Field Values

ARG_PARAMETERS

public static final java.lang.String ARG_PARAMETERS
See Also:
Constant Field Values

ARG_ORGANIZATIONS

public static final java.lang.String ARG_ORGANIZATIONS
See Also:
Constant Field Values

ARG_ROLE

public static final java.lang.String ARG_ROLE
See Also:
Constant Field Values

ARG_VIEW_ID

public static final java.lang.String ARG_VIEW_ID
View id for use with OP_CREATE_VIEW, OP_GET_VIEW, and OP_CHECKOUT_VIEW.

See Also:
Constant Field Values

ARG_TYPE

public static final java.lang.String ARG_TYPE
View type for use with create, get, and checkout. This combined with ARG_ID is the same as ARG_VIEW_ID, but easier to deal with in workflow. We're probably headed this direction in the view interfaces anyway.

See Also:
Constant Field Values

ARG_SERVICES

public static final java.lang.String ARG_SERVICES
See Also:
Constant Field Values

ARG_DO_WAVESET

public static final java.lang.String ARG_DO_WAVESET
See Also:
Constant Field Values

ARG_ID

public static final java.lang.String ARG_ID
Id of an object from which to build a view, combines with ARG_VIEW_TYPE.

See Also:
Constant Field Values

ARG_VIEW

public static final java.lang.String ARG_VIEW
Argument used when passing in views as arguments, used by checkinView and unlockView.

See Also:
Constant Field Values

ARG_RAISE_VIEW_ERRORS

public static final java.lang.String ARG_RAISE_VIEW_ERRORS
When set, we will promote any error message left in the view into errors in the WavesetResult returned by getView, checkoutView, and refreshView.

See Also:
Constant Field Values

ARG_SUBJECT

public static final java.lang.String ARG_SUBJECT
Argument that may be passed into most methods to specify an alternate subject. If not specified, it defaults to the Subject that owns the workflow process.

See Also:
Constant Field Values

ARG_SUBJECT_NONE

public static final java.lang.String ARG_SUBJECT_NONE
Special value for the ARG_SUBJECT argument that indicates that no authorization is to be performed. Use with care.

See Also:
Constant Field Values

ARG_ACCOUNT_ID

public static final java.lang.String ARG_ACCOUNT_ID
Argument containing a user account id, used by disableUser. Also by audit.

See Also:
Constant Field Values

ARG_FORM_ID

public static final java.lang.String ARG_FORM_ID
Argument containing an alternate form id passed to getViewForm.

See Also:
Constant Field Values

RETURN_VIEW

public static final java.lang.String RETURN_VIEW
The variable we set when returning view objects.

See Also:
Constant Field Values

RETURN_FORM

public static final java.lang.String RETURN_FORM
The variable we set when returning forms from getViewForm.

See Also:
Constant Field Values

RETURN_OBJECT

public static final java.lang.String RETURN_OBJECT
The variable we set when returning persistent objects.

See Also:
Constant Field Values

RETURN_ACCOUNT_ID

public static final java.lang.String RETURN_ACCOUNT_ID
The variable we set when return an account ID from one of the find methods.

See Also:
Constant Field Values

ARG_ATTNAME

public static final java.lang.String ARG_ATTNAME
Argument containing an attribute name for queries.

See Also:
Constant Field Values

ARG_ATTVAL

public static final java.lang.String ARG_ATTVAL
Argument containing the attribute value for queries.

See Also:
Constant Field Values

ARG_QUERY_ATTRIBUTES

public static final java.lang.String ARG_QUERY_ATTRIBUTES
Argument containing a map of multiple query attributes.

See Also:
Constant Field Values

ARG_LOCKED_BY

public static final java.lang.String ARG_LOCKED_BY
Recognized by checkoutObject, checkinObject, and unlockObject Specifies the name of the repository "user" we will use when obtaining locks.

See Also:
Constant Field Values

ARG_LOCK_WAIT

public static final java.lang.String ARG_LOCK_WAIT
Recognized by checkoutObject. The number of seconds to wait if there is contention on a lock.

See Also:
Constant Field Values

RETURN_QUERY_RESULT

public static final java.lang.String RETURN_QUERY_RESULT
The variable set when we return a list from one of the query methods.

See Also:
Constant Field Values

ARG_OBJECT

public static final java.lang.String ARG_OBJECT
Argument holding the PersistentObject passed to the checkinObject method.

See Also:
Constant Field Values

ARG_SINGLE

public static final java.lang.String ARG_SINGLE
Argument holding the a boolan option for the query methods. When true, the method will return only the first object/name in the result, rather than a list of all results.

See Also:
Constant Field Values

ARG_POLICY

public static final java.lang.String ARG_POLICY
See Also:
Constant Field Values

ARG_VALUE

public static final java.lang.String ARG_VALUE
See Also:
Constant Field Values

ARG_MAP

public static final java.lang.String ARG_MAP
See Also:
Constant Field Values

ARG_PWD_HISTORY

public static final java.lang.String ARG_PWD_HISTORY
See Also:
Constant Field Values

ARG_OWNER

public static final java.lang.String ARG_OWNER
See Also:
Constant Field Values

ARG_CHECK_POLICY_RESULT

public static final java.lang.String ARG_CHECK_POLICY_RESULT
See Also:
Constant Field Values

ARG_PROPERTY_NAME

public static final java.lang.String ARG_PROPERTY_NAME
See Also:
Constant Field Values

ARG_PROPERTY_VALUE

public static final java.lang.String ARG_PROPERTY_VALUE
See Also:
Constant Field Values

RETURN_PROPERTY_VALUE

public static final java.lang.String RETURN_PROPERTY_VALUE
See Also:
Constant Field Values

ARG_TASK_DEFINITION

public static final java.lang.String ARG_TASK_DEFINITION
See Also:
Constant Field Values

ARG_DEFERRED_TASK_NAME

public static final java.lang.String ARG_DEFERRED_TASK_NAME
See Also:
Constant Field Values

ARG_TASK_DEFINITION_NAME

public static final java.lang.String ARG_TASK_DEFINITION_NAME
See Also:
Constant Field Values

ARG_TASK_INSTANCE_NAME

public static final java.lang.String ARG_TASK_INSTANCE_NAME
See Also:
Constant Field Values

ARG_TASK_DATE

public static final java.lang.String ARG_TASK_DATE
Deprecated. 2005Q4M3 - If you need a public constant, use com.waveset.object.Attribute.DATE.getName().


ARG_TASK_ORGANIZATION

public static final java.lang.String ARG_TASK_ORGANIZATION
See Also:
Constant Field Values

ARG_TASK_OWNER

public static final java.lang.String ARG_TASK_OWNER
See Also:
Constant Field Values

ARG_TASK_DESCRIPTION

public static final java.lang.String ARG_TASK_DESCRIPTION
See Also:
Constant Field Values

ARG_TASK_EXECUTE_ONCE

public static final java.lang.String ARG_TASK_EXECUTE_ONCE
See Also:
Constant Field Values

ARG_TASK_VARIABLES

public static final java.lang.String ARG_TASK_VARIABLES
See Also:
Constant Field Values

WORKFLOW_TYPE

public static final java.lang.String WORKFLOW_TYPE
See Also:
Constant Field Values

ACTION_MASK_MAP

public static java.util.Map ACTION_MASK_MAP
Constructor Detail

WorkflowServices

public WorkflowServices()
                 throws WavesetException
Method Detail

init

public void init()
Initializes the object for use as a Workflow application.

Specified by:
init in interface WorkflowApplication

destroy

public void destroy()
Called by the workflow engine when it no longer needs us.

Specified by:
destroy in interface WorkflowApplication

call

public WavesetResult call(WorkflowContext context)
Called by the workflow engine when it wants us to do something.

We first look at the "op" argument and dispatch to a handler method.

Specified by:
call in interface WorkflowApplication

auditWorkflow

public WavesetResult auditWorkflow(WorkflowContext context)
                            throws WavesetException
Throws:
WavesetException

initActionMap

public static void initActionMap()

getProperty

public WavesetResult getProperty(WorkflowContext context)
                          throws WavesetException
Get a property value on an object.

Throws:
WavesetException

setProperty

public WavesetResult setProperty(WorkflowContext context)
                          throws WavesetException
Throws:
WavesetException

removeProperty

public WavesetResult removeProperty(WorkflowContext context)
                             throws WavesetException
Throws:
WavesetException

addDeferredTask

public WavesetResult addDeferredTask(WorkflowContext context)
                              throws WavesetException
Set a deferred task property.

Throws:
WavesetException

scheduleTask

public WavesetResult scheduleTask(WorkflowContext context)
                           throws WavesetException
Schedule a task definition or template for later execution.

Parameters:
context - WorkflowContext expected to have defined the following arguments:
  • task - required name of the task definition or template to be scheduled
  • instanceName - required runtime name of the scheduled task
  • date - required date/time when the task is to start
  • taskVariables - optional map containing key/values to pass to the executing task
Returns:
WavesetResult
Throws:
WavesetException - if required input parameters are missing or there is a problem creating the schedule

removeDeferredTask

public WavesetResult removeDeferredTask(WorkflowContext context)
                                 throws WavesetException
Remove a deferred task property.

Throws:
WavesetException