module:nmodule/batchJob/rc/baja/UxJobStepFactory

module:nmodule/batchJob/rc/baja/UxJobStepFactory

API Status: Development

You must implement this interface to create 'batchJob:UxJobStepFactory'.
Properties must have 'module' and 'lex' to derive 'displayName', 'description',
and 'icon' for the job step factory, also, one must implement method 'makeStep' to make the job step,
and may implement method 'editStep' to edit the job step.

Source:
Since:
  • Niagara 4.14

Example

//module:lex will be used to resolve description, icon and displayName of the UxJobStepFactory.
//myFactory.description in the 'myModule' lexicon will be used as description for the job step factory.
//myFactory.icon in the 'myModule' lexicon will be used as an icon for the job step factory.
//myFactory.displayName in the 'myModule' lexicon will be used as displayName for the job step factory.

new UxJobStepFactory({
  module: 'myModule',
  lex: 'myFactory'
});

Methods

makeStep(params) → {Promise.<(baja.Component|Array.<baja.Component>)>}

Description:
  • Returns fully configured JobStep or an array of JobStep or null.

Source:
Parameters:
Name Type Description
params Object
Properties
Name Type Description
deviceContainer baja.Component
Throws:

throws Error if abstract makeStep is invoked

Type
Error
Returns:

resolves to a singular or array of JobStep.

Type
Promise.<(baja.Component|Array.<baja.Component>)>

toDescription() → {Promise.<string>}

Source:
Returns:

Description of the UxJobStep

Type
Promise.<string>

toDisplayName() → {Promise.<string>}

Source:
Returns:

DisplayName of the UxJobStep

Type
Promise.<string>

toIcon() → {Promise.<baja.Icon>}

Source:
Returns:

Icon of the UxJobStep

Type
Promise.<baja.Icon>

(static) editStep(params) → {Promise.<(baja.Component|undefined)>|baja.Component|undefined}

Description:
  • Takes an existing JobStep as input, allows the user to edit it, and returns or resolves a
    new copy of that JobStep. The new copy will be used to replace the existing one.

Source:
Parameters:
Name Type Description
params Object
Properties
Name Type Description
step baja.Component

an instance of batchJob:JobStep.

deviceContainer baja.Component
Returns:
Type
Promise.<(baja.Component|undefined)> | baja.Component | undefined