Pakiet: com.suncode.plugin.scheduled_tasks.RewriteDataBetweenDatasourcesScheduledTask

Dostępna od wersji: 1.0.0

Co najmniej jedno zdefiniowane źródło danych umożliwiające operację odczytu danych oraz co najmniej jedno zdefiniowane źródło danych umożliwiające operację zapisu danych.

Wtyczka udostępniająca zadanie zaplanowane pozwalające na przepisanie danych pomiędzy dwoma zdefiniowanymi źródłami danych. Dane przekazywane między źródłami są w formie tekstowej.

Nazwa parametruOd wersjiTyp parametruOpis
Id pierwszego źródła1.0.0TekstowyId źródła, z którego pobrane zostaną dane
Wartości parametrów pierwszego źródła1.0.0TekstowyObiekt JSON zawierający konfigurację wejściową źródła danych (w formacie {'x':'y',...}, gdzie x - id parametru źródła; y - wartość parametru)
Id drugiego źródła1.0.0TekstowyId źródła, do którego wpisane zostaną dane
Mapowanie parametrów źródeł1.0.0TekstowyObiekt JSON zawierający mapowanie parametrów wyjściowych pierwszego źródła z parametrami wejściowymi drugiego źródła (w formacie {'x':'y',...}, gdzie x - id wyjściowego parametru źródła, z którego pobrane zostaną dane; y - id wejściowego parametru źródła, do którego wpisane zostaną dane)
Wartości parametrów drugiego źródła1.0.XTekstowyObiekt JSON zawierający konfigurację wejściową źródła danych (w formacie {'x':'y',...}, gdzie x - id parametru źródła; y - wartość parametru)

Dodatkowo w parametrze "Wartości parametrów źródła" do wartości parametru źródła można przekazać wartości związane z datą ostatniego prawidłowego wykonania zadania zaplanowanego.

Aby znaczniki działały prawidłowo należy w konfiguracji zadania zaplanowanego zaznaczyć opcję odpowiadającą za zapisywanie historii wykonania!

 

Dostępne znaczniki:

ZnacznikOpis

{timestamp}

trzynastocyfrowa liczba milisekund liczona od 01.01.1970 (timestamp)

{DD}

dwucyfrowa liczba reprezentująca dzień miesiąca

{MM}

dwucyfrowa liczba reprezentująca miesiąc

{YY}

dwucyfrowa liczba reprezentująca rok

{YYYY}

czterocyfrowa liczba reprezentująca rok

{hh}

dwucyfrowa liczba reprezentująca godzinę

{mm}

dwucyfrowa liczba reprezentująca minuty

{ss}

dwucyfrowa liczba reprezentująca sekundy

{nnn}

trzycyfrowa liczba reprezentująca nanosekundy

Definiując parametr "Wartości parametrów źródła" jako {"data_ostatniego_wywolania":"{YYYY}-{MM}-{DD} {hh}:{mm}:{ss}.{nnn}"}

Do źródła przekazane zostanie: {"data_ostatniego_wywolania":"2020-11-09 20:09:15.032"} (wartości daty ostatniego prawidłowego wykonania zadania zaplanowanego podstawiane za znaczniki zostaną automatycznie pobrane z bazy; w przypadku, gdy zadanie jest uruchomione po raz pierwszy, przyjęta zostanie data 01.01.1970)

Package: com.suncode.plugin.scheduled_tasks.RewriteDataBetweenDatasourcesScheduledTask

Available from version: 1.0.X

One or more defined data sources for the data read operation and one or more defined data sources for the data write operation.

A plugin that provides a scheduled task that allows you to rewrite data between two defined data sources. Data transferred between sources is in text form.

Parameter namefrom versionDescriptionThe type of the parameterNotes and Restrictions
First Source Id1.0.0StringId of the source from which the data will be retrieved 
First source parameter values1.0.0StringJSON object containing the input configuration of the data source (in the format {'x': 'y', ...}, where x - source parameter id; y - parameter value) 
Second source id1.0.0StringId of the source where the data will be entered 
Source parameters mapping1.0.0StringJSON object containing mapping of output parameters of the first source with input parameters of the second source (in the format {'x': 'y', ...}, where x - id of the output parameter of the source from which the data will be retrieved; y - id of the input source parameter where the data will be entered) 
Second source parameter values1.0.XStringJSON object containing the input configuration of the data source (in the format {'x': 'y', ...}, where x - source parameter id; y - parameter value) 

 

Dostępne znaczniki:

MarkerDescription

{timestamp}

thirteen-digit number of milliseconds since 01/01/1970 (timestamp)

{DD}

two-digit number representing the day of the month

{MM}

two-digit number representing the month

{YY}

a two-digit number representing the year

{YYYY}

a four-digit number that represents the year

{hh}

a two-digit number representing the hour

{mm}

a two-digit number representing the minutes

{ss}

a two-digit number representing the seconds

{nnn}

a three-digit number representing nanoseconds

Defining the "Source parameter values" parameter as {"last_call_date": "{YYYY} - {MM} - {DD} {hh}: {mm}: {ss}. {Nnn}"}

The following will be sent to the source: {"last_call_date": "2020-11-09 20: 09: 15.032"} (the values of the last valid execution date of the scheduled task will be automatically taken from the database; in the case when the task is run for the first time , the date of 01.01.1970 will be adopted)



 

 

1.0.X (applicable documentation)

  • Create a scheduled task