Subsections of operations
catalog
Subsections of catalog
Append Entities By
Utility used by BaseOperationBuilder to append target entities in three different ways: by filter, by tags, or by entity list.
constructor
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| ogapi | InternalOpenGateAPI |
❌ | this is configuration about Opengate North API. |
| parent | BaseOperationBuilder |
❌ | this is a instance of BaseOperationBuilder |
filter(filter, resourceType)
Append filter to operation target
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| filter | FilterBuilder |
❌ | |
| resourceType | string |
❌ |
Retorna
Tip
Tipo: BaseOperationBuilder
list(entities)
Append entity list to operation target
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| entities | EntityListBuilder |
❌ |
Retorna
Tip
Tipo: BaseOperationBuilder
tag(tag)
Set tag to operation target
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| tag | string |
❌ |
Retorna
Tip
Tipo: BaseOperationBuilder
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
Ejemplos
Operation
This is an abstract class; it must be extended by another class that defines the specific request. This class is responsible for managing execute-operation requests to OpenGate North API.
constructor
Constructor
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| ogapi | InternalOpenGateAPI |
❌ | this is ogapi instance |
| resource | string |
❌ | this is a base url resource |
| postObj | object |
❌ | it will be sent as a data on post action |
execute()
This invoke a request to OpenGate North API and the callback is managed by promises
Retorna
Tip
Tipo: Promise
updatePeriodicity()
This invoke a request to OpenGate North API and the callback is managed by promises
Retorna
Tip
Tipo: Promise
parameters
Subsections of parameters
Base Parameter Builder With Parent
This class generates a builder from dynamic content describing a specific parameter of an operation.
constructor
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| ogapi | InternalOpenGateAPI |
❌ | this is configuration about Opengate North API. |
| config | object |
❌ | this is configuration about parameter operation. |
| parent | BaseOperationBuilder |
❌ | this is a instance of BaseOperationBuilder |
build()
This has all knowledge to make a object.
Retorna
Tip
Tipo: object
buildAndAppend()
This method will invoke build and then it will append the parameter to operationBuilder with the correct way
Retorna
Tip
Tipo: BaseOperationBuilder
Parameter Builder Factory
This class generates all the operation parameter builders from the “parameters” attribute in the operation’s configuration JSON.
constructor
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| ogapi | InternalOpenGateAPI |
❌ | this is configuration about Opengate North API. |
| parameters | object |
❌ | this is configuration about parameter operation. |
| parent | BaseOperationBuilder |
❌ | this is a instance of BaseOperationBuilder |
period
Subsections of period
Execute Each Builder
Defines the builder used to configure the periodicity of an operation. With this builder you can select how the operation repeats: by days, hours, or minutes.
constructor
Constructor
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| parent | BaseOperationBuilder |
❌ | this is a operationBaseBuilder. |
| date | Date |
❌ | Date when operation will be executed |
| periodicityName | string |
❌ | Name associated to periodicity |
| or | number |
❌ | Date} end - When periodicity ends. By repetitions or by date |
days(days)
Set a difference of days in each repetition
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| days | number |
❌ |
Retorna
Tip
Tipo: BaseOperationBuilder
hours(hours)
Set a difference of hours in each repetition
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| hours | number |
❌ |
Retorna
Tip
Tipo: BaseOperationBuilder
minutes(minutes)
Set a difference of minutes in each repetition
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| minutes | number |
❌ |
Retorna
Tip
Tipo: BaseOperationBuilder
Execute Every Builder
Defines the builder used to configure the periodicity of an operation. With this builder you can select the period by day, week, month, or year.
constructor
Constructor
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| parent | BaseOperationBuilder |
❌ | this is a operationBaseBuilder. |
| date | Date |
❌ | Date when operation will be executed |
| periodicityName | string |
❌ | Name associated to periodicity |
day()
Every day at time defined will be the pattern
Retorna
Tip
Tipo: BaseOperationBuilder
month(months)
Each month at time and day defined will be the pattern
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| months | array |
❌ | months on will be execute the operation |
Retorna
Tip
Tipo: ByMonth
pattern
Subsections of pattern
By Generic
constructor
Constructor
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| parent | BaseOperationBuilder |
❌ | this is a operationBaseBuilder. |
| date | Date |
❌ | Date when operation will be executed |
| periodicityName | string |
❌ | Name associated to periodicity |
| or | number |
❌ | Date} end - When periodicity ends. By repetitions or by date |
By Month
constructor
Constructor
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| parent | BaseOperationBuilder |
❌ | this is a operationBaseBuilder. |
| date | Date |
❌ | Date when operation will be executed |
| periodicityName | string |
❌ | Name associated to periodicity |
| months | array |
❌ | Months on will be execute the operation |
| or | number |
❌ | Date} end - When periodicity ends. By repetitions or by date |
day(day)
At this day will be executed the operation
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| day | number |
❌ |
Retorna
Tip
Tipo: BaseOperationBuilder
By Week
constructor
Constructor
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| parent | BaseOperationBuilder |
❌ | this is a operationBaseBuilder. |
| date | Date |
❌ | Date when operation will be executed |
| periodicityName | string |
❌ | Name associated to periodicity |
| or | number |
❌ | Date} end - When periodicity ends. By repetitions or by date |
days(days)
At this days will be executed the operation
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| days | array |
❌ |
Retorna
Tip
Tipo: BaseOperationBuilder
By Year
constructor
Constructor
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| parent | BaseOperationBuilder |
❌ | this is a operationBaseBuilder. |
| date | Date |
❌ | Date when operation will be executed |
| periodicityName | string |
❌ | Name associated to periodicity |
| or | number |
❌ | Date} end - When periodicity ends. By repetitions or by date |
day(day)
At this day will be executed the operation
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| day | number |
❌ |
Retorna
Tip
Tipo: BaseOperationBuilder
month(month)
At this month will be executed the operation
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| month | string |
❌ |
Retorna
Tip
Tipo: BaseOperationBuilder|ByYear
Periodicity Update Builder
executeEach(date, end)
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 |
| or | number |
❌ | Date} end - When periodicity ends. By repetitions or by date |
Retorna
Tip
Tipo: ExecuteEach
executeEvery(date, end)
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 |
| or | number |
❌ | Date} end - When periodicity ends. By repetitions or by date |
Retorna
Tip
Tipo: ExecuteEvery
Operation Actions
constructor
Constructor
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| ogapi | InternalOpenGateAPI |
❌ | this is configuration about Opengate North API. |
| operationId | string |
❌ | Identifier of the operation on which the action will be carried out |
active()
This invoke a request to OpenGate North API and the callback is managed by promises This function active an operation
Retorna
Tip
Tipo: Promise
Ejemplos
activePeriodicity()
This invoke a request to OpenGate North API and the callback is managed by promises This function active periodicity of an operation
Retorna
Tip
Tipo: Promise
Ejemplos
cancel()
This invoke a request to OpenGate North API and the callback is managed by promises This function cancels an operation
Retorna
Tip
Tipo: Promise
Ejemplos
cancelPeriodicity()
This invoke a request to OpenGate North API and the callback is managed by promises This function cancel the periodicity of an operation
Retorna
Tip
Tipo: Promise
Ejemplos
changeCallback(url)
This invoke a request to OpenGate North API and the callback is managed by promises This function pauses (if it was active), updates the callback and passes the operation to the initial state (if activated, activated again)
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| url | string |
❌ |
Retorna
Tip
Tipo: promise
Ejemplos
executeLater(minutes)
This invoke a request to OpenGate North API and the callback is managed by promises This function pauses (if it was active), updates the delay and passes the operation to the initial state (if activated, activated again)
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| minutes | number |
❌ |
Retorna
Tip
Tipo: promise
Ejemplos
executeNow()
This invoke a request to OpenGate North API and the callback is managed by promises This function pauses the operation, updates its delay to zero, and activates it so it executes immediately
Retorna
Tip
Tipo: Promise
Ejemplos
pause()
This invoke a request to OpenGate North API and the callback is managed by promises This function pauses an operation
Retorna
Tip
Tipo: Promise
Ejemplos
pausePeriodicity()
This invoke a request to OpenGate North API and the callback is managed by promises This function pauses the periodicity of an operation
Retorna
Tip
Tipo: Promise
Ejemplos
Operation Finder
This class allows making GET requests to the operation resource in OpenGate North API.
constructor
Constructor
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| ogapi | InternalOpenGateAPI |
❌ | Reference to the API object. |
findById(id)
Download a specific operation by its id. This execute a GET http method
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| id | string |
❌ | Operation id. |
Retorna
Tip
Tipo: Promise
Ejemplos
findExecutionsById(id, size, start)
Download a specific executions of an operation by its id. This execute a GET http method
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| id | string |
❌ | Operation id. |
| size | number |
❌ | Defined the number of elements on response |
| start | number |
✅ | Defined the offset on response |
Retorna
Tip
Tipo: Promise
findPeriodicityById(id)
Download information of peridodicitiy of a specific operation by its id. This execute a GET http method
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| id | string |
❌ | Operation id. |
Retorna
Tip
Tipo: Promise
Ejemplos
findPeriodicityByPeriodicityId(periodicityId)
Download information of periodicitiy by its id. This execute a GET http method
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| periodicityId | string |
❌ | Periodicity id. |
Retorna
Tip
Tipo: Promise
Ejemplos
Operations
This class generates all operation builders from a response obtained by searching the catalog/operations resource.
constructor
Constructor
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| ogapi | InternalOpenGateAPI |
❌ | this is configuration about Opengate North API. |
builderByOperationName(name)
Create a builder to create an operation
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| name | String |
❌ | name of the operation to be created |
Retorna
Tip
Tipo: Promise
updatePeriodicityBuilder(operationId)
Create a builder to update the periodicity of an operation
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| operationId | String |
❌ | identifier of the operation to be updated~ |
Retorna
Tip
Tipo: Promise
Periodicity Actions
constructor
Constructor
Parámetros
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| ogapi | InternalOpenGateAPI |
❌ | this is configuration about Opengate North API. |
| taskId | string |
❌ | Identifier of the periodicity on which the action will be carried out |
activate()
This invoke a request to OpenGate North API and the callback is managed by promises This function active periodicity of an operation
Retorna
Tip
Tipo: Promise
Ejemplos
cancel()
This invoke a request to OpenGate North API and the callback is managed by promises This function cancel a periodicity
Retorna
Tip
Tipo: Promise
Ejemplos
pause()
This invoke a request to OpenGate North API and the callback is managed by promises This function pauses a periodicity
Retorna
Tip
Tipo: Promise