Base Operation Builder
Defines the builder used to configure and execute an operation defined in the catalog.
constructor
Constructor
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| ogapi | InternalOpenGateAPI |
❌ | this is configuration about Opengate North API. |
| config | object |
❌ | this is configuration about operation. |
build()
Build an instance of Operation
Retorna
Tip
Tipo: Operation
Ejemplos
executeAtDate(date, active)
The operation will be created with delayed start or if you not pass any argument then the method return a cron expression builder.
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| date | Date |
❌ | |
| active | boolean |
❌ | If active is false, an operation is created in paused |
Retorna
Tip
Tipo: BaseOperationBuilder|CronExpressionBuilder
executeEach(date, name, end, active, description)
The operation will execute with a period that you must define with ExecuteEachBuilder
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| date | Date |
❌ | Date when operation will be executed |
| name | string |
❌ | Name associated to periodicity |
| or | number |
❌ | Date} end - When periodicity ends. By repetitions or by date |
| active | boolean |
❌ | If active is false, an operation is created in paused |
| description | string |
❌ | Description associated to periodicity |
Retorna
Tip
Tipo: ExecuteEachBuilder
executeEvery(date, name, end, active, description)
The operation will execute with a period that you must define with ExecuteEveryBuilder
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| date | Date |
❌ | Date when operation will be executed |
| name | string |
❌ | Name associated to periodicity |
| or | number |
❌ | Date} end - When periodicity ends. By repetitions or by date |
| active | boolean |
❌ | If active is false, an operation is created in paused |
| description | string |
❌ | Description associated to periodicity |
Retorna
Tip
Tipo: ExecuteEveryBuilder
executeIDLE()
The operation will be created in IDLE state
Retorna
Tip
Tipo: BaseOperationBuilder
executeImmediately()
The operation will be executed immediately.
Retorna
Tip
Tipo: BaseOperationBuilder
executeLater(minutes, active)
The operation will be created with delayed start or if you not pass any argument then the method return a cron expression builder.
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| minutes | number |
❌ | |
| active | boolean |
❌ | If active is false, an operation is created in paused |
Retorna
Tip
Tipo: BaseOperationBuilder|CronExpressionBuilder
withAckTimeout(milliseconds, format)
Set ackTimeout to operation.
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| milliseconds | number |
❌ | |
| format | string |
❌ | Can be 'milliseconds' |
Retorna
Tip
Tipo: BaseOperationBuilder
Ejemplos
withCallback(url)
Set a callback to operation. If it is set also will be set notify with true value
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| url | string |
❌ | If null then parameter will be removed into builder |
Retorna
Tip
Tipo: BaseOperationBuilder
Ejemplos
withJobTimeout(milliseconds, format)
Set a timeout of job.
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| milliseconds | number |
❌ | if null then parameter will be removed into builder |
| format | string |
❌ | Can be 'milliseconds' |
Retorna
Tip
Tipo: BaseOperationBuilder
Ejemplos
withNotes(notes)
Set notes to operation
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| notes | string |
❌ | If null then parameter will be removed into builder |
Retorna
Tip
Tipo: BaseOperationBuilder
Ejemplos
withOperationRetries(operationRetries)
Set operation retries
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| operationRetries | Array |
❌ |
Retorna
Tip
Tipo: BaseOperationBuilder
Ejemplos
withParameters(parameters)
Set parameters of the operation
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| parameters | object |
❌ |
Retorna
Tip
Tipo: BaseOperationBuilder
Ejemplos
withRetries(retriesNumber)
Set number of retries that operation will have.
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| retriesNumber | number |
❌ |
Retorna
Tip
Tipo: BaseOperationBuilder
Ejemplos
withRetriesDelay(milliseconds, format)
Set delay between operation retries.
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| milliseconds | number |
❌ | |
| format | string |
❌ | Can be 'milliseconds' |
Retorna
Tip
Tipo: BaseOperationBuilder
Ejemplos
withScatteringMaxSpread(percentage)
Set a scattering max spread to operation.
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| percentage | number |
❌ | if null then parameter will be removed into builder |
Retorna
Tip
Tipo: BaseOperationBuilder
Ejemplos
withScatteringStrategy(factor, warningMaxRate)
Set a scattering strategy to operation.
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| factor | number |
❌ | if null then parameter will be removed into builder |
| warningMaxRate | number |
❌ |
Retorna
Tip
Tipo: BaseOperationBuilder
Ejemplos
withTimeout(milliseconds, format)
Set timeout to operation.
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| milliseconds | number |
❌ | |
| format | string |
❌ | Can be 'milliseconds' |
Retorna
Tip
Tipo: BaseOperationBuilder