jsegd-fluig-types 1.0.25 → 1.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/types/fluig/fluig.backend.d.ts +278 -308
- package/types/fluig/fluig.frontend.d.ts +414 -380
package/package.json
CHANGED
|
@@ -1,328 +1,298 @@
|
|
|
1
1
|
declare enum FormMod {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
'ADD' = 'ADD',
|
|
3
|
+
'MOD' = 'MOD',
|
|
4
|
+
'VIEW' = 'VIEW',
|
|
5
|
+
'NONE' = 'NONE',
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
declare global {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
WKIsService: string;
|
|
48
|
-
WKUserLocale: string;
|
|
49
|
-
WKManagerMode: string;
|
|
50
|
-
WKReplacement: string;
|
|
51
|
-
WKIsTransfer: string;
|
|
52
|
-
WKCurrentMovto: string;
|
|
53
|
-
WKActualThread: string;
|
|
54
|
-
}
|
|
9
|
+
interface ServiceRequestOptions {
|
|
10
|
+
companyId: string
|
|
11
|
+
serviceCode: string
|
|
12
|
+
endpoint: string
|
|
13
|
+
method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS' | 'TRACE' | 'CONNECT'
|
|
14
|
+
timeoutService: string
|
|
15
|
+
params?: { [key: string]: unknown } | { [key: string]: unknown }[]
|
|
16
|
+
options?: {
|
|
17
|
+
encoding: 'UTF-8' | 'ISO-8859-1'
|
|
18
|
+
mediaType: 'application/json' | 'application/xml' | 'text/plain' | 'multipart/form-data'
|
|
19
|
+
useSSL: boolean
|
|
20
|
+
}
|
|
21
|
+
headers?: {
|
|
22
|
+
'Content-Type': 'application/json;charset=UTF-8' | 'application/xml;charset=UTF-8' | 'text/plain;charset=UTF-8' | 'multipart/form-data'
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
interface WKValues {
|
|
26
|
+
WKDef: string
|
|
27
|
+
WKVersDef: string
|
|
28
|
+
WKNumProces: string
|
|
29
|
+
WKNumState: string
|
|
30
|
+
WKCompany: string
|
|
31
|
+
WKUser: string
|
|
32
|
+
WKUserComment: string
|
|
33
|
+
WKCompletTask: boolean
|
|
34
|
+
WKNextState: string
|
|
35
|
+
WKCardId: string
|
|
36
|
+
WKFormId: string
|
|
37
|
+
WKIdentityCompany: string
|
|
38
|
+
WKMobile: string
|
|
39
|
+
WKIsService: string
|
|
40
|
+
WKUserLocale: string
|
|
41
|
+
WKManagerMode: string
|
|
42
|
+
WKReplacement: string
|
|
43
|
+
WKIsTransfer: string
|
|
44
|
+
WKCurrentMovto: string
|
|
45
|
+
WKActualThread: string
|
|
46
|
+
}
|
|
55
47
|
|
|
56
|
-
/**
|
|
57
|
-
* GlobalVars
|
|
58
|
-
*
|
|
59
|
-
* Objeto que armazena variáveis globais do workflow, permitindo o acesso e manipulação de informações compartilhadas entre diferentes partes do sistema.
|
|
60
|
-
* @example
|
|
61
|
-
* // Definindo uma variável global
|
|
62
|
-
* globalVars.put("varName", "varValue");
|
|
63
|
-
*
|
|
64
|
-
* // Acessando uma variável global
|
|
65
|
-
* const processo = globalVars.get("varName");
|
|
66
|
-
*/
|
|
67
|
-
const globalVars: java.util.HashMap<java.lang.String, java.lang.String>;
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Obtém o valor de uma variável global do workflow
|
|
71
|
-
* @param key - Chave da variável global do workflow:
|
|
72
|
-
* - WKDef: Código do processo
|
|
73
|
-
* - WKVersDef: Versão do processo
|
|
74
|
-
* - WKNumProces: Número da solicitação de processo
|
|
75
|
-
* - WKNumState: Número da atividade
|
|
76
|
-
* - WKCompany: Número da empresa
|
|
77
|
-
* - WKUser: Código do usuário corrente
|
|
78
|
-
* - WKUserComment: Comentário do usuário
|
|
79
|
-
* - WKCompletTask: Se a tarefa foi completada
|
|
80
|
-
* - WKNextState: Número da próxima atividade (destino)
|
|
81
|
-
* - WKCardId: Código do registro de formulário do processo
|
|
82
|
-
* - WKFormId: Código do formulário do processo
|
|
83
|
-
* - WKIdentityCompany: Identificador da empresa selecionada para Experiências de uso TOTVS
|
|
84
|
-
* - WKMobile: Identifica se a ação foi realizada através de um dispositivo mobile
|
|
85
|
-
* - WKIsService: Identifica se a solicitação de cancelamento foi realizada através de um serviço
|
|
86
|
-
* - WKUserLocale: Identifica o idioma corrente do usuário
|
|
87
|
-
* - WKManagerMode: Identifica se o processo está sendo movimentado pela visão do gestor
|
|
88
|
-
* - WKReplacement: Código do usuário substituto
|
|
89
|
-
* - WKIsTransfer: Permite verificar se o usuário está ou não transferindo uma tarefa
|
|
90
|
-
* - WKCurrentMovto: Permite a movimentação do processo
|
|
91
|
-
* - WKActualThread: Retorna a Thread atual do processo
|
|
92
|
-
* @returns Valor da variável global do workflow
|
|
93
|
-
*/
|
|
94
|
-
function getValue(key: "WKDef"): string;
|
|
95
|
-
function getValue(key: "WKVersDef"): string;
|
|
96
|
-
function getValue(key: "WKNumProces"): string;
|
|
97
|
-
function getValue(key: "WKNumState"): string;
|
|
98
|
-
function getValue(key: "WKCompany"): string;
|
|
99
|
-
function getValue(key: "WKUser"): string;
|
|
100
|
-
function getValue(key: "WKUserComment"): string;
|
|
101
|
-
function getValue(key: "WKCompletTask"): boolean;
|
|
102
|
-
function getValue(key: "WKNextState"): string;
|
|
103
|
-
function getValue(key: "WKCardId"): string;
|
|
104
|
-
function getValue(key: "WKFormId"): string;
|
|
105
|
-
function getValue(key: "WKIdentityCompany"): string;
|
|
106
|
-
function getValue(key: "WKMobile"): string;
|
|
107
|
-
function getValue(key: "WKIsService"): string;
|
|
108
|
-
function getValue(key: "WKUserLocale"): string;
|
|
109
|
-
function getValue(key: "WKManagerMode"): string;
|
|
110
|
-
function getValue(key: "WKReplacement"): string;
|
|
111
|
-
function getValue(key: "WKIsTransfer"): string;
|
|
112
|
-
function getValue(key: "WKCurrentMovto"): string;
|
|
113
|
-
function getValue(key: "WKActualThread"): string;
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Obtém informações da API de Workflow
|
|
117
|
-
*/
|
|
118
|
-
class hAPI {
|
|
119
48
|
/**
|
|
120
|
-
*
|
|
121
|
-
*
|
|
49
|
+
* GlobalVars
|
|
50
|
+
*
|
|
51
|
+
* Objeto que armazena variáveis globais do workflow, permitindo o acesso e manipulação de informações compartilhadas entre diferentes partes do sistema.
|
|
52
|
+
* @example
|
|
53
|
+
* // Definindo uma variável global
|
|
54
|
+
* globalVars.put("varName", "varValue");
|
|
55
|
+
*
|
|
56
|
+
* // Acessando uma variável global
|
|
57
|
+
* const processo = globalVars.get("varName");
|
|
122
58
|
*/
|
|
123
|
-
|
|
59
|
+
const globalVars: java.util.HashMap<java.lang.String, java.lang.String>
|
|
60
|
+
|
|
124
61
|
/**
|
|
125
|
-
*
|
|
126
|
-
* @param
|
|
127
|
-
*
|
|
62
|
+
* Obtém o valor de uma variável global do workflow
|
|
63
|
+
* @param key - Chave da variável global do workflow:
|
|
64
|
+
* - WKDef: Código do processo
|
|
65
|
+
* - WKVersDef: Versão do processo
|
|
66
|
+
* - WKNumProces: Número da solicitação de processo
|
|
67
|
+
* - WKNumState: Número da atividade
|
|
68
|
+
* - WKCompany: Número da empresa
|
|
69
|
+
* - WKUser: Código do usuário corrente
|
|
70
|
+
* - WKUserComment: Comentário do usuário
|
|
71
|
+
* - WKCompletTask: Se a tarefa foi completada
|
|
72
|
+
* - WKNextState: Número da próxima atividade (destino)
|
|
73
|
+
* - WKCardId: Código do registro de formulário do processo
|
|
74
|
+
* - WKFormId: Código do formulário do processo
|
|
75
|
+
* - WKIdentityCompany: Identificador da empresa selecionada para Experiências de uso TOTVS
|
|
76
|
+
* - WKMobile: Identifica se a ação foi realizada através de um dispositivo mobile
|
|
77
|
+
* - WKIsService: Identifica se a solicitação de cancelamento foi realizada através de um serviço
|
|
78
|
+
* - WKUserLocale: Identifica o idioma corrente do usuário
|
|
79
|
+
* - WKManagerMode: Identifica se o processo está sendo movimentado pela visão do gestor
|
|
80
|
+
* - WKReplacement: Código do usuário substituto
|
|
81
|
+
* - WKIsTransfer: Permite verificar se o usuário está ou não transferindo uma tarefa
|
|
82
|
+
* - WKCurrentMovto: Permite a movimentação do processo
|
|
83
|
+
* - WKActualThread: Retorna a Thread atual do processo
|
|
84
|
+
* @returns Valor da variável global do workflow
|
|
128
85
|
*/
|
|
129
|
-
|
|
86
|
+
function getValue(key: 'WKDef'): string
|
|
87
|
+
function getValue(key: 'WKVersDef'): string
|
|
88
|
+
function getValue(key: 'WKNumProces'): string
|
|
89
|
+
function getValue(key: 'WKNumState'): string
|
|
90
|
+
function getValue(key: 'WKCompany'): string
|
|
91
|
+
function getValue(key: 'WKUser'): string
|
|
92
|
+
function getValue(key: 'WKUserComment'): string
|
|
93
|
+
function getValue(key: 'WKCompletTask'): boolean
|
|
94
|
+
function getValue(key: 'WKNextState'): string
|
|
95
|
+
function getValue(key: 'WKCardId'): string
|
|
96
|
+
function getValue(key: 'WKFormId'): string
|
|
97
|
+
function getValue(key: 'WKIdentityCompany'): string
|
|
98
|
+
function getValue(key: 'WKMobile'): string
|
|
99
|
+
function getValue(key: 'WKIsService'): string
|
|
100
|
+
function getValue(key: 'WKUserLocale'): string
|
|
101
|
+
function getValue(key: 'WKManagerMode'): string
|
|
102
|
+
function getValue(key: 'WKReplacement'): string
|
|
103
|
+
function getValue(key: 'WKIsTransfer'): string
|
|
104
|
+
function getValue(key: 'WKCurrentMovto'): string
|
|
105
|
+
function getValue(key: 'WKActualThread'): string
|
|
106
|
+
|
|
130
107
|
/**
|
|
131
|
-
*
|
|
132
|
-
* @param tableName - Nome da tabela do formulário
|
|
133
|
-
* @param cardData - Mapa com os campos do filho e seus valores
|
|
134
|
-
* @example
|
|
135
|
-
* const cardData = new java.util.HashMap();
|
|
136
|
-
* cardData.put("NOME", "João");
|
|
137
|
-
* cardData.put("IDADE", "30");
|
|
138
|
-
* hAPI.addCardChild("TABELA_FILHOS", cardData);
|
|
108
|
+
* Obtém informações da API de Workflow
|
|
139
109
|
*/
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
110
|
+
class hAPI {
|
|
111
|
+
/**
|
|
112
|
+
* Permite acessar o valor de um campo do formulário do processo
|
|
113
|
+
* @param nomeCampo - Nome do campo do formulário
|
|
114
|
+
*/
|
|
115
|
+
static getCardValue(nomeCampo: string): string
|
|
116
|
+
/**
|
|
117
|
+
* Permite definir o valor de um campo do formulário do processo
|
|
118
|
+
* @param nomeCampo - Nome do campo do formulário
|
|
119
|
+
* @param valor - Valor a ser definido no campo do formulário
|
|
120
|
+
*/
|
|
121
|
+
static setCardValue(nomeCampo: string, valor: string): string
|
|
122
|
+
/**
|
|
123
|
+
* Adiciona um filho no formulário pai e filho do processo
|
|
124
|
+
* @param tableName - Nome da tabela do formulário
|
|
125
|
+
* @param cardData - Mapa com os campos do filho e seus valores
|
|
126
|
+
* @example
|
|
127
|
+
* const cardData = new java.util.HashMap();
|
|
128
|
+
* cardData.put("NOME", "João");
|
|
129
|
+
* cardData.put("IDADE", "30");
|
|
130
|
+
* hAPI.addCardChild("TABELA_FILHOS", cardData);
|
|
131
|
+
*/
|
|
132
|
+
static addCardChild(tableName: string, cardData: java.util.HashMap<java.lang.String, java.lang.String>): void
|
|
144
133
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
managerMode?: boolean
|
|
184
|
-
): java.util.HashMap<string, string>;
|
|
185
|
-
static calculateDeadLineHours(
|
|
186
|
-
deadlineDate: Date,
|
|
187
|
-
seconds: number,
|
|
188
|
-
deadlineInHours: number,
|
|
189
|
-
periodId: string
|
|
190
|
-
): unknown;
|
|
191
|
-
static calculateDeadLineTime(
|
|
192
|
-
deadlineDate: Date,
|
|
193
|
-
seconds: number,
|
|
194
|
-
deadlineInHours: number,
|
|
195
|
-
periodId: string
|
|
196
|
-
): unknown;
|
|
197
|
-
static setColleagueReplacement(responsible: string): void;
|
|
198
|
-
static getUserTaskLink(numAtividade: number): string;
|
|
199
|
-
static getActualThread(
|
|
200
|
-
companyNumber: number,
|
|
201
|
-
processNumber: number,
|
|
202
|
-
activityNumber: number
|
|
203
|
-
): number;
|
|
204
|
-
static createAdHocTasks(
|
|
205
|
-
processoId: number,
|
|
206
|
-
sequenciaId: number,
|
|
207
|
-
assunto: string,
|
|
208
|
-
detalhamento: string,
|
|
209
|
-
tarefas: unknown[]
|
|
210
|
-
): void;
|
|
211
|
-
static listAttachments(): java.util.List<unknown>;
|
|
212
|
-
static publishWorkflowAttachment(documentDto: unknown): void;
|
|
213
|
-
static attachDocument(documentId: number): void;
|
|
214
|
-
static getChildrenFromTable(
|
|
215
|
-
tableName: string
|
|
216
|
-
): java.util.HashMap<string, string>;
|
|
217
|
-
static getChildrenIndexes(tableName: string): number[];
|
|
218
|
-
static getAvailableStatesDetail(
|
|
219
|
-
companyId: number,
|
|
220
|
-
userId: string,
|
|
221
|
-
processId: number,
|
|
222
|
-
processInstanceId: number,
|
|
223
|
-
threadSequenceId?: number
|
|
224
|
-
): unknown;
|
|
225
|
-
}
|
|
134
|
+
static removeCardChild(tableName: string, index: number): void
|
|
135
|
+
static setAutomaticDecision(taskNumber: number, responsible: java.util.ArrayList<string>, comment: string): void
|
|
136
|
+
static getActiveStates(): java.util.ArrayList<object>
|
|
137
|
+
static getParentInstance(processInstanceId: number): number
|
|
138
|
+
static getChildrenInstances(processInstanceId: number): java.util.List<number>
|
|
139
|
+
static setDueDate(processId: number, numThread: number, userId: string, dueDate: Date, timeInSeconds: number): void
|
|
140
|
+
static transferTask(users: java.util.ArrayList<string>, comment: string, numThread?: number): void
|
|
141
|
+
static setTaskComments(userId: string, processId: number, threadId: number, comment: string): void
|
|
142
|
+
static getAdvancedProperty(nomePropriedade: string): string
|
|
143
|
+
static getCardData(numProcesso: number): java.util.HashMap<string, string>
|
|
144
|
+
static startProcess(
|
|
145
|
+
processId: string,
|
|
146
|
+
taskNumber: number,
|
|
147
|
+
users: java.util.ArrayList<java.lang.String>,
|
|
148
|
+
comment?: string,
|
|
149
|
+
taskFinished?: boolean,
|
|
150
|
+
form?: java.util.HashMap<java.lang.String, java.lang.String>,
|
|
151
|
+
managerMode?: boolean
|
|
152
|
+
): java.util.HashMap<string, string>
|
|
153
|
+
static calculateDeadLineHours(deadlineDate: Date, seconds: number, deadlineInHours: number, periodId: string): unknown
|
|
154
|
+
static calculateDeadLineTime(deadlineDate: Date, seconds: number, deadlineInHours: number, periodId: string): unknown
|
|
155
|
+
static setColleagueReplacement(responsible: string): void
|
|
156
|
+
static getUserTaskLink(numAtividade: number): string
|
|
157
|
+
static getActualThread(companyNumber: number, processNumber: number, activityNumber: number): number
|
|
158
|
+
static createAdHocTasks(processoId: number, sequenciaId: number, assunto: string, detalhamento: string, tarefas: unknown[]): void
|
|
159
|
+
static listAttachments(): java.util.List<unknown>
|
|
160
|
+
static publishWorkflowAttachment(documentDto: unknown): void
|
|
161
|
+
static attachDocument(documentId: number): void
|
|
162
|
+
static getChildrenFromTable(tableName: string): java.util.HashMap<string, string>
|
|
163
|
+
static getChildrenIndexes(tableName: string): number[]
|
|
164
|
+
static getAvailableStatesDetail(
|
|
165
|
+
companyId: number,
|
|
166
|
+
userId: string,
|
|
167
|
+
processId: number,
|
|
168
|
+
processInstanceId: number,
|
|
169
|
+
threadSequenceId?: number
|
|
170
|
+
): unknown
|
|
171
|
+
}
|
|
226
172
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
173
|
+
class JSONUtil {
|
|
174
|
+
static toJSON(data: object): java.lang.String
|
|
175
|
+
}
|
|
230
176
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
177
|
+
// #########################################################################
|
|
178
|
+
// ########################## Eventos de Formulário ########################
|
|
179
|
+
// #########################################################################
|
|
180
|
+
class FormController {
|
|
181
|
+
getCompanyId(): number
|
|
182
|
+
getDocumentId(): number
|
|
183
|
+
getVersion(): number
|
|
184
|
+
getCardIndex(): number
|
|
185
|
+
setEnabled(nomeCampo: string, habilita: boolean, protegido: boolean): void
|
|
186
|
+
getEnabled(nomeCampo: string): boolean
|
|
187
|
+
setValue(nomeCampo: string, valor: string): void
|
|
188
|
+
getValue(nomeCampo: string): string
|
|
189
|
+
setVisible(nomeCampo: string, visible: boolean): void
|
|
190
|
+
setVisibleById(idDoCampo: string, visible: boolean): void
|
|
191
|
+
setShowDisabledFields(habilita: boolean): void
|
|
192
|
+
setHidePrintLink(habilita: boolean): void
|
|
193
|
+
setHideDeleteButton(habilita: boolean): void
|
|
194
|
+
setEnhancedSecurityHiddenInputs(proteger: boolean): void
|
|
195
|
+
getFormMode(): FormMod
|
|
196
|
+
isHidePrintLink(): boolean
|
|
197
|
+
getChildrenFromTable(tableName: string): object
|
|
198
|
+
getChildrenIndexes(tableName: string): number[]
|
|
199
|
+
isHideDeleteButton(): boolean
|
|
200
|
+
getMobile(): boolean
|
|
201
|
+
isVisible(nomeCampo: string): boolean
|
|
202
|
+
isVisibleById(id: string): boolean
|
|
203
|
+
}
|
|
204
|
+
class customHTML {
|
|
205
|
+
append(html: string): void
|
|
206
|
+
}
|
|
207
|
+
function displayFields(form: FormController, customHTML: customHTML): void
|
|
208
|
+
function enableFields(form: FormController): void
|
|
209
|
+
function inputFields(form: FormController): void
|
|
210
|
+
function validateForm(form: FormController): void
|
|
265
211
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
212
|
+
// #########################################################################
|
|
213
|
+
// ####################### Definição de Log ################################
|
|
214
|
+
// #########################################################################
|
|
215
|
+
class log {
|
|
216
|
+
static dir(object: object): void
|
|
217
|
+
static info(message: string): void
|
|
218
|
+
static error(message: string): void
|
|
219
|
+
static warn(message: string): void
|
|
220
|
+
static debug(message: string): void
|
|
221
|
+
}
|
|
276
222
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
223
|
+
// #########################################################################
|
|
224
|
+
// ########################## ServiceManager Types #########################
|
|
225
|
+
// #########################################################################
|
|
280
226
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
227
|
+
// Mapeamento de classes Java comuns no Fluig
|
|
228
|
+
interface ClassNameMap {
|
|
229
|
+
'java.util.ArrayList': java.util.ArrayList<any>
|
|
230
|
+
'java.util.HashMap': java.util.HashMap<any, any>
|
|
231
|
+
'java.util.List': java.util.List<any>
|
|
232
|
+
'java.util.Collection': java.util.Collection<any>
|
|
233
|
+
'java.util.Map': java.util.Map<any, any>
|
|
234
|
+
'java.lang.String': java.lang.String
|
|
235
|
+
'java.lang.Integer': java.lang.Integer
|
|
236
|
+
'java.lang.Long': java.lang.Long
|
|
237
|
+
'java.lang.Object': java.lang.Object
|
|
238
|
+
'java.sql.ResultSet': java.sql.ResultSet
|
|
239
|
+
'java.sql.Date': java.sql.Date
|
|
240
|
+
'java.sql.Timestamp': java.sql.Timestamp
|
|
241
|
+
'javax.naming.InitialContext': javax.naming.InitialContext
|
|
242
|
+
'com.fluig.sdk.api.FluigAPI': com.fluig.sdk.api.FluigAPI
|
|
243
|
+
'com.totvs.technology.ecm.workflow.ws.ECMWorkflowEngineServiceService': com.totvs.technology.ecm.workflow.ws.ECMWorkflowEngineServiceService
|
|
244
|
+
}
|
|
299
245
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
246
|
+
class ServiceManager {
|
|
247
|
+
static getService(serviceName: string): Service
|
|
248
|
+
}
|
|
303
249
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
250
|
+
class Service {
|
|
251
|
+
getBean(): {
|
|
252
|
+
/**
|
|
253
|
+
* Instancia uma classe Java com tipagem específica baseada no nome da classe
|
|
254
|
+
* @param className Nome completo da classe Java
|
|
255
|
+
* @returns Instância da classe com tipagem apropriada
|
|
256
|
+
* @example
|
|
257
|
+
* const arrayList = service.getBean().instantiate('java.util.ArrayList');
|
|
258
|
+
* arrayList.add("item"); // Métodos do ArrayList disponíveis
|
|
259
|
+
*
|
|
260
|
+
* const hashMap = service.getBean().instantiate('java.util.HashMap');
|
|
261
|
+
* hashMap.put("key", "value"); // Métodos do HashMap disponíveis
|
|
262
|
+
*
|
|
263
|
+
* const fluigAPI = service.getBean().instantiate('com.fluig.sdk.api.FluigAPI');
|
|
264
|
+
* fluigAPI.getUserService(); // Métodos da FluigAPI disponíveis
|
|
265
|
+
*
|
|
266
|
+
* const workflowService = service.getBean().instantiate('com.totvs.technology.ecm.workflow.ws.ECMWorkflowEngineServiceService');
|
|
267
|
+
* workflowService.startProcess(...); // Métodos do ECMWorkflowEngineService disponíveis
|
|
268
|
+
*/
|
|
269
|
+
instantiate<T extends keyof ClassNameMap>(className: T): ClassNameMap[T]
|
|
270
|
+
instantiate<T = any>(className: string): T
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* DatasetRequestParams
|
|
275
|
+
*
|
|
276
|
+
* Interface que define os parâmetros de uma requisição de dataset em scripts de workflow,
|
|
277
|
+
* incluindo informações sobre o processo, usuário e dados do formulário,
|
|
278
|
+
* permitindo a criação de datasets personalizados com base no contexto do workflow.
|
|
279
|
+
* @example
|
|
280
|
+
* var datasetRequestParams = {
|
|
281
|
+
requestId: getValue('WKNumProces'),
|
|
282
|
+
cardId: parseInt(getValue('WKCardId')),
|
|
283
|
+
companyId: parseInt(getValue('WKCompany')),
|
|
284
|
+
userId: getValue('WKUser'),
|
|
285
|
+
activityId: parseInt(getValue('WKNumState')),
|
|
286
|
+
cardData: hAPI.getCardData(parseInt(getValue('WKNumProces'))),
|
|
287
|
+
};
|
|
288
|
+
*/
|
|
289
|
+
interface DatasetRequestParams {
|
|
290
|
+
requestId: string
|
|
291
|
+
cardId: number
|
|
292
|
+
companyId: number
|
|
293
|
+
userId: string
|
|
294
|
+
activityId: number
|
|
295
|
+
cardData: java.util.HashMap<string, string>
|
|
296
|
+
}
|
|
327
297
|
}
|
|
328
|
-
export {}
|
|
298
|
+
export {}
|