public InvocationResponse sendActivity(String target, SPFActivity activity) {
		String token = getAccessToken();
		SPFError err = new SPFError();
		InvocationResponse resp;
		try {
			getService().injectInformationIntoActivity(token, target, activity, err);
			if (!err.isOk()) {
				handleError(err);
				return InvocationResponse.error(err.toString());
			}
			resp = getService().sendActivity(token, target, activity, err);
		} catch (RemoteException e) {
			return InvocationResponse.error(e);
		}

		if (!err.isOk()) {
			handleError(err);
			resp = InvocationResponse.error(err.toString());
		}

		return resp;
	}
public InvocationResponse sendActivity(String target, SPFActivity activity) {
		String token = getAccessToken();
		SPFError err = new SPFError();
		InvocationResponse resp;
		try {
			getService().injectInformationIntoActivity(token, target, activity, err);
			if (!err.isOk()) {
				handleError(err);
				return InvocationResponse.error(err.toString());
			}
			resp = getService().sendActivity(token, target, activity, err);
		} catch (RemoteException e) {
			return InvocationResponse.error(e);
		}

		if (!err.isOk()) {
			handleError(err);
			resp = InvocationResponse.error(err.toString());
		}

		return resp;
	}
public InvocationResponse sendActivity ( String target , SPFActivity activity ) { String token = getAccessToken ( ) ; SPFError err = new SPFError ( ) ; InvocationResponse resp ; try { getService ( ) . injectInformationIntoActivity ( token , target , activity , err ) ; if ( ! err . isOk ( ) ) { handleError ( err ) ; return InvocationResponse . error ( err . toString ( ) ) ; } resp = getService ( ) . sendActivity ( token , target , activity , err ) ; } catch ( RemoteException e ) { return InvocationResponse . error ( e ) ; } if ( ! err . isOk ( ) ) { handleError ( err ) ; resp = InvocationResponse . error ( err . toString ( ) ) ; } return resp ; }
/*
(non-Javadoc)

@see it.polimi.spf.lib.async.services.execution.ServiceExecutionInterface
#sendActivity(it.polimi.spf.framework.local.SPFActivity)
/ * ( non - Javadoc )