@creatio-devkit/common 0.822.0 → 0.823.0
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/CHANGELOG.md +4 -0
- package/esm2022/lib/internal/models/data-source-load-parameters.mjs +2 -0
- package/esm2022/lib/internal/models/index.mjs +3 -1
- package/esm2022/lib/internal/models/lazy-registry-item.mjs +1 -1
- package/esm2022/lib/internal/services/request-handler-registry/request-handler-registry.service.mjs +24 -1
- package/esm2022/lib/public/enums/index.mjs +2 -1
- package/esm2022/lib/public/enums/process-status.enum.mjs +28 -0
- package/esm2022/lib/public/functions/bootstrap-crt-module.mjs +60 -13
- package/esm2022/lib/public/models/index.mjs +2 -1
- package/esm2022/lib/public/models/process-engine/index.mjs +4 -0
- package/esm2022/lib/public/models/process-engine/process-parameter-value.model.mjs +2 -0
- package/esm2022/lib/public/models/process-engine/run-process-request.model.mjs +12 -0
- package/esm2022/lib/public/models/process-engine/run-process-response.model.mjs +2 -0
- package/esm2022/lib/public/services/index.mjs +2 -1
- package/esm2022/lib/public/services/process-engine/index.mjs +2 -0
- package/esm2022/lib/public/services/process-engine/process-engine.service.mjs +27 -0
- package/esm2022/lib/public/services/sys-values/sys-values.mjs +1 -1
- package/fesm2022/creatio-devkit-common.mjs +147 -13
- package/fesm2022/creatio-devkit-common.mjs.map +1 -1
- package/index.d.ts +132 -0
- package/package.json +2 -2
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import { ImplementUsingHandlerChain } from '../../../internal/decorators/implement-using-handler-chain';
|
|
3
|
+
import { BaseHandlerChainService } from '../../../internal/services/base-handler-chain.service';
|
|
4
|
+
/**
|
|
5
|
+
* @public
|
|
6
|
+
* @class ProcessEngineService
|
|
7
|
+
* @classdesc Service, used for starting and completing business processes using handler chain
|
|
8
|
+
* @extends {BaseHandlerChainService}
|
|
9
|
+
*/
|
|
10
|
+
export class ProcessEngineService extends BaseHandlerChainService {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
/**
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
this.requestType = 'crt.ProcessEngineService';
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
__decorate([
|
|
20
|
+
ImplementUsingHandlerChain(),
|
|
21
|
+
__metadata("design:type", Function)
|
|
22
|
+
], ProcessEngineService.prototype, "executeProcessByName", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
ImplementUsingHandlerChain(),
|
|
25
|
+
__metadata("design:type", Function)
|
|
26
|
+
], ProcessEngineService.prototype, "completeExecuting", void 0);
|
|
27
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvY2Vzcy1lbmdpbmUuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvZGV2a2l0L2NvbW1vbi9zcmMvbGliL3B1YmxpYy9zZXJ2aWNlcy9wcm9jZXNzLWVuZ2luZS9wcm9jZXNzLWVuZ2luZS5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFDQSxPQUFPLEVBQUUsMEJBQTBCLEVBQUUsTUFBTSw0REFBNEQsQ0FBQztBQUN4RyxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsTUFBTSx1REFBdUQsQ0FBQztBQUloRzs7Ozs7R0FLRztBQUNILE1BQU0sT0FBTyxvQkFBcUIsU0FBUSx1QkFBdUI7SUFBakU7O1FBQ0M7O1dBRUc7UUFDYSxnQkFBVyxHQUFHLDBCQUEwQixDQUFDO0lBeUIxRCxDQUFDO0NBQUE7QUFoQk87SUFETiwwQkFBMEIsRUFBRTs7a0VBS0k7QUFRMUI7SUFETiwwQkFBMEIsRUFBRTs7K0RBSUYiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcn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vbiBjb2RlIG9mIHVzZXIncyB0aW1lem9uZVxuXHQgKi9cblx0dXNlclRpbWV6b25lQ29kZTogc3RyaW5nO1xuXHQvKipcblx0ICogQGRlc2NyaXB0aW9uIG9mZnNldCBmb3IgdXNlciB0aW1lem9uZVxuXHQgKi9cblx0dXNlclRpbWV6b25lT2Zmc2V0OiBudW1iZXI7XG5cdC8qKlxuXHQgKiBAZGVzY3JpcHRpb24gdXNlciBjb250YWN0IGluZm9cblx0ICovXG5cdHVzZXJDb250YWN0OiBMb29rdXBWYWx1ZTtcblx0LyoqXG5cdCAqIEBkZXNjcmlwdGlvbiBwcmltYXJ5IGxhbmd1YWdlXG5cdCAqL1xuXHRwcmltYXJ5TGFuZ3VhZ2U6IExvb2t1cFZhbHVlV2l0aENvZGU7XG5cdC8qKlxuXHQgKiBAZGVzY3JpcHRpb24gcHJpbWFyeSBjdWx0dXJlXG5cdCAqL1xuXHRwcmltYXJ5Q3VsdHVyZTogTG9va3VwVmFsdWU7XG5cdC8qKlxuXHQgKiBAZGVzY3JpcHRpb24gdXNlciBjdWx0dXJlXG5cdCAqL1xuXHR1c2VyQ3VsdHVyZTogTG9va3VwVmFsdWU7XG5cdC8qKlxuXHQgKiBAZGVzY3JpcHRpb24gY29yZSB2ZXJzaW9uXG5cdCAqL1xuXHRjb3JlVmVyc2lvbjogc3RyaW5nO1xuXHQvKipcblx0ICogQGRlc2NyaXB0aW9uIEZyZWVkb20gVUkgbmV3IHNjaGVtYSB2ZXJzaW9uXG5cdCAqL1xuXHRmcmVlZG9tVWlTY2hlbWFWZXJzaW9uOiBudW1iZXI7XG5cdC8qKlxuXHQgKiBAZGVzY3JpcHRpb24gZW52aXJvbm1lbnQgdHlwZVxuXHQgKi9cblx0ZW52aXJvbm1lbnRUeXBlOiBzdHJpbmc7XG59XG4iXX0=
|
|
@@ -998,12 +998,19 @@ class InternalRequestHandlerRegistryType {
|
|
|
998
998
|
static { this._addItemListeners = []; }
|
|
999
999
|
static { this._removeItemListeners = []; }
|
|
1000
1000
|
static { this._requestHandlersMap = new Map(); }
|
|
1001
|
+
static { this._handlersByRequestMap = new Map(); }
|
|
1001
1002
|
/**
|
|
1002
1003
|
* @publicHostApi
|
|
1003
1004
|
*/
|
|
1004
1005
|
static get requestHandlersMap() {
|
|
1005
1006
|
return this._requestHandlersMap;
|
|
1006
1007
|
}
|
|
1008
|
+
/**
|
|
1009
|
+
* @publicHostApi
|
|
1010
|
+
*/
|
|
1011
|
+
static get handlersByRequestMap() {
|
|
1012
|
+
return this._handlersByRequestMap;
|
|
1013
|
+
}
|
|
1007
1014
|
/**
|
|
1008
1015
|
* @publicHostApi
|
|
1009
1016
|
*/
|
|
@@ -1041,6 +1048,13 @@ class InternalRequestHandlerRegistryType {
|
|
|
1041
1048
|
for (const listener of this._addItemListeners) {
|
|
1042
1049
|
listener(handlerType, mergedConfig);
|
|
1043
1050
|
}
|
|
1051
|
+
const requestType = config.instanceConfig.requestType;
|
|
1052
|
+
let requestHandlerConfigs = this._handlersByRequestMap.get(requestType);
|
|
1053
|
+
if (!requestHandlerConfigs) {
|
|
1054
|
+
requestHandlerConfigs = new Map();
|
|
1055
|
+
this._handlersByRequestMap.set(requestType, requestHandlerConfigs);
|
|
1056
|
+
}
|
|
1057
|
+
requestHandlerConfigs.set(handlerType, mergedConfig);
|
|
1044
1058
|
}
|
|
1045
1059
|
/**
|
|
1046
1060
|
* @publicHostApi
|
|
@@ -1054,6 +1068,12 @@ class InternalRequestHandlerRegistryType {
|
|
|
1054
1068
|
for (const listener of this._removeItemListeners) {
|
|
1055
1069
|
listener(handlerType, config);
|
|
1056
1070
|
}
|
|
1071
|
+
const requestType = config.instanceConfig.requestType;
|
|
1072
|
+
const handlerTypes = this._handlersByRequestMap.get(requestType);
|
|
1073
|
+
if (!handlerTypes) {
|
|
1074
|
+
return;
|
|
1075
|
+
}
|
|
1076
|
+
handlerTypes.delete(handlerType);
|
|
1057
1077
|
}
|
|
1058
1078
|
static clear() {
|
|
1059
1079
|
for (const type of this._requestHandlersMap.keys()) {
|
|
@@ -1079,6 +1099,9 @@ const InternalRequestHandlerRegistry = global$1.creatio.requestHandlerRegistry;
|
|
|
1079
1099
|
*/
|
|
1080
1100
|
class RequestHandlerRegistryService {
|
|
1081
1101
|
static { this._internalRegistry = global$1.creatio.requestHandlerRegistry; }
|
|
1102
|
+
static find(requestHandlerType) {
|
|
1103
|
+
return RequestHandlerRegistryService._internalRegistry.requestHandlersMap.get(requestHandlerType);
|
|
1104
|
+
}
|
|
1082
1105
|
/**
|
|
1083
1106
|
* Register request handler class.
|
|
1084
1107
|
* @param config Request handler registration config.
|
|
@@ -1684,6 +1707,18 @@ class LocalizableValue {
|
|
|
1684
1707
|
}
|
|
1685
1708
|
}
|
|
1686
1709
|
|
|
1710
|
+
/**
|
|
1711
|
+
* @public
|
|
1712
|
+
* @class
|
|
1713
|
+
* @classdesc Class representing a request to run a process.
|
|
1714
|
+
* @property {Guid} schemaUId - The unique identifier of the process schema.
|
|
1715
|
+
* @property {string} schemaName - The name of the process schema.
|
|
1716
|
+
* @property {ProcessParameterValue[]} parameterValues - The values of the process parameters.
|
|
1717
|
+
* @property {string[]} resultParameterNames - The names of the resulting process parameters.
|
|
1718
|
+
*/
|
|
1719
|
+
class RunProcessRequest {
|
|
1720
|
+
}
|
|
1721
|
+
|
|
1687
1722
|
/**
|
|
1688
1723
|
* @internal
|
|
1689
1724
|
*/
|
|
@@ -1713,6 +1748,12 @@ function checkRemoteName(remoteName) {
|
|
|
1713
1748
|
throw new Error(`Remote entry with name '${remoteName}' does not exist`);
|
|
1714
1749
|
}
|
|
1715
1750
|
}
|
|
1751
|
+
function skipLazyModuleIfItemIsNonLazy(options) {
|
|
1752
|
+
return !options?.featureValues?.LoadLazyModuleEvenIfItemIsNonLazy;
|
|
1753
|
+
}
|
|
1754
|
+
function isItemRegisteredByNonLazyModule(item) {
|
|
1755
|
+
return Boolean(item && !item.lazy && item.typeRef);
|
|
1756
|
+
}
|
|
1716
1757
|
/**
|
|
1717
1758
|
* @internal
|
|
1718
1759
|
*/
|
|
@@ -1729,9 +1770,13 @@ function resistantForEach(items, callback) {
|
|
|
1729
1770
|
/**
|
|
1730
1771
|
* @internal
|
|
1731
1772
|
*/
|
|
1732
|
-
function registerViewElements(types) {
|
|
1773
|
+
function registerViewElements(types, options) {
|
|
1733
1774
|
resistantForEach(types, (type) => {
|
|
1734
1775
|
const registrationConfig = getViewElementMetadata(type);
|
|
1776
|
+
if (skipLazyModuleIfItemIsNonLazy(options) && !options.lazy) {
|
|
1777
|
+
registrationConfig.lazy = false;
|
|
1778
|
+
registrationConfig.lazyModuleRef = null;
|
|
1779
|
+
}
|
|
1735
1780
|
ViewElementRegistry.validate(registrationConfig);
|
|
1736
1781
|
ViewElementRegistry.register(registrationConfig);
|
|
1737
1782
|
});
|
|
@@ -1739,8 +1784,14 @@ function registerViewElements(types) {
|
|
|
1739
1784
|
/**
|
|
1740
1785
|
* @internal
|
|
1741
1786
|
*/
|
|
1742
|
-
function registerLazyViewElements(configs, lazyModuleRef) {
|
|
1787
|
+
function registerLazyViewElements(configs, options, lazyModuleRef) {
|
|
1743
1788
|
resistantForEach(configs, (config) => {
|
|
1789
|
+
if (skipLazyModuleIfItemIsNonLazy(options)) {
|
|
1790
|
+
const existingRegistryItem = ViewElementRegistry.viewElements.get(config.type);
|
|
1791
|
+
if (isItemRegisteredByNonLazyModule(existingRegistryItem)) {
|
|
1792
|
+
return;
|
|
1793
|
+
}
|
|
1794
|
+
}
|
|
1744
1795
|
const registryItem = { ...config, lazy: true, lazyModuleRef };
|
|
1745
1796
|
ViewElementRegistry.validate(registryItem);
|
|
1746
1797
|
ViewElementRegistry.register(registryItem);
|
|
@@ -1781,12 +1832,16 @@ function registerValidators(types, options) {
|
|
|
1781
1832
|
const registrationConfig = {
|
|
1782
1833
|
...metadata,
|
|
1783
1834
|
instantiate: function (injectionContext) {
|
|
1784
|
-
const resolveDependency = options
|
|
1835
|
+
const resolveDependency = options.resolveDependency
|
|
1785
1836
|
? (token) => options.resolveDependency(token, injectionContext)
|
|
1786
1837
|
: null;
|
|
1787
1838
|
return instantiate(type, resolveDependency);
|
|
1788
1839
|
},
|
|
1789
1840
|
};
|
|
1841
|
+
if (skipLazyModuleIfItemIsNonLazy(options) && !options.lazy) {
|
|
1842
|
+
registrationConfig.lazy = false;
|
|
1843
|
+
registrationConfig.lazyModuleRef = null;
|
|
1844
|
+
}
|
|
1790
1845
|
ValidatorRegistry.validate(registrationConfig);
|
|
1791
1846
|
ValidatorRegistry.register(registrationConfig);
|
|
1792
1847
|
});
|
|
@@ -1794,8 +1849,14 @@ function registerValidators(types, options) {
|
|
|
1794
1849
|
/**
|
|
1795
1850
|
* @internal
|
|
1796
1851
|
*/
|
|
1797
|
-
function registerLazyValidators(configs, lazyModuleRef) {
|
|
1852
|
+
function registerLazyValidators(configs, options, lazyModuleRef) {
|
|
1798
1853
|
resistantForEach(configs, (config) => {
|
|
1854
|
+
if (skipLazyModuleIfItemIsNonLazy(options)) {
|
|
1855
|
+
const existingRegistryItem = ValidatorRegistry.items.get(config.type);
|
|
1856
|
+
if (isItemRegisteredByNonLazyModule(existingRegistryItem)) {
|
|
1857
|
+
return;
|
|
1858
|
+
}
|
|
1859
|
+
}
|
|
1799
1860
|
const registryItem = { ...config, lazy: true, lazyModuleRef };
|
|
1800
1861
|
ValidatorRegistry.validate(registryItem);
|
|
1801
1862
|
ValidatorRegistry.register(registryItem);
|
|
@@ -1816,14 +1877,24 @@ function registerConverters(types, options) {
|
|
|
1816
1877
|
return instantiate(type, resolveDependency);
|
|
1817
1878
|
},
|
|
1818
1879
|
};
|
|
1880
|
+
if (skipLazyModuleIfItemIsNonLazy(options) && !options.lazy) {
|
|
1881
|
+
registrationConfig.lazy = false;
|
|
1882
|
+
registrationConfig.lazyModuleRef = null;
|
|
1883
|
+
}
|
|
1819
1884
|
ConverterRegistry.register(registrationConfig);
|
|
1820
1885
|
});
|
|
1821
1886
|
}
|
|
1822
1887
|
/**
|
|
1823
1888
|
* @internal
|
|
1824
1889
|
*/
|
|
1825
|
-
function registerLazyConverters(descriptors, lazyModuleRef) {
|
|
1890
|
+
function registerLazyConverters(descriptors, options, lazyModuleRef) {
|
|
1826
1891
|
resistantForEach(descriptors, (descriptor) => {
|
|
1892
|
+
if (skipLazyModuleIfItemIsNonLazy(options)) {
|
|
1893
|
+
const existingRegistryItem = ConverterRegistry.find(descriptor.type);
|
|
1894
|
+
if (isItemRegisteredByNonLazyModule(existingRegistryItem)) {
|
|
1895
|
+
return;
|
|
1896
|
+
}
|
|
1897
|
+
}
|
|
1827
1898
|
const registryItem = { ...descriptor, lazy: true, lazyModuleRef };
|
|
1828
1899
|
ConverterRegistry.register(registryItem);
|
|
1829
1900
|
});
|
|
@@ -1863,6 +1934,10 @@ function registerRequestHandlers(types, options, remoteName) {
|
|
|
1863
1934
|
createHandler,
|
|
1864
1935
|
};
|
|
1865
1936
|
}
|
|
1937
|
+
if (skipLazyModuleIfItemIsNonLazy(options) && !options.lazy) {
|
|
1938
|
+
registrationConfig.lazy = false;
|
|
1939
|
+
registrationConfig.lazyModuleRef = null;
|
|
1940
|
+
}
|
|
1866
1941
|
RequestHandlerRegistryService.register(registrationConfig, type);
|
|
1867
1942
|
});
|
|
1868
1943
|
}
|
|
@@ -1871,6 +1946,12 @@ function registerRequestHandlers(types, options, remoteName) {
|
|
|
1871
1946
|
*/
|
|
1872
1947
|
function registerLazyRequestHandlers(descriptors, options, remoteName, lazyModuleRef) {
|
|
1873
1948
|
resistantForEach(descriptors, (descriptor) => {
|
|
1949
|
+
if (skipLazyModuleIfItemIsNonLazy(options)) {
|
|
1950
|
+
const existingRegistryItem = RequestHandlerRegistryService.find(descriptor.type)?.instanceConfig;
|
|
1951
|
+
if (isItemRegisteredByNonLazyModule(existingRegistryItem)) {
|
|
1952
|
+
return;
|
|
1953
|
+
}
|
|
1954
|
+
}
|
|
1874
1955
|
const registrationConfig = {
|
|
1875
1956
|
...descriptor,
|
|
1876
1957
|
lazy: true,
|
|
@@ -1895,16 +1976,16 @@ function registerLazyRequestHandlers(descriptors, options, remoteName, lazyModul
|
|
|
1895
1976
|
function bootstrapLazyCrtModule(name, descriptor, options, lazyModuleRef) {
|
|
1896
1977
|
try {
|
|
1897
1978
|
if (descriptor.viewElements) {
|
|
1898
|
-
registerLazyViewElements(descriptor.viewElements, lazyModuleRef);
|
|
1979
|
+
registerLazyViewElements(descriptor.viewElements, options, lazyModuleRef);
|
|
1899
1980
|
}
|
|
1900
1981
|
if (descriptor.requestHandlers) {
|
|
1901
1982
|
registerLazyRequestHandlers(descriptor.requestHandlers, options, name, lazyModuleRef);
|
|
1902
1983
|
}
|
|
1903
1984
|
if (descriptor.validators) {
|
|
1904
|
-
registerLazyValidators(descriptor.validators, lazyModuleRef);
|
|
1985
|
+
registerLazyValidators(descriptor.validators, options, lazyModuleRef);
|
|
1905
1986
|
}
|
|
1906
1987
|
if (descriptor.converters) {
|
|
1907
|
-
registerLazyConverters(descriptor.converters, lazyModuleRef);
|
|
1988
|
+
registerLazyConverters(descriptor.converters, options, lazyModuleRef);
|
|
1908
1989
|
}
|
|
1909
1990
|
descriptor.includes?.forEach((m) => {
|
|
1910
1991
|
bootstrapLazyCrtModule(name, m, options, lazyModuleRef);
|
|
@@ -1926,7 +2007,7 @@ function bootstrapDefaultCrtModule(name, type, options, root) {
|
|
|
1926
2007
|
try {
|
|
1927
2008
|
const moduleDefinition = getModuleMetadata(type);
|
|
1928
2009
|
if (moduleDefinition.viewElements) {
|
|
1929
|
-
registerViewElements(moduleDefinition.viewElements);
|
|
2010
|
+
registerViewElements(moduleDefinition.viewElements, options);
|
|
1930
2011
|
registerInterfaceDesignerItems(moduleDefinition.viewElements, options?.localizeMetadata);
|
|
1931
2012
|
}
|
|
1932
2013
|
if (moduleDefinition.designTimeViewElements) {
|
|
@@ -1951,7 +2032,7 @@ function bootstrapDefaultCrtModule(name, type, options, root) {
|
|
|
1951
2032
|
console.error("To use lazy loading, 'remoteName' parameter should be specified.");
|
|
1952
2033
|
return;
|
|
1953
2034
|
}
|
|
1954
|
-
const ref = new LazyModuleRef(includedModuleMetadata, (x) => bootstrapDefaultCrtModule(name, x, options, false), source);
|
|
2035
|
+
const ref = new LazyModuleRef(includedModuleMetadata, (x) => bootstrapDefaultCrtModule(name, x, { ...options, lazy: true }, false), source);
|
|
1955
2036
|
bootstrapLazyCrtModule(name, includedModuleMetadata, options, ref);
|
|
1956
2037
|
LazyModulesManager.instance.add(ref);
|
|
1957
2038
|
}
|
|
@@ -1996,8 +2077,9 @@ function bootstrapCrtModule(...args) {
|
|
|
1996
2077
|
throw new Error('Host module cannot have name');
|
|
1997
2078
|
}
|
|
1998
2079
|
}
|
|
1999
|
-
|
|
2000
|
-
|
|
2080
|
+
const internalOptions = { ...options, lazy: false };
|
|
2081
|
+
bootstrapDefaultCrtModule(name, type, internalOptions, true);
|
|
2082
|
+
bootstrapPredefinedModules(name, type, internalOptions);
|
|
2001
2083
|
if (options.moduleType === 'remote') {
|
|
2002
2084
|
BootstrapNotifier.instance.notify(type);
|
|
2003
2085
|
}
|
|
@@ -2370,6 +2452,34 @@ var DataSourceLoadType;
|
|
|
2370
2452
|
DataSourceLoadType["Reload"] = "reload";
|
|
2371
2453
|
})(DataSourceLoadType || (DataSourceLoadType = {}));
|
|
2372
2454
|
|
|
2455
|
+
/**
|
|
2456
|
+
* @public
|
|
2457
|
+
* @description Enum representing the status of a process.
|
|
2458
|
+
*/
|
|
2459
|
+
var ProcessStatus;
|
|
2460
|
+
(function (ProcessStatus) {
|
|
2461
|
+
/**
|
|
2462
|
+
* The process is inactive.
|
|
2463
|
+
*/
|
|
2464
|
+
ProcessStatus[ProcessStatus["Inactive"] = 0] = "Inactive";
|
|
2465
|
+
/**
|
|
2466
|
+
* The process is currently running.
|
|
2467
|
+
*/
|
|
2468
|
+
ProcessStatus[ProcessStatus["Running"] = 1] = "Running";
|
|
2469
|
+
/**
|
|
2470
|
+
* The process has completed successfully.
|
|
2471
|
+
*/
|
|
2472
|
+
ProcessStatus[ProcessStatus["Completed"] = 2] = "Completed";
|
|
2473
|
+
/**
|
|
2474
|
+
* The process encountered an error.
|
|
2475
|
+
*/
|
|
2476
|
+
ProcessStatus[ProcessStatus["Error"] = 3] = "Error";
|
|
2477
|
+
/**
|
|
2478
|
+
* The process was cancelled.
|
|
2479
|
+
*/
|
|
2480
|
+
ProcessStatus[ProcessStatus["Cancelled"] = 4] = "Cancelled";
|
|
2481
|
+
})(ProcessStatus || (ProcessStatus = {}));
|
|
2482
|
+
|
|
2373
2483
|
/**
|
|
2374
2484
|
* @internal
|
|
2375
2485
|
*/
|
|
@@ -2834,9 +2944,33 @@ __decorate([
|
|
|
2834
2944
|
__metadata("design:type", Function)
|
|
2835
2945
|
], MessageChannelService.prototype, "sendMessage", void 0);
|
|
2836
2946
|
|
|
2947
|
+
/**
|
|
2948
|
+
* @public
|
|
2949
|
+
* @class ProcessEngineService
|
|
2950
|
+
* @classdesc Service, used for starting and completing business processes using handler chain
|
|
2951
|
+
* @extends {BaseHandlerChainService}
|
|
2952
|
+
*/
|
|
2953
|
+
class ProcessEngineService extends BaseHandlerChainService {
|
|
2954
|
+
constructor() {
|
|
2955
|
+
super(...arguments);
|
|
2956
|
+
/**
|
|
2957
|
+
* @internal
|
|
2958
|
+
*/
|
|
2959
|
+
this.requestType = 'crt.ProcessEngineService';
|
|
2960
|
+
}
|
|
2961
|
+
}
|
|
2962
|
+
__decorate([
|
|
2963
|
+
ImplementUsingHandlerChain(),
|
|
2964
|
+
__metadata("design:type", Function)
|
|
2965
|
+
], ProcessEngineService.prototype, "executeProcessByName", void 0);
|
|
2966
|
+
__decorate([
|
|
2967
|
+
ImplementUsingHandlerChain(),
|
|
2968
|
+
__metadata("design:type", Function)
|
|
2969
|
+
], ProcessEngineService.prototype, "completeExecuting", void 0);
|
|
2970
|
+
|
|
2837
2971
|
/**
|
|
2838
2972
|
* Generated bundle index. Do not edit.
|
|
2839
2973
|
*/
|
|
2840
2974
|
|
|
2841
|
-
export { BaseRequestHandler, BaseValidator, BootstrapNotifier, ChatMessageTypeRegistry, ConverterRegistry, CrtChatMessageType, CrtConverter, CrtDesignTimeViewElement, CrtInject, CrtInput, CrtInputRegistrationConfig, CrtInterfaceDesignerItem, CrtModule, CrtOutput, CrtRequest, CrtRequestHandler, CrtValidationInput, CrtValidator, CrtViewElement, CrtZoneService, DataRequest, DataSourceLoadType, DesignTimeViewElementRegistry, DesignerToolGroupType, DialogService, FeatureService, HandleViewModelAttributeChangeRequest, HandlerChainService, HandlerChainServicesRegistry, HandlerSourceType, HandlersOrderComparer, HttpClientService, ImplementUsingHandlerChain, InterfaceDesignerItemRegistrationConfig, InterfaceDesignerItemRegistry, InternalRequestHandlerRegistry, InternalRequestHandlerRegistryType, LazyModuleRef, LazyModulesManager, LicenseService, LocalizableValue, MaskService, MessageChannelService, MethodInvokeRequest, Model, PkgTopology, RemoteEntriesRegistry, RemoteEntryType, RequestHandlerRegistryService, RequestRegistryService, RightsService, SysSetting, SysSettingValue, SysSettingsService, SysValuesService, VIEW_ELEMENT_DEFAULT_HEIGHT, ValidatorMapValue, ValidatorRegistry, ViewElementDataGroupType, ViewElementGroupType, ViewElementProperty, ViewElementRegistry, ViewElementRenderStrategy, ViewElementReuseStrategy, _from, applyLocalizeMetadataFn, bootstrapCrtModule, bootstrapCrtModuleHandlerChainServices, bootstrappedCrtModules, callOnContextCreateHooks, callOnContextDestroyHooks, callOnContextUpdateHooks, checkCrtTypeNamePascalCase, checkIfTypeRegistered, checkOnlyOneRegistration, checkTypeNameFormat, checkTypeNamePascalCase, crtInjectPrefix, crtInputPrefix, crtOutputPrefix, crtValidationInputPrefix, defineRenderConfig, designTimeViewElementRegistryKey, getConverterMetadata, getCrtInputsMetadata, getCrtOutputsMetadata, getCrtValidationInputsMetadata, getDeepModuleDependencies, getDesignTimeViewElementMetadata, getHandlerChainServiceMetadata, getInterfaceDesignerItemMetadata, getModuleMetadata, getRequestHandlerMetadata, getTypeDependencies, getValidatorMetadata, getViewElementMetadata, hasInterfaceDesignerItemMetadata, instantiate, interfaceDesignerItemRegistryKey, isComponentPropertyBindable, localize, matchScopes, objectDeepKeys, registerAngularViewElement, registerViewElement, registryKey, resetGlobals, setConverterMetadata, setDesignTimeViewElementMetadata, setInterfaceDesignerItemMetadata, setModuleMetadata, setRequestHandlerMetadata, setValidatorMetadata, setViewElementMetadata, toAggregationEval, toAggregationEvalType, toAggregationFunction, toAggregationType, toDatePart, toDatePartType, toNumericFunctionType, toOrderDirection, toPascalCase, toSortDirection, toStringFunctionType, validatorRegistryKey, viewElementRegistryKey, ɵBaseRegistry, ɵcheckTypeNameFormat, ɵinstantiate };
|
|
2975
|
+
export { BaseRequestHandler, BaseValidator, BootstrapNotifier, ChatMessageTypeRegistry, ConverterRegistry, CrtChatMessageType, CrtConverter, CrtDesignTimeViewElement, CrtInject, CrtInput, CrtInputRegistrationConfig, CrtInterfaceDesignerItem, CrtModule, CrtOutput, CrtRequest, CrtRequestHandler, CrtValidationInput, CrtValidator, CrtViewElement, CrtZoneService, DataRequest, DataSourceLoadType, DesignTimeViewElementRegistry, DesignerToolGroupType, DialogService, FeatureService, HandleViewModelAttributeChangeRequest, HandlerChainService, HandlerChainServicesRegistry, HandlerSourceType, HandlersOrderComparer, HttpClientService, ImplementUsingHandlerChain, InterfaceDesignerItemRegistrationConfig, InterfaceDesignerItemRegistry, InternalRequestHandlerRegistry, InternalRequestHandlerRegistryType, LazyModuleRef, LazyModulesManager, LicenseService, LocalizableValue, MaskService, MessageChannelService, MethodInvokeRequest, Model, PkgTopology, ProcessEngineService, ProcessStatus, RemoteEntriesRegistry, RemoteEntryType, RequestHandlerRegistryService, RequestRegistryService, RightsService, RunProcessRequest, SysSetting, SysSettingValue, SysSettingsService, SysValuesService, VIEW_ELEMENT_DEFAULT_HEIGHT, ValidatorMapValue, ValidatorRegistry, ViewElementDataGroupType, ViewElementGroupType, ViewElementProperty, ViewElementRegistry, ViewElementRenderStrategy, ViewElementReuseStrategy, _from, applyLocalizeMetadataFn, bootstrapCrtModule, bootstrapCrtModuleHandlerChainServices, bootstrappedCrtModules, callOnContextCreateHooks, callOnContextDestroyHooks, callOnContextUpdateHooks, checkCrtTypeNamePascalCase, checkIfTypeRegistered, checkOnlyOneRegistration, checkTypeNameFormat, checkTypeNamePascalCase, crtInjectPrefix, crtInputPrefix, crtOutputPrefix, crtValidationInputPrefix, defineRenderConfig, designTimeViewElementRegistryKey, getConverterMetadata, getCrtInputsMetadata, getCrtOutputsMetadata, getCrtValidationInputsMetadata, getDeepModuleDependencies, getDesignTimeViewElementMetadata, getHandlerChainServiceMetadata, getInterfaceDesignerItemMetadata, getModuleMetadata, getRequestHandlerMetadata, getTypeDependencies, getValidatorMetadata, getViewElementMetadata, hasInterfaceDesignerItemMetadata, instantiate, interfaceDesignerItemRegistryKey, isComponentPropertyBindable, localize, matchScopes, objectDeepKeys, registerAngularViewElement, registerViewElement, registryKey, resetGlobals, setConverterMetadata, setDesignTimeViewElementMetadata, setInterfaceDesignerItemMetadata, setModuleMetadata, setRequestHandlerMetadata, setValidatorMetadata, setViewElementMetadata, toAggregationEval, toAggregationEvalType, toAggregationFunction, toAggregationType, toDatePart, toDatePartType, toNumericFunctionType, toOrderDirection, toPascalCase, toSortDirection, toStringFunctionType, validatorRegistryKey, viewElementRegistryKey, ɵBaseRegistry, ɵcheckTypeNameFormat, ɵinstantiate };
|
|
2842
2976
|
//# sourceMappingURL=creatio-devkit-common.mjs.map
|