com.tibco.bpm.web.client.services.utils
Class BPMWebClientService

java.lang.Object
  extended by net.customware.gwt.dispatch.client.AbstractDispatchAsync
      extended by com.tibco.bpm.web.client.services.utils.BPMWebClientService
All Implemented Interfaces:
net.customware.gwt.dispatch.client.DispatchAsync

public class BPMWebClientService
extends net.customware.gwt.dispatch.client.AbstractDispatchAsync

The BPMWebClientService to call in order to execute any Openspace Action.

To call the location of your AMX BPM server should first be set by calling setServiceLocation

Actions can then be executed by calling getInstance to obtain a reference to the service and then the execute can be called with the appropriate action.

Example code for calling an Action is shown below:

 BPMWebClientService.getInstance().execute(new GetToDoList(USER_ID, 0, 100, null, null),
 				new AsyncCallback<GetToDoListResult>()
				{
					public void onFailure(Throwable e)
					{
					}

					public void onSuccess(GetToDoListResult result)
					{
					}
				}); 
 

©2011 Cloud Software Group, Inc.

Since:
1.2.0

Method Summary
<A extends net.customware.gwt.dispatch.shared.Action<R>,R extends net.customware.gwt.dispatch.shared.Result>
void
execute(A action, com.google.gwt.user.client.rpc.AsyncCallback<R> callback)
          Execute the specified Action.
<A extends net.customware.gwt.dispatch.shared.Action<R>,R extends net.customware.gwt.dispatch.shared.Result>
void
executeLogin(A action, com.google.gwt.user.client.rpc.AsyncCallback<R> callback)
          Execute the specified Action.
 com.google.gwt.event.shared.EventBus getEventBus()
           
static BPMWebClientService getInstance()
          Return the instance of the BPMWebClientService to use in subsequent calls to execute
 void setEventBus(com.google.gwt.event.shared.EventBus eventBus)
           
static void setServiceLocation(java.lang.String serviceLocation)
          Call this method to set the URL for your AMX BPM server.
 
Methods inherited from class net.customware.gwt.dispatch.client.AbstractDispatchAsync
onFailure, onSuccess
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setServiceLocation

public static void setServiceLocation(java.lang.String serviceLocation)
Call this method to set the URL for your AMX BPM server.

This method should be called once before attempting to call execute

Parameters:
serviceLocation - Location of the AMX BPM server (i.e. "http://localhost:8080/bpm")

getInstance

public static BPMWebClientService getInstance()
Return the instance of the BPMWebClientService to use in subsequent calls to execute

Returns:
instance of the service.

execute

public <A extends net.customware.gwt.dispatch.shared.Action<R>,R extends net.customware.gwt.dispatch.shared.Result> void execute(A action,
                                                                                                                                 com.google.gwt.user.client.rpc.AsyncCallback<R> callback)
Execute the specified Action.

Parameters:
action - Instance of the Action to be called.
callback - AsyncCallback to handle the onSuccess or onFailure result of the Action. The specified action is executed by the dispatcher servlet.

The callback function has either onSuccess or onFailure called depending on the outcome of the call.

onSuccess will be called with the appropriate Result type for the action contain the results of the call.

onFailure will be called with an exception giving details of the failure.


executeLogin

public <A extends net.customware.gwt.dispatch.shared.Action<R>,R extends net.customware.gwt.dispatch.shared.Result> void executeLogin(A action,
                                                                                                                                      com.google.gwt.user.client.rpc.AsyncCallback<R> callback)
Execute the specified Action.

Parameters:
action - Instance of the Action to be called.
callback - AsyncCallback to handle the onSuccess or onFailure result of the Action. The specified action is executed by the dispatcher servlet.

The callback function has either onSuccess or onFailure called depending on the outcome of the call.

onSuccess will be called with the appropriate Result type for the action contain the results of the call.

onFailure will be called with an exception giving details of the failure.


getEventBus

public com.google.gwt.event.shared.EventBus getEventBus()

setEventBus

public void setEventBus(com.google.gwt.event.shared.EventBus eventBus)


Copyright © 2015 Cloud Software Group, Inc. All Rights Reserved.