stSoftware
12 Beaconsfield St | Newport, New South Wales 2106 | 1300 78 73 78

stSoftware blog


How compatible are the template Progressive Web App ( PWA)?
22 Jun 2016

Below is the current lightouse report for the template app-contract-list

Read More

How is the PWA manifest generated?
22 Jun 2016

Once the site is marked as a "Progressive Web App" a new tab will be displayed "Manifest". This allows the developer to change the default values.

Read More

How are user timezones detected?
11 Jun 2016

The user's timezone can't be detected by a ReST call itself. The client's public IP addresses we can be used in combination with freegeoip.net ReST service to find a rough location. When a client logs into the system, the client's timezone is passed as a parameter in the ReST call /v1/auth/login/{username}. The web pages that use the library jstz to detect the timezone and then does log-in via ReST. We remember the user's timezone in the database session record.

Read More

How to install spell checker
10 May 2016

Summary To enable spell checker, the package 'aspell' needs to be installed on the server side. TinyMCE calls a web service 'v1/spell' to check spelling and store words in the user's dictionary. Usage When the user clicks the spell check button the text is sent to the server via the web service 'v1/spell' and resulting errors and suggestions are sent back and highlighted for the user. Web Service A web service "v1/spell" allows for the checking of misspelled words and maintenance of the user's private...

Read More

How to synchronize data between stSoftware server and an external system.
26 Apr 2016

Summary A client program calls the stSoftware server with the /v6/sync/{className} ReST service for the class name that is required to be sync'd to an external system. The since parameter controls which record changes will returned. Initially the program starts with a default value for since, once the result set of the changed records has been scrolled through a new value of since will be returned from the server. The returned since is the server time of the last change returned. For each record... package com.aspc; import org.apache.commons.logging.Log; import com.aspc.remote.rest.ReST; import com.aspc.remote.rest.Response; import com.aspc.remote.rest.Status; import com.aspc.remote.rest.errors.ReSTException; import com.aspc.remote.util.misc.CLogger; import javax.annotation.Nonnegative; import javax.annotation.Nonnull; import org.json.JSONArray; import org.json.JSONObject; /** * SampleSync * * The SampleSync program implements an application that simply make ReST call * to Job class and log the results. * * @author parminder */ public class SampleSync { private final String host; private final String username; private final String password; private static final Log LOGGER = CLogger.getLog("src.main.java.com.aspc.SampleSync");//#LOGGER-NOPMD public SampleSync(final @Nonnull String host, final @Nonnull String username, final @Nonnull String password) { this.host = host; this.username = username; this.password = password; } /** * Loop forever scanning for new or changed jobs. * * @param scanFrom from what time should we scan * * @throws Exception a non temporary issue has occurred. */ @SuppressWarnings("SleepWhileInLoop") public void scan(final @Nonnegative String scanFrom) throws Exception { String since = scanFrom; while (true) { try { since = process(since); } catch (ReSTException re) { switch (re.status) { case C500_SERVER_INTERNAL_ERROR: case C503_SERVICE_UNAVAILABLE: case C521_WEB_SERVER_IS_DOWN: case C599_TIMED_OUT_SERVER_NETWORK_CONNECT: LOGGER.warn("scan failed, retrying", re); Thread.sleep((long) (120000 * Math.random()) + 1); default: LOGGER.error("Permanent issue", re); throw re; } } } } /** * * @param since the time to scan from. * * @return the last transaction time of any record on the server. * * @throws Exception a issue as occurred. */ public @Nonnull String process(final @Nonnull String since) throws Exception { long nextSince; String callURL = "/ReST/v6/sync/Job"; while (true) { ReST.Builder b = ReST.builder(host + callURL) .setAuthorization(username, password) .setParameter("since", since) .setParameter("block", "2 minute"); JSONObject json = b.getResponseAndCheck().getContentAsJSON(); JSONArray resultsArray = json.getJSONArray("results"); int arrayLength = resultsArray.length(); for (int pos = 0; pos < arrayLength; pos++) { JSONObject transaction = resultsArray.getJSONObject(pos); processJob(transaction.getString("_href")); } if (json.has("next")) { callURL = json.getString("next"); } else { nextSince = json.getLong("since"); break; } } assert nextSince > 0; return Long.toString(nextSince); } /** * * @param call ReST URL * * @throws Exception */ private void processJob(final @Nonnull String call) throws Exception { JSONObject json; Response r = ReST .builder(host + call) .setAuthorization(username, password) .getResponse(); if (r.status == Status.C404_ERROR_NOT_FOUND) { LOGGER.info(r.status); } r.checkStatus(); json = r.getContentAsJSON(); // DO STUFF LOGGER.info(json.toString(2)); } }

Read More

How to set order your products in store
3 Apr 2016

1. Set a sequence on Selling Details tab to order this product: This sequence will be used in "All" category 2. Set the sequences on Categories tab to set the order of this product in any categories: This sequences will be used in the corresponding categories

Read More

All stSoftware's web services are published with interactive documentation.
30 Mar 2016

All stSoftware's web services are published using Swagger which gives interactive documentation, client SDK generation and discoverability. Below are all the standard RESTful web services and how to use them.

Read More

How to hide menu items
21 Mar 2016

Mark the menu as "Inactive" Refresh menu ( "QuickStart" will be hidden)

Read More

How to disable unused modules
21 Mar 2016

There are many modules enabled by default. This leads to screen clutter. Disabling the modules that are not used will lead to less user confusion and screen clutter. Navigate to "Admin->Settings-Modules" Disable the module Refresh task screen and the "Timesheet" tab will be gone

Read More

How to create a ReST magic number?
2 Feb 2016

To set up a new API key for a ReST service:- Choose the ReST service to create the API key for ( steps 1-3) Open the data entry screen for the selected service ( step 4) Select the "security" tab ( step 5 ) Create a new magic number ( step 6) Choose the user access to use for this service and press OK ( step 7-8) The demonstration system can be used to try out the ReST services. https://demo2.jobtrack.com.au/magic/3101/A5AE-9806

Read More

How to build and edit email template in minutes.
20 Jan 2016

How to build/edit template Navigate to Emails > Templates Select the template to edit or create new one. Fetch data from the database Data from the system can be added to the template subject or body using field tokens. The token format is ${object.field} Object can be: recipient, sender, target or globals. Use the recipient object to fetch data from the current recipient you send the email to. Use the sender object to fetch data from the current sender of this email. Use the target object to fetch...

Read More

How to retrieve forgotten passwords?
19 Nov 2015

Steps Enter your email, phone number or user name Choose associated email or phone Wait for email or SMS Enter the confirmation code Enter your new password

Read More

How to enable desktop notification?
11 Nov 2015

When you get a new desktop notification, your browser will ask for your permission to show the desktop notification by default. Chrome: Click the "Allow" button in the pop up Firefox: Select "Always Show Notifications" You can always change the notification permissions for a site. Chrome: go to Settings click the "Show advanced settings" link at bottom click the "Content settings" button in Privacy section scroll down to "Notification" section click the "Manage exceptions..." button Firefox: Open...

Read More

How to set up Google Analytics tracking
29 Oct 2015

To set up Google Analytics tracking of your web site. Log into you Google Analytics account. Create a new Tracking ID Switch to the SEO tab in the web site and enter the Tracking ID All standard templates will automatically create the Google tracking script when a tracking ID is entered and not in design mode.

Read More

Journal tab performance enhancements
7 Oct 2015

New in version 8 of the standard screens is asynchronously loading of log history. The log tab will now appear almost instantly, no matter how many journal entries.

Read More

Hosting Service Level Agreement (SLA)
29 Sep 2015

Back-ups & Redundancy All databases are backed up and transferred off site nightly. As part of the document storage process files have a SHA-1 (Secure Hash Algorithm 1) hash calculated and then the files are compressed and encrypted. The SHA-1 and the encryption keys are stored in the client's database. The compressed encrypted documents are stored on multiple file server nodes in the cluster. Each night the encrypted documents are replicated off site. Disaster Recovery We can provide Disaster Recovery...

Read More

What are my IP rights?
29 Sep 2015

Summary stSoftware's award winning patented multi-layered database structure separates generic and custom client code and data into different database layers. The code and data held in the Client App Layer and the Client Data Layer are the intellectual property (IP) of the client. The code and data held in the st Engine/App Layers are the IP of stSoftware. The multi-layered database structure provides more than a designation of IP, they are integral to customising a generic solution which is rapid...

Read More

What is the stSoftware deployment process?
15 Sep 2015

Summary The stSoftware incremental upgrade process consists of a continuous integration system and three separate staged environments. Continuous integration system Main steps:- Checks out the current code and databases Cleans the databases Creates the release. ~6,500 automated tests are run. If ALL automated tests past then the release is then promoted for distribution. Distribution occurs Sunday -> Thursday to the Edge environment. Environments A release is firstly built and tested by the continuous...

Read More

stServer suggested Java arguments
27 Aug 2015

Below are the standard JVM server parameters. G1 Garbage Collector -XX:+UseG1GC Turn on the G1 garbage collector. -XX:MaxGCPauseMillis=250 Target a maximum pause time of no more than 250 milliseconds. Young Generation -XX:PermSize=256m The size of the permanent size. -XX:MaxPermSize=256m Set the max and start size of the permanent memory segment. DO NOT over tune the G1GC by setting -XX:NewSize=512m -XX:MaxNewSize=512m -XX:SurvivorRatio=2 Logging Options -verbose:gc Verbosely log the garbage collection...

Read More

How to check your ReST service returns expected format/values?
14 Aug 2015

You can view all the ReST services and their details via CMS/RESTful API You can also try or edit a ReST service here To set up a sanity check for a ReST service, click the "Edit" button, and go to "Sanity" tab Click "Add" button to add a new sanity check or click one check to edit it. Enter the additional path, and all parameters, the results section will show you the response status and response JSON Click "Add" button in the "Checks" section to add one check for this sanity check. Enter the JSON...

Read More