@5minds/processcube_engine_client
Advanced tools
Comparing version 4.4.0-feature-ffb553-ljecqma5 to 4.4.0-renovate-03011f-ll276q20
define(["require", "exports", "@5minds/processcube_engine_sdk"], function (require, exports, processcube_engine_sdk_1) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.mapProcessInstance = exports.mapExternalTask = exports.mapDataObjectInstance = exports.mapCronjobHistory = exports.mapActiveCronjobConfiguration = exports.mapCronjobConfiguration = exports.mapProcessToken = exports.mapUserTask = exports.mapServiceTask = exports.mapSendTask = exports.mapReceiveTask = exports.mapManualTask = exports.mapEvent = exports.mapEmptyActivity = exports.mapSubprocess = exports.mapCallActivity = exports.mapFlowNodeInstance = exports.mapProcessModel = exports.mapProcessDefinition = exports.mapAnonymousSession = void 0; | ||
exports.mapProcessInstance = exports.mapExternalTask = exports.mapDataObjectInstance = exports.mapCronjobHistory = exports.mapActiveCronjobConfiguration = exports.mapCronjobConfiguration = exports.mapProcessToken = exports.mapUserTask = exports.mapServiceTask = exports.mapSendTask = exports.mapReceiveTask = exports.mapManualTask = exports.mapEvent = exports.mapEmptyActivity = exports.mapSubprocess = exports.mapCallActivity = exports.mapBusinessRuleTask = exports.mapFlowNodeInstance = exports.mapProcessModel = exports.mapProcessDefinition = exports.mapAnonymousSession = void 0; | ||
function mapAnonymousSession(rawSession) { | ||
@@ -44,2 +44,5 @@ return { | ||
function mapFlowNodeInstance(data) { | ||
if (data.flowNodeType === processcube_engine_sdk_1.BpmnType.businessRuleTask) { | ||
return mapBusinessRuleTask(data); | ||
} | ||
if (data.flowNodeType === processcube_engine_sdk_1.BpmnType.callActivity) { | ||
@@ -54,5 +57,2 @@ return mapCallActivity(data); | ||
} | ||
if (data.eventType != undefined) { | ||
return mapEvent(data); | ||
} | ||
if (data.flowNodeType === processcube_engine_sdk_1.BpmnType.manualTask) { | ||
@@ -73,5 +73,27 @@ return mapManualTask(data); | ||
} | ||
if (data.eventType != undefined) { | ||
return mapEvent(data); | ||
} | ||
return createBaseFlowNodeInstance(data); | ||
} | ||
exports.mapFlowNodeInstance = mapFlowNodeInstance; | ||
function mapBusinessRuleTask(data) { | ||
const businessRuleTaskInstance = createBaseFlowNodeInstance(data); | ||
if (data.businessRuleTaskData) { | ||
businessRuleTaskInstance.businessRuleTaskData = { | ||
externalTaskId: data.businessRuleTaskData.externalTaskId, | ||
workerId: data.businessRuleTaskData.workerId, | ||
topic: data.businessRuleTaskData.topic, | ||
state: data.businessRuleTaskData.state, | ||
isSingleTry: data.businessRuleTaskData.isSingleTry, | ||
lockExpirationTime: data.businessRuleTaskData.lockExpirationTime ? new Date(data.businessRuleTaskData.lockExpirationTime) : undefined, | ||
payload: data.businessRuleTaskData.payload, | ||
result: data.businessRuleTaskData.result, | ||
error: typeof data.error === 'string' ? (0, processcube_engine_sdk_1.deserializeJson)(data.error) : data.error, | ||
finishedAt: data.businessRuleTaskData.finishedAt ? new Date(data.businessRuleTaskData.finishedAt) : undefined, | ||
}; | ||
} | ||
return businessRuleTaskInstance; | ||
} | ||
exports.mapBusinessRuleTask = mapBusinessRuleTask; | ||
function mapCallActivity(data) { | ||
@@ -78,0 +100,0 @@ return { |
@@ -18,2 +18,5 @@ define(["require", "exports", "../Types/index", "./BaseClient"], function (require, exports, index_1, BaseClient_1) { | ||
} | ||
async onActivityError(callback, options) { | ||
return this.createSocketIoSubscription(index_1.socketSettings.paths.activityError, callback, options === null || options === void 0 ? void 0 : options.subscribeOnce, options === null || options === void 0 ? void 0 : options.identity); | ||
} | ||
async onProcessDeployed(callback, options) { | ||
@@ -20,0 +23,0 @@ return this.createSocketIoSubscription(index_1.socketSettings.paths.processDeployed, callback, options === null || options === void 0 ? void 0 : options.subscribeOnce, options === null || options === void 0 ? void 0 : options.identity); |
@@ -6,2 +6,3 @@ define(["require", "exports"], function (require, exports) { | ||
const messagePaths = { | ||
activityError: 'OnActivityError', | ||
activityReached: 'activity_reached', | ||
@@ -8,0 +9,0 @@ activityFinished: 'activity_finished', |
@@ -6,2 +6,3 @@ import { AnonymousSession, DataModels, Cronjob } from '@5minds/processcube_engine_sdk'; | ||
export declare function mapFlowNodeInstance(data: any): DataModels.FlowNodeInstances.FlowNodeInstance; | ||
export declare function mapBusinessRuleTask(data: any): DataModels.FlowNodeInstances.BusinessRuleTaskInstance; | ||
export declare function mapCallActivity(data: any): DataModels.FlowNodeInstances.CallActivityInstance; | ||
@@ -8,0 +9,0 @@ export declare function mapSubprocess(data: any): DataModels.FlowNodeInstances.SubprocessInstance; |
@@ -14,2 +14,6 @@ import { INotificationExtensionAdapter, Identity, Messages, Subscription } from '@5minds/processcube_engine_sdk'; | ||
onReconnected(callback: ClientMessages.CallbackTypes.OnReconnected, subscribeOnce?: boolean, identity?: Identity): Subscription; | ||
onActivityError(callback: Messages.CallbackTypes.OnActivityErrorCallback, options?: { | ||
subscribeOnce?: boolean; | ||
identity?: Identity; | ||
}): Promise<Subscription>; | ||
onProcessDeployed(callback: Messages.CallbackTypes.OnProcessDeployedCallback, options?: { | ||
@@ -16,0 +20,0 @@ subscribeOnce?: boolean; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.mapProcessInstance = exports.mapExternalTask = exports.mapDataObjectInstance = exports.mapCronjobHistory = exports.mapActiveCronjobConfiguration = exports.mapCronjobConfiguration = exports.mapProcessToken = exports.mapUserTask = exports.mapServiceTask = exports.mapSendTask = exports.mapReceiveTask = exports.mapManualTask = exports.mapEvent = exports.mapEmptyActivity = exports.mapSubprocess = exports.mapCallActivity = exports.mapFlowNodeInstance = exports.mapProcessModel = exports.mapProcessDefinition = exports.mapAnonymousSession = void 0; | ||
exports.mapProcessInstance = exports.mapExternalTask = exports.mapDataObjectInstance = exports.mapCronjobHistory = exports.mapActiveCronjobConfiguration = exports.mapCronjobConfiguration = exports.mapProcessToken = exports.mapUserTask = exports.mapServiceTask = exports.mapSendTask = exports.mapReceiveTask = exports.mapManualTask = exports.mapEvent = exports.mapEmptyActivity = exports.mapSubprocess = exports.mapCallActivity = exports.mapBusinessRuleTask = exports.mapFlowNodeInstance = exports.mapProcessModel = exports.mapProcessDefinition = exports.mapAnonymousSession = void 0; | ||
const processcube_engine_sdk_1 = require("@5minds/processcube_engine_sdk"); | ||
@@ -44,2 +44,5 @@ function mapAnonymousSession(rawSession) { | ||
function mapFlowNodeInstance(data) { | ||
if (data.flowNodeType === processcube_engine_sdk_1.BpmnType.businessRuleTask) { | ||
return mapBusinessRuleTask(data); | ||
} | ||
if (data.flowNodeType === processcube_engine_sdk_1.BpmnType.callActivity) { | ||
@@ -54,5 +57,2 @@ return mapCallActivity(data); | ||
} | ||
if (data.eventType != undefined) { | ||
return mapEvent(data); | ||
} | ||
if (data.flowNodeType === processcube_engine_sdk_1.BpmnType.manualTask) { | ||
@@ -73,5 +73,27 @@ return mapManualTask(data); | ||
} | ||
if (data.eventType != undefined) { | ||
return mapEvent(data); | ||
} | ||
return createBaseFlowNodeInstance(data); | ||
} | ||
exports.mapFlowNodeInstance = mapFlowNodeInstance; | ||
function mapBusinessRuleTask(data) { | ||
const businessRuleTaskInstance = createBaseFlowNodeInstance(data); | ||
if (data.businessRuleTaskData) { | ||
businessRuleTaskInstance.businessRuleTaskData = { | ||
externalTaskId: data.businessRuleTaskData.externalTaskId, | ||
workerId: data.businessRuleTaskData.workerId, | ||
topic: data.businessRuleTaskData.topic, | ||
state: data.businessRuleTaskData.state, | ||
isSingleTry: data.businessRuleTaskData.isSingleTry, | ||
lockExpirationTime: data.businessRuleTaskData.lockExpirationTime ? new Date(data.businessRuleTaskData.lockExpirationTime) : undefined, | ||
payload: data.businessRuleTaskData.payload, | ||
result: data.businessRuleTaskData.result, | ||
error: typeof data.error === 'string' ? (0, processcube_engine_sdk_1.deserializeJson)(data.error) : data.error, | ||
finishedAt: data.businessRuleTaskData.finishedAt ? new Date(data.businessRuleTaskData.finishedAt) : undefined, | ||
}; | ||
} | ||
return businessRuleTaskInstance; | ||
} | ||
exports.mapBusinessRuleTask = mapBusinessRuleTask; | ||
function mapCallActivity(data) { | ||
@@ -78,0 +100,0 @@ return { |
@@ -19,2 +19,5 @@ "use strict"; | ||
} | ||
async onActivityError(callback, options) { | ||
return this.createSocketIoSubscription(index_1.socketSettings.paths.activityError, callback, options === null || options === void 0 ? void 0 : options.subscribeOnce, options === null || options === void 0 ? void 0 : options.identity); | ||
} | ||
async onProcessDeployed(callback, options) { | ||
@@ -21,0 +24,0 @@ return this.createSocketIoSubscription(index_1.socketSettings.paths.processDeployed, callback, options === null || options === void 0 ? void 0 : options.subscribeOnce, options === null || options === void 0 ? void 0 : options.identity); |
@@ -5,2 +5,3 @@ "use strict"; | ||
const messagePaths = { | ||
activityError: 'OnActivityError', | ||
activityReached: 'activity_reached', | ||
@@ -7,0 +8,0 @@ activityFinished: 'activity_finished', |
@@ -8,2 +8,3 @@ import { CronjobEventMessage, EventMessage, ExternalTaskCreatedMessage, ExternalTaskLockedMessage, ExternalTaskUnlockedMessage, ProcessDeploymentMessage, ProcessInstancesDeletedMessage, ProcessIsExecutableChangedMessage, UserTaskFinishedMessage } from '@5minds/processcube_engine_sdk'; | ||
export declare type OnReconnected = (attempt: number) => void | Promise<void>; | ||
export declare type OnActivityErrorCallback = (activityError: EventMessage) => void | Promise<void>; | ||
export declare type OnProcessDeployedCallback = (message: ProcessDeploymentMessage) => void | Promise<void>; | ||
@@ -10,0 +11,0 @@ export declare type OnProcessInstancesDeletedCallback = (message: ProcessInstancesDeletedMessage) => void | Promise<void>; |
export declare const socketSettings: { | ||
namespace: string; | ||
paths: { | ||
activityError: string; | ||
activityReached: string; | ||
@@ -5,0 +6,0 @@ activityFinished: string; |
{ | ||
"name": "@5minds/processcube_engine_client", | ||
"version": "4.4.0-feature-ffb553-ljecqma5", | ||
"version": "4.4.0-renovate-03011f-ll276q20", | ||
"description": "Contains a typescript based client for accessing the Engine.", | ||
@@ -36,6 +36,6 @@ "main": "dist/commonjs/index.js", | ||
"dependencies": { | ||
"@5minds/processcube_engine_sdk": "4.0.0-develop-92a52b-ljeclwvo", | ||
"@types/socket.io": "^2.1.13", | ||
"@5minds/processcube_engine_sdk": "4.0.0-develop-3065a7-lks764xl", | ||
"@types/socket.io": "^3.0.0", | ||
"@types/socket.io-client": "^1.4.36", | ||
"cross-fetch": "3.1.6", | ||
"cross-fetch": "3.1.8", | ||
"socket.io-client": "2.5.0", | ||
@@ -42,0 +42,0 @@ "uuid": "^9.0.0" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
587169
165
7396
+ Added@5minds/processcube_engine_sdk@4.0.0-develop-3065a7-lks764xl(transitive)
+ Added@types/cors@2.8.17(transitive)
+ Added@types/socket.io@3.0.2(transitive)
+ Addedaccepts@1.3.8(transitive)
+ Addedbase64id@2.0.0(transitive)
+ Addedcookie@0.7.2(transitive)
+ Addedcors@2.8.5(transitive)
+ Addedcross-fetch@3.1.8(transitive)
+ Addedengine.io@6.6.4(transitive)
+ Addedengine.io-parser@5.2.3(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addednegotiator@0.6.3(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedsocket.io@4.8.1(transitive)
+ Addedsocket.io-adapter@2.5.5(transitive)
+ Addedvary@1.1.2(transitive)
+ Addedws@8.17.1(transitive)
- Removed@5minds/processcube_engine_sdk@4.0.0-develop-92a52b-ljeclwvo(transitive)
- Removed@types/engine.io@3.1.10(transitive)
- Removed@types/socket.io@2.1.13(transitive)
- Removed@types/socket.io-parser@3.0.0(transitive)
- Removedcross-fetch@3.1.6(transitive)
Updated@5minds/processcube_engine_sdk@4.0.0-develop-3065a7-lks764xl
Updated@types/socket.io@^3.0.0
Updatedcross-fetch@3.1.8