sfload command

sfload is the command for loading data. Please type 'help sfload' inside soagg-manage console and you will get help about this command.

multiplatform UI


Single load command

Below is example of loading data individually.
Below command will ask the server to load business rules contained in the csv file given in argument.


> sfload --type manageBusinessRule --input-file-path  local-file:/foundation/cdata/base-business-rules.csv 
--attachments-path local-folder:/foundation/cdata/businessRules									
									

Scripting

Below is example of batch script used to load foundattion datas into remote backend server.

  • Each line is executed by the shell and an http call is done to send command and datas to the remote server.
  • Then a batch job is executed in the server side
  • If the job fails, then script will also fail
  • If one command fails, then script will also fail


ping

# GENERAL SCRIPT CONFIGURATION
set-script-exit-on-file-error true
set-script-exit-on-rest-error true

# Fail if there is a pending installation in database, with same name and version
# Database must be reinitialized because SQL script will is not recoverable.
set-script-fail-on-pending-installation false


# CHECK VERSION AND EXIT IF ALREADY INSTALLED
# will doc system.exit if already installed
# IF the status is FAILED, the process can re-runed
# And will update the current version status
sfscript-check-data-patch-version local-file:/foundation/data-patch-version.txt


# pre-init
sfscript --script-file local-file:/foundation/cscript/$database/preInstallVersion.sql


# load datas
login epadmin epadmin


# TODO Add notification in server side on the status of datapath intallation change
sfscript-create-data-patch local-file:/foundation/data-patch-version.txt


sfload --type manageContentFormat --input-file-path  local-file:/foundation/cdata/contentFormat.csv

sfload --type manageType --input-file-path  local-file:/foundation/cdata/types.csv
sfload --type manageLinksConstraints --input-file-path  local-file:/foundation/cdata/link-constraints.csv

sfload --job installApplicationContainer --input-file-path  local-file:/foundation/cdata/applicationContainer.csv
sfload --type installEpAdmin --input-file-path  local-file:/foundation/cdata/party/epadmin.csv

sfload --type manageListValues --input-file-path  local-file:/foundation/cdata/listvalues.csv
sfload --type manageListValues --input-file-path  local-file:/foundation/cdata/listvalues/preferencesListvalues.csv
sfload --type manageListValues --input-file-path  local-file:/foundation/cdata/listvalues/documentListValues.csv
sfload --type manageListValues --input-file-path  local-file:/foundation/cdata/listvalues/elementListValues.csv
sfload --type manageStandardEntity --input-file-path  local-file:/foundation/cdata/permissions.csv
sfload --type manageStandardEntity --input-file-path  local-file:/foundation/cdata/rolePermissions.csv


sfload --type manageViewDef --input-file-path  local-file:/foundation/cdata/views/loginFormViewDefinition.csv 
	--attachments-path local-folder:/foundation/cdata/views/login
sfload --type manageViewDef --input-file-path  local-file:/foundation/cdata/views/lostPassFormViewDefinition.csv 
--attachments-path local-folder:/foundation/cdata/views/lostpassword

sfload --type manageViewDef --input-file-path  local-file:/foundation/cdata/views/registerUserFormViewDefinition.csv 
--attachments-path local-folder:/foundation/cdata/views/register

sfscript --script-file local-file:/foundation/cscript/$database/postInstallVersion.sql

# end installation
# add notification in server side business on the status
# of datapath intallation change
sfscript-set-data-patch-install-status installed local-file:/foundation/data-patch-version.txt
logout