* @return
* @throws WorkflowException
*/
public synchronized boolean invoke() throws WorkflowException {
try {
WSIFMessage inputMessage = this.invoker.getInputs();
logger.debug("inputMessage: " + XMLUtil.xmlElementToString((XmlElement) inputMessage));
this.notifier.invokingService(inputMessage);
ExecutorService executor = Executors.newSingleThreadExecutor();
this.result = executor.submit(new Callable<Boolean>() {
@SuppressWarnings("boxing")
public Boolean call() {
try {
boolean success = GenericInvoker.this.invoker.invoke();
if (success) {
// Send notification
WSIFMessage outputMessage = GenericInvoker.this.invoker.getOutputs();
// An implementation of WSIFMessage,
// WSIFMessageElement, implements toString(), which
// serialize the message XML.
logger.debug("outputMessage: " + outputMessage);
GenericInvoker.this.notifier.serviceFinished(outputMessage);
} else {
//if error occurse gfac-axis2 write the error in to output not to the fault
WSIFMessage faultMessage = GenericInvoker.this.invoker.getOutputs();
// An implementation of WSIFMessage,
// WSIFMessageElement, implements toString(), which
// serialize the message XML.
logger.debug("received fault: " + faultMessage);
GenericInvoker.this.notifier.receivedFault(faultMessage);