Class: Service

Service

Represents the description of a service in the workflow


new Service(id)

Construct a Service object just by giving the id.
If you want to provide other parameters, use the setters.

Parameters:
Name Type Description
id number
Source:

Members


alt :number

The alternative group of the service.
Used for adaptiveness.

Type:
  • number
Source:

description

Source:

dst :Array.<Service>

Destinations dependencies of the service.

Type:
Source:

dstControl :Array.<Service>

Destinations (control) dependencies of the service.

Type:
Source:

id :number

Type:
  • number
Source:

in :Array.<string>

The parameter(s) of the service command.

Type:
  • Array.<string>
Source:

name :string

Type:
  • string
Source:

src :Array.<Service>

Sources dependencies of the service.

Type:
Source:

srcControl :Array.<Service>

Sources (control) dependencies of the service.

Type:
Source:

srv :string

The command of the service.

Type:
  • string
Source:

sup :number

The supervised group of the service.
Used for adaptiveness.

Type:
  • number
Source:

Methods


addDst(service)

Add a new dstination in the array of dstinations of the service.

Parameters:
Name Type Description
service Service

The service to add to the array of destinations

Source:
Returns:

The updated Service

Type
Service

addDstControl(service)

Add a new destination (control) in the array of destinations control of the service.

Parameters:
Name Type Description
service Service

The service to add to the array of destinations (control)

Source:
Returns:

The updated Service

Type
Service

addSrc(service)

Add a new source in the array of sources of the service.

Parameters:
Name Type Description
service Service

The service to add to the array of sources

Source:
Returns:

The updated Service

Type
Service

addSrcControl(service)

Add a new source (control) in the array of sources control of the service.

Parameters:
Name Type Description
service Service

The service to add to the array of sources (control)

Source:
Returns:

The updated Service

Type
Service

getAlt()

Get the alt group of the service.

Source:
Returns:

The alt group

Type
number

getDescription()

Get the description of the service.

Source:
Returns:

The description of the service

Type
string

getDst(index)

Get a specific element from the array of destinations of the service.

Parameters:
Name Type Description
index number

The index of the element

Source:
Returns:

The service placed in the position index of the array

Type
Service

getDstControl(index)

Get a specific element from the array of destinations (control) of the service.

Parameters:
Name Type Description
index number

The index of the element

Source:
Returns:

The service placed in the position index of the array

Type
Service

getDstControls()

Get the array of destinations (control) of the service.

Source:
Returns:

The array of destinations (control)

Type
Array.<Service>

getDsts()

Get the array of destinations of the service.

Source:
Returns:

The array of destinations

Type
Array.<Service>

getId()

Get the id of the service.

Source:
Returns:

The id

Type
number

getIn()

Get the in parameter of the service.

Source:
Returns:

The in parameter

Type
Array.<string>

getName()

Get the name of the service.

Source:
Returns:

The name

Type
string

getSrc(index)

Get a specific element from the array of sources of the service.

Parameters:
Name Type Description
index number

The index of the element

Source:
Returns:

The service placed in the position index of the array

Type
Service

getSrcControl(index)

Get a specific element from the array of sources (control) of the service.

Parameters:
Name Type Description
index number

The index of the element

Source:
Returns:

The service placed in the position index of the array

Type
Service

getSrcControls()

Get the array of sources (control) of the service.

Source:
Returns:

The array of sources (control)

Type
Array.<Service>

getSrcs()

Get the array of sources of the service.

Source:
Returns:

The array of sources

Type
Array.<Service>

getSrv()

Get the srv of the service.

Source:
Returns:

The srv

Type
string

getSup()

Get the sup group of the service.

Source:
Returns:

The sup group

Type
number

removeDstControls()

Remove all destinations (control) of the service.

Source:
Returns:

The updated Service

Type
Service

removeDsts()

Remove all destinations of the service.

Source:
Returns:

The updated Service

Type
Service

removeServiceFromDst(id)

Remove service with a specific id from destinations of the current service.
If the service id does not exist, nothing happens.

Parameters:
Name Type Description
id number

The id of the service which will be removed from destinations of the current service

Source:
Returns:

The updated service

Type
Service

removeServiceFromDstControl(id)

Remove service with a specific id from destinations (control) of the current service.
If the service id does not exist, nothing happens.

Parameters:
Name Type Description
id number

The id of the service which will be removed from destinations (control) of the current service

Source:
Returns:

The updated service

Type
Service

removeServiceFromSrc(id)

Remove service with a specific id from sources of the current service.
If the service id does not exist, nothing happens.

Parameters:
Name Type Description
id number

The id of the service which will be removed from sources of the current service

Source:
Returns:

The updated service

Type
Service

removeServiceFromSrcControl(id)

Remove service with a specific id from sources (control) of the current service.
If the service id does not exist, nothing happens.

Parameters:
Name Type Description
id number

The id of the service which will be removed from sources (control) of the current service

Source:
Returns:

The updated service

Type
Service

removeSrcControls()

Remove all sources (control) of the service.

Source:
Returns:

The updated Service

Type
Service

removeSrcs()

Remove all sources of the service.

Source:
Returns:

The updated Service

Type
Service

setAlt(newAlt)

Set a new alt group for a service.

Parameters:
Name Type Description
newAlt number

The new alt group for the service

Source:
Returns:

The updated Service

Type
Service

setDescription(newDescription)

Set the description of the service.

Parameters:
Name Type Description
newDescription string

The new description of the service

Source:
Returns:

The updated service

Type
Service

setDst(index, newService)

Set a new Service at a specific position of the array of destinations of the service.

Parameters:
Name Type Description
index number

The index where the element will replace the old Service

newService Service

The new service

Source:
Returns:

The updated service

Type
Service

setDstControl(index, newService)

Set a new Service at a specific position of the array of destinations (control) of the service.

Parameters:
Name Type Description
index number

The index where the element will replace the old Service

newService Service

The new service

Source:
Returns:

The updated service

Type
Service

setDstControls(newDstControls)

Set a new array of destinations (control) for a service.

Parameters:
Name Type Description
newDstControls Array.<Service>

The new array of destinations (control) for the service

Source:
Returns:

The updated Service

Type
Service

setDsts(newDsts)

Set a new array of destinations for a service.

Parameters:
Name Type Description
newDsts Array.<Service>

The new array of destinations for the service

Source:
Returns:

The updated Service

Type
Service

setIn(newIn)

Set a new in parameter for a service.

Parameters:
Name Type Description
newIn Array.<string>

The new in parameter for the service

Source:
Returns:

The updated Service

Type
Service

setName(newName)

Set a new name for a service.

Parameters:
Name Type Description
newName string

The new name for the service

Source:
Returns:

The updated Service

Type
Service

setSrc(index, newService)

Set a new Service at a specific position of the array of sources of the service.

Parameters:
Name Type Description
index number

The index where the element will replace the old Service

newService Service

The new service

Source:
Returns:

The updated service

Type
Service

setSrcControl(index, newService)

Set a new Service at a specific position of the array of sources (control) of the service.

Parameters:
Name Type Description
index number

The index where the element will replace the old Service

newService Service

The new service

Source:
Returns:

The updated service

Type
Service

setSrcControls(newSrcControls)

Set a new array of sources (control) for a service.

Parameters:
Name Type Description
newSrcControls Array.<Service>

The new array of sources (control) for the service

Source:
Returns:

The updated Service

Type
Service

setSrcs(newSrcs)

Set a new array of sources for a service.

Parameters:
Name Type Description
newSrcs Array.<Service>

The new array of sources for the service

Source:
Returns:

The updated Service

Type
Service

setSrv(newSrv)

Set a new srv for a service.

Parameters:
Name Type Description
newSrv string

The new srv for the service

Source:
Returns:

The updated Service

Type
Service

setSup(newSup)

Set a new sup group for a service.

Parameters:
Name Type Description
newSup number

The new sup group for the service

Source:
Returns:

The updated Service

Type
Service