src/application/action-builder.js
function _dispatchServiceResponse({ node, type, status, callerId }, json) {
    const isMultiNode = Array.isArray(node);
    const data = isMultiNode ? json : { [node]: json };
    const postStatus = { name: status, isLoading: false };
    let newStatus = {};
    if (isMultiNode) {
        node.forEach((nd) => { newStatus[nd] = postStatus; });
    } else {
        newStatus[node] = postStatus;
    }
    dispatcher.handleServerAction({
        data,
        type,
        status: newStatus,
        callerId
    });

    // Update information similar to store::afterChange
    return {
        properties: Object.keys(data),
        data,
        status: newStatus,
        informations: { callerId }
    };
}
function _dispatchServiceResponse({ node, type, status, callerId }, json) {
    const isMultiNode = Array.isArray(node);
    const data = isMultiNode ? json : { [node]: json };
    const postStatus = { name: status, isLoading: false };
    let newStatus = {};
    if (isMultiNode) {
        node.forEach((nd) => { newStatus[nd] = postStatus; });
    } else {
        newStatus[node] = postStatus;
    }
    dispatcher.handleServerAction({
        data,
        type,
        status: newStatus,
        callerId
    });

    // Update information similar to store::afterChange
    return {
        properties: Object.keys(data),
        data,
        status: newStatus,
        informations: { callerId }
    };
}
function _dispatchServiceResponse ( { node , type , status , callerId } , json ) { const isMultiNode = Array . isArray ( node ) ; const data = isMultiNode ? json : { [ node ] : json } ; const postStatus = { name : status , isLoading : false } ; let newStatus = { } ; if ( isMultiNode ) { node . forEach ( ( nd ) => { newStatus [ nd ] = postStatus ; } ) ; } else { newStatus [ node ] = postStatus ; } dispatcher . handleServerAction ( { data , type , status : newStatus , callerId } ) ; // Update information similar to store::afterChange return { properties : Object . keys ( data ) , data , status : newStatus , informations : { callerId } } ; }
Method call after the service call.
@param {object} config Action builder config.
@param {object} json  The data return from the service call.
@returns {promise} Update information.
Method call after the service call .