com.ibm.bpe.api

Interface ReplyContext

All Superinterfaces:
java.io.Serializable

  1. public interface ReplyContext
  2. extends java.io.Serializable
This interface supports an asynchronous mode of operation. A reply context has to be provided for callWithReplyContext methods.

A client that uses these API methods has to create an object that implements the ReplyContext interface so that the process engine knows where to send results to. When a process instance that was started via the callWithReplyContext() API reaches its end, the process engine calls replyProcessResult() or replyException() depending on the result of processing. It is the responsibility of the implementation of this interface to perform the necessary actions in order to inform the caller about the result of processing.

Since:
5.0

Field Summary

Modifier and Type Field and Description
  1. static
  2. java.lang.String
COPYRIGHT
  1. static
  2. long
serialVersionUID

Method Summary

Modifier and Type Method and Description
  1. void
replyException(int processState,java.lang.String processInstanceName,java.lang.Exception exception)
Signals the unsuccessful execution of a process.
  1. void
replyProcessResult(int processState,java.lang.String processInstanceName,java.lang.Object resultMessage)
Signals the successful end of process execution and returns an output message.

Field Detail

  1. static final java.lang.String COPYRIGHT
See Also:

serialVersionUID

  1. static final long serialVersionUID
See Also:

Method Detail

replyProcessResult

  1. void replyProcessResult(int processState,
  2. java.lang.String processInstanceName,
  3. java.lang.Object resultMessage)
  4. throws SendReplyErrorException
Signals the successful end of process execution and returns an output message. For an unsuccessful processing, refer to the replyException method.
Parameters:
processState - The final state of the process instance, either finished, failed, terminated, or compensated.
processInstanceName - The name of the process instance.
resultMessage - The output message that represents the result of execution.
Throws:
SendReplyErrorException - if the process instance result cannot be returned.

replyException

  1. void replyException(int processState,
  2. java.lang.String processInstanceName,
  3. java.lang.Exception exception)
  4. throws SendReplyErrorException
Signals the unsuccessful execution of a process. That is, either returns a fault message or signals that a system exception terminated process instance execution. Successful completion messages are returned using the replyProcessResult method.
Parameters:
processState - The state of the process instance.
processInstanceName - The name of the process instance.
exception - The exception that terminated processing. Can be any subclass of ProcessException or ProcessError or one of its subclasses.
Throws:
SendReplyErrorException - if the exception cannot be returned.