org.ow2.orchestra.facade
Interface InstanceManagementAPI

All Known Subinterfaces:
RemoteDeployerMBean

public interface InstanceManagementAPI

Manage a process instance.

Author:
Guillaume Renault

Method Summary
 void exit(ProcessInstanceUUID processInstanceUUID)
          Exit the given instance.
 List<JobData> findJobsWithException()
          Get the list of asynchronous executions for which all the tries have failed and which will not be executed any more.
 List<PendingMessageData> getPendingMessages()
          Get the list of messages received by the engine but not yet associated with any execution.
 boolean remove(ProcessInstanceUUID processInstanceUUID)
          To delete monitoring information on the process instance.
 void removePendingMessage(PendingMessageData message)
          Remove the message from the list of messages received by the engine but not yet associated with any execution.
 void resume(ProcessInstanceUUID processInstanceUUID)
          Resume a previously suspend instance of a process.
 void retryJob(JobData job, int retries)
          Reschedules a job (asynchronous execution).
 void suspend(ProcessInstanceUUID processInstanceUUID)
          Suspend the given instance of a process.
 

Method Detail

exit

void exit(ProcessInstanceUUID processInstanceUUID)
          throws InstanceNotFoundException
Exit the given instance.

Parameters:
processInstanceUUID - the Id of the instance to exit.
Throws:
InstanceNotFoundException - thrown if the given instance to exit is not found.

resume

void resume(ProcessInstanceUUID processInstanceUUID)
            throws InstanceNotFoundException
Resume a previously suspend instance of a process.

Parameters:
processInstanceUUID - the process instance UUID that identify the instance to resume.
Throws:
InstanceNotFoundException - thrown if the given instance to resume is not found.

suspend

void suspend(ProcessInstanceUUID processInstanceUUID)
             throws InstanceNotFoundException
Suspend the given instance of a process.

Parameters:
processInstanceUUID - the process instance UUID that identify the instance to suspend.
Throws:
InstanceNotFoundException - thrown if the given instance to suspend is not found.

remove

boolean remove(ProcessInstanceUUID processInstanceUUID)
To delete monitoring information on the process instance.

Parameters:
processInstanceUUID - the process instance UUID that identify the instance to suspend.
Returns:
true if the instance has been successfully deleted otherwise returns false.

findJobsWithException

List<JobData> findJobsWithException()
Get the list of asynchronous executions for which all the tries have failed and which will not be executed any more.


retryJob

void retryJob(JobData job,
              int retries)
              throws JobNotFoundException
Reschedules a job (asynchronous execution). The job executor will try to execute the job at most retries times. If the job fails for each retry, then the job executor will not try to execute it unless this method is called again for this job.

Parameters:
job - the job to retry.
retries - the number of retries to set for the job.
Throws:
JobNotFoundException - if job does not exist.

getPendingMessages

List<PendingMessageData> getPendingMessages()
Get the list of messages received by the engine but not yet associated with any execution.

Returns:

removePendingMessage

void removePendingMessage(PendingMessageData message)
Remove the message from the list of messages received by the engine but not yet associated with any execution.

Parameters:
message -


Copyright © 2011 OW2 Consortium. All Rights Reserved.