Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    sendQueue

    v9.0p_2014-02-28/EVAL Deployment 2014-02-28

    Whether it is possible to do so:

    Code:
    boolean mainQueuing = RPCManager.startQueue();
    
    boolean firstQueuing = RPCManager.startQueue();
    // UPDATE dataSource operations
    if (!firstQueuing) RPCManager.sendQueue(firstCallback);
    
    boolean secondQueuing = RPCManager.startQueue();
    // INSERT dataSource operations
    if (!secondQueuing) RPCManager.sendQueue(secondCallback);
    
    if (!mainQueuing) RPCManager.sendQueue(mainCallback);
    If Yes.
    I get 2 RPCResponse in mainCallback ?
    If Yes.
    mainCallback:
    RPCResponse[i].getStatus() == RPCResponse.STATUS_SUCCESS
    Only if all UPDATE or INSERT operations were successful?

    Sorry for the stupid question

    #2
    Can you please confirm the following, specifically the comment "// Will every response[i].getStatus() be the same?".

    Thanks

    Code:
            RPCQueueCallback callback = new RPCQueueCallback() {
    
                    @Override
                    public void execute(RPCResponse... responses) {
                        // Will every response[i].getStatus() be the same?
                    }
            };
            RPCManager.startQueue();
            RPCRequest requestParams = new RPCRequest();
            requestParams.setWillHandleError(true);
            for (int i = 0; i < parameterArray.length; i++) {
                Object[] parameters = parameterArray[i];
                DMI.call("applID", "className", "methodName", null, parameters, requestParams);
            }
            RPCManager.sendQueue(callback);

    Comment


      #3
      No, definitely not. If some of those requests fail, they will having failing status code while others may succeed.

      Comment


        #4
        Excellent. Thank you.

        Comment

        Working...
        X