Postmaster - AppDaddy-Software-Solutions-Inc/framework-markup-language GitHub Wiki

Overview

THE POSTMASTER SERVICE IS PART OF THE OFFLINE PACKAGE AND WILL BE RE-RELEASED WITH IT

The POSTMASTER service manages forms posted offline or in the background (when the internet is unavailable). Posting documents can be marked for background or offline posting by setting the background="true" attribute on the datasource.

The POSTMASTER pending table can be accessed using the LOCAL table="POST" as well as bound to using the POSTMASTER system bindings. The POSTMASTER has a janitor job that cleans up ALL forms and posts after 7 days, regardless of status. Complete posts are cleaned up after one day. Refer to the Janitor here.

The postmaster wakes up to attempt posting every 5 minutes, on startup, when the users network status toggles, as well as whenever a new post is placed in the table. The POSTMASTER attempts to post forms in a random order.

When a document is added to the POSTMASTER, it can be accessed via Android\data\com.clienturl.core\files\POST using the hidden file explorer, and the posting body edited before it is sent out, failed, or pending.

Table of Contents

Usage

The [POSTMASTER] manages all forms being sent from a mobile device. It wakes up and attempts to post on login and subsequently every 30 minutes.

Ideals:

  • To view and manage offline/online posting on mobile.

Restrictions:

  • POSTMASTER is not a widget, but a bindable interface that interacts with the POSTBROKER.
  • POSTMASTER does not interact with save(), only complete().
  • To bind to non SYSTEM variables, the post table must be called by a Datasource.
  • To edit a posting body in data, ensure the LOCAL POST table has its attempts reset to 0 and status to 1 after editing.

Bindings (POST TABLE)

Name Type Default Description Req
attempts int 0 The the number of attempts the postmaster has made to post a form.
maxattempts int 101 The maximum tries the postmaster will make before setting status to 3.
key string automatic The unique key assigned to the posting body.
status int null The status of the document. 1 is incomplete, 2 is complete, 3 is failed/error.
url string automatic The url the postmaster is attempting to post to.
date string null The initial date posted.
method string null The method used on the postbroker.
info string null The returned error if status is 1 or 3. Can be from the server or apk.