BusinessProcess

Simplicite.Ajax. BusinessProcess

Simplicité® business process.
Getting a new business process should use the Simplicite.Ajax.getBusinessProcess() function instead of this constructor

Constructor

new BusinessProcess(app, name)

Parameters:
Name Type Description
app

Application Simplicite.Ajax instance

name

Business process name

Members

activity

Description:
  • Current activity

Current activity

locals

Description:
  • Local parameters

Local parameters

metadata

Description:
  • Current meta data.

    • name: process name
    • label: name to display
    • steps: activities with transitions

Current meta data.

  • name: process name
  • label: name to display
  • steps: activities with transitions

pid

Description:
  • Current process ID

Current process ID

road

Description:
  • Screenflow of front-end activities

Screenflow of front-end activities

Methods

abort(cbk, params)

Description:
  • Abort the process

Parameters:
Name Type Description
cbk function

Optional function called when loading is completed (returns a Promise if absent)

params Object

Optional parameters

Properties
Name Type Description
async boolean

Asynchronous call (use default if absent or undefined)

error function

Custom error handler (unused by Promise with catch)

action(cbk, action, activity, params)

Description:
  • Activity common action

Parameters:
Name Type Description
cbk function

Optional function called when loading is completed (returns a Promise if absent)

action string

lock, unlock, validate, back, cancel, read, open, firstpage, lastpage, nextpage, backpage, gotopage

activity Object

Activity data

params Object

Optional parameters

Properties
Name Type Description
road boolean

true to get the full navigation array, false to get the current activity

async boolean

Asynchronous call (use default if absent or undefined)

error function

Custom error handler (unused by Promise with catch)

back()

Description:
  • Unlock the activity and read/lock the previous one

cancel()

Description:
  • Cancel the activity, returns the next activity or the forward parameters

getActivityData()

Description:
  • Get data values of the current activity

getData()

Description:
  • Get data values of a road step

getLabel()

Description:
  • Gets label name from meta data.

getMetaData(cbk, params)

Description:
  • Loads meta data.

Parameters:
Name Type Description
cbk function

Optional function called when loading is completed (returns a Promise if absent)

params Object

Optional parameters

Properties
Name Type Description
async boolean

Asynchronous call (use default if absent or undefined)

error function

Custom error handler (unused by Promise with catch)

getName()

Description:
  • Gets name from meta data.

isLoaded()

Description:
  • Are metadata loaded ?

localParameter(name, value)

Description:
  • Local parameter in instance

Parameters:
Name Type Description
name

Parameter key name

value

Optional value (to get or set)

lock()

Description:
  • Read and lock the activity { step, aid }

next()

Description:
  • Next activity = alias of validate

read()

Description:
  • Read the activity with { step, aid }

road(cbk, params)

Description:
  • Process road

Parameters:
Name Type Description
cbk function

Optional function called when loading is completed (returns a Promise if absent)

params Object

Optional parameters

Properties
Name Type Description
async boolean

Asynchronous call (use default if absent or undefined)

error function

Custom error handler (unused by Promise with catch)

setActivityData()

Description:
  • Set data values in the current activity

start(cbk, params)

Description:
  • Start a new process (or continue the screenflow)

Parameters:
Name Type Description
cbk function

Optional function called when loading is completed (returns a Promise if absent)

params Object

Optional parameters

Properties
Name Type Description
road boolean

true to get the full navigation array, false to get the current activity

object string

launcher object name

rowId boolean

launcher object row Id

async boolean

Asynchronous call (use default if absent or undefined)

error function

Custom error handler (unused by Promise with catch)

unlock()

Description:
  • Read and unlock the activity { step, aid }

validate()

Description:
  • Validate the activity with data, returns errors, the next activity or the forward parameters