it.eng.spago.workflow.api
Interface IWorkflowConnection


public interface IWorkflowConnection

Author:
zoppello This is a very important interface because it's the core interface that a spago application must use to work with workflow engine. With this interface it's possible to:

Method Summary
 void close()
          Interrupt the connection with the engine
 IWorkflowProcess createProcess(java.lang.String workflowPackageID, java.lang.String workflowID)
          Crate an instance of the Process with the given packageId and workflowId
 IWorkflowProcess createProcessWithInitialContext(java.lang.String workflowPackageID, java.lang.String workflowID, java.util.Map context)
          Crate an instance of the Process with the given packageId and workflowId and the given context
 void deleteProcess(IWorkflowProcess process)
          Delete a process instance from the engine
 java.util.List getAllWorkflowProcessDefinition()
          The list of the Workflow defintion object in the system
 java.util.List getAssignments()
          The List assignemt activity associated with the user that has establishe the connection
 java.util.List getProcessForPackage(IWorkflowPackage pkg)
          Given the package identifier return the list of the runtime process for the package
 IWorkflowAssignment getWorkflowAssignment(java.lang.String activityId)
          List assignemt activity associated with the user that has establishe the connection
 java.util.List getWorkflowProcessDefinition(IWorkflowPackage pkg)
           
 void open(java.lang.String userId, java.lang.String userPassword)
          This method establish the connection with the engine using the user and passord credential
 

Method Detail

open

void open(java.lang.String userId,
          java.lang.String userPassword)
          throws WorkflowEngineException
This method establish the connection with the engine using the user and passord credential

Parameters:
userId - The user etsablishing connection with the engine
userPassword - The password of the user etsablishing connection with the engine
Throws:
WorkflowEngineException - if some errors occurs

createProcess

IWorkflowProcess createProcess(java.lang.String workflowPackageID,
                               java.lang.String workflowID)
                               throws WorkflowEngineException
Crate an instance of the Process with the given packageId and workflowId

Parameters:
workflowPackageID - The package Identifier
workflowID - The workflow identifier
Returns:
The instance of the IWorkflowProcess representing the process instance
Throws:
WorkflowEngineException - if some errors occurs

createProcessWithInitialContext

IWorkflowProcess createProcessWithInitialContext(java.lang.String workflowPackageID,
                                                 java.lang.String workflowID,
                                                 java.util.Map context)
                                                 throws WorkflowEngineException
Crate an instance of the Process with the given packageId and workflowId and the given context

Parameters:
workflowPackageID - The package Identifier
workflowID - The workflow identifier
context - the initial context of the process
Returns:
The instance of the IWorkflowProcess representing the process instance, intialized with the given context
Throws:
WorkflowEngineException - if some errors occurs

getAssignments

java.util.List getAssignments()
                              throws WorkflowEngineException
The List assignemt activity associated with the user that has establishe the connection

Returns:
The List assignemt activity associated with the user that has establishe the connection
Throws:
WorkflowEngineException - if some errors occurs

close

void close()
           throws WorkflowEngineException
Interrupt the connection with the engine

Throws:
WorkflowEngineException

getWorkflowAssignment

IWorkflowAssignment getWorkflowAssignment(java.lang.String activityId)
                                          throws WorkflowEngineException
List assignemt activity associated with the user that has establishe the connection

Parameters:
activityId - The activity Id
Returns:
The List assignemt activity associated with the user that has establishe the connection
Throws:
WorkflowEngineException - if some errors occurs
WorkflowEngineException

getProcessForPackage

java.util.List getProcessForPackage(IWorkflowPackage pkg)
                                    throws WorkflowEngineException
Given the package identifier return the list of the runtime process for the package

Parameters:
pkg - The package identifier
Returns:
the list of the runtime process for the package
Throws:
WorkflowEngineException

deleteProcess

void deleteProcess(IWorkflowProcess process)
                   throws WorkflowEngineException
Delete a process instance from the engine

Parameters:
process - the process to delete
Throws:
WorkflowEngineException

getAllWorkflowProcessDefinition

java.util.List getAllWorkflowProcessDefinition()
                                               throws WorkflowEngineException
The list of the Workflow defintion object in the system

Returns:
the list of th IWorkflowDefinition objects in the engine
Throws:
WorkflowEngineException

getWorkflowProcessDefinition

java.util.List getWorkflowProcessDefinition(IWorkflowPackage pkg)
                                            throws WorkflowEngineException
Parameters:
pkg - The IWorkflowPackage
Returns:
the list of the IWorkflowDefinition objects in the engine for the given package
Throws:
WorkflowEngineException