it.eng.spago.workflow.api
Interface IWorkflowAssignment


public interface IWorkflowAssignment

Author:
zoppello An Assignment is an activity of a process associated to a connection, potentially we can say that an assignment is an activity that CAN BE executed by the user of the current IWorkflowConnection. Pay attention that this dosn't means that the user MUST DO the activity but only that it can. This is because activity assignment in workflow engines are often associated to the user roles. If a user accept an activity, with accept then the assignment is associated with user and other users with the same roles doesn't see this assignment anymore.

Method Summary
 void abort()
          This method abort the assignment
 void accept()
          This ensure that user in connection take the assignment
 void complete()
          This method complete the assignment
 java.lang.String getActivityDescription()
          This method return the description of the activity for the assignment
 java.lang.String getActivityKey()
          This method return the key of the activity for the assignment
 java.lang.String getActivityName()
          This method return the name of the activity for the assignment
 short getActivityPriority()
          This method return the priority of the activity for the assignment
 java.lang.String getActivityState()
          This method return the state of the activity for the assignment
 java.util.Map getContext()
          This method return the Context of the process that own the assignment
 java.lang.String getMappedForm()
          In SpagoWorkflow API an assignment can be associate to a form that must be completed to complete assignment
 java.lang.String getProcessDescription()
          This method return the description of the process at runtime
 java.lang.String getProcessKey()
          This method return return the key of the process that own the assignment
 java.lang.String getProcessName()
          This method return the name of the process that own the assignment
 java.lang.String getProcessState()
          This method return the state of the process at runtime
 boolean isAccepted()
           
 void reject()
          If an assignment have been taken and cannot be complete by a user this method can be called and the assignemnt become available to other users that can be complete it
 void setContext(java.util.Map context)
           
 

Method Detail

getProcessKey

java.lang.String getProcessKey()
                               throws WorkflowEngineException
This method return return the key of the process that own the assignment

Returns:
return the key of the process at runtime
Throws:
WorkflowEngineException - if some error occurs

getProcessName

java.lang.String getProcessName()
                                throws WorkflowEngineException
This method return the name of the process that own the assignment

Returns:
the name of the process that own the assignment
Throws:
WorkflowEngineException - if some error occurs

getProcessDescription

java.lang.String getProcessDescription()
                                       throws WorkflowEngineException
This method return the description of the process at runtime

Returns:
the description of the process that own the assignment
Throws:
WorkflowEngineException - if some error occurs

getProcessState

java.lang.String getProcessState()
                                 throws WorkflowEngineException
This method return the state of the process at runtime

Returns:
the state of the process that own the assignment
Throws:
WorkflowEngineException - if some error occurs

getActivityKey

java.lang.String getActivityKey()
                                throws WorkflowEngineException
This method return the key of the activity for the assignment

Returns:
the key of the activity for the assignment
Throws:
WorkflowEngineException - if some error occurs

getActivityName

java.lang.String getActivityName()
                                 throws WorkflowEngineException
This method return the name of the activity for the assignment

Returns:
the name of the activity for the assignment
Throws:
WorkflowEngineException - if some error occurs

getActivityDescription

java.lang.String getActivityDescription()
                                        throws WorkflowEngineException
This method return the description of the activity for the assignment

Returns:
the description of the activity for the assignment
Throws:
WorkflowEngineException - if some error occurs

getActivityPriority

short getActivityPriority()
                          throws WorkflowEngineException
This method return the priority of the activity for the assignment

Returns:
the priority of the activity for the assignment
Throws:
WorkflowEngineException - if some error occurs

getActivityState

java.lang.String getActivityState()
                                  throws WorkflowEngineException
This method return the state of the activity for the assignment

Returns:
the state of the activity for the assignment
Throws:
WorkflowEngineException - if some error occurs

isAccepted

boolean isAccepted()
                   throws WorkflowEngineException
Returns:
true if the assignment have been accepted by some user
Throws:
WorkflowEngineException - if some error occurs

complete

void complete()
              throws WorkflowEngineException
This method complete the assignment

Throws:
WorkflowEngineException - if some error occurs

abort

void abort()
           throws WorkflowEngineException
This method abort the assignment

Throws:
WorkflowEngineException - if some error occurs

getContext

java.util.Map getContext()
                         throws WorkflowEngineException
This method return the Context of the process that own the assignment

Returns:
the Context of the process that own the assignment
Throws:
WorkflowEngineException - if some error occurs

setContext

void setContext(java.util.Map context)
                throws WorkflowEngineException
Parameters:
context - the new Context to set in process
Throws:
WorkflowEngineException - if some error occurs

accept

void accept()
            throws WorkflowEngineException
This ensure that user in connection take the assignment

Throws:
WorkflowEngineException - if some error occurs

getMappedForm

java.lang.String getMappedForm()
In SpagoWorkflow API an assignment can be associate to a form that must be completed to complete assignment

Returns:
the identifier of the form related to an assignment

reject

void reject()
            throws WorkflowEngineException
If an assignment have been taken and cannot be complete by a user this method can be called and the assignemnt become available to other users that can be complete it

Throws:
WorkflowEngineException - if some error occurs