BusinessProcess

Simplicite.Ajax. BusinessProcess

new BusinessProcess(app, name)

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

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

next

Description:
  • Next activity = validate

Next activity = validate

pid

Description:
  • Current process ID

Current process ID

road

Description:
  • Screenflow of front-end activities

Screenflow of front-end activities

Methods

action(callback, action, activity, params)

Description:
  • Activity common action

Parameters:
Name Type Description
callback

optional callback on server response

action

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

activity

Activity file

params

Options

  • async: Asynchronous call (use default if absent) ?
  • error: Custom error handler (use default error handler if absent) ?
  • road: true to get the full navigation array, false to get the current activity

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(callback, params)

Description:
  • Loads meta data.

Parameters:
Name Type Description
callback

Callback function called when loading is completed

params

Optional parameters

  • async: Asynchronous call (use default if absent) ?
  • error: Custom error handler (use default error handler if absent) ?

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 }

read()

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

setActivityData()

Description:
  • Set data values in the current activity

start(callback, params)

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

Parameters:
Name Type Description
callback

optional callback on server response

params

Options

  • async: Asynchronous call (use default if absent) ?
  • error: Custom error handler (use default error handler if absent) ?
  • road: true to get the full navigation array, false to get the current activity
  • object: launcher object name
  • rowId: launcher object id

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