@5minds/processcube_engine_client
Advanced tools
Comparing version 4.4.0-develop-90d5fd-ljedlwnl to 4.4.0-develop-af179d-lks7jcjx
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) { | ||
@@ -75,2 +78,21 @@ return mapCallActivity(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) { | ||
@@ -77,0 +99,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) { | ||
@@ -75,2 +78,21 @@ return mapCallActivity(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) { | ||
@@ -77,0 +99,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-develop-90d5fd-ljedlwnl", | ||
"version": "4.4.0-develop-af179d-lks7jcjx", | ||
"description": "Contains a typescript based client for accessing the Engine.", | ||
@@ -36,3 +36,3 @@ "main": "dist/commonjs/index.js", | ||
"dependencies": { | ||
"@5minds/processcube_engine_sdk": "4.0.0-develop-92a52b-ljeclwvo", | ||
"@5minds/processcube_engine_sdk": "4.0.0-develop-3065a7-lks764xl", | ||
"@types/socket.io": "^2.1.13", | ||
@@ -39,0 +39,0 @@ "@types/socket.io-client": "^1.4.36", |
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
586732
7376
+ Added@5minds/processcube_engine_sdk@4.0.0-develop-3065a7-lks764xl(transitive)
- Removed@5minds/processcube_engine_sdk@4.0.0-develop-92a52b-ljeclwvo(transitive)
Updated@5minds/processcube_engine_sdk@4.0.0-develop-3065a7-lks764xl