@5minds/processcube_engine_client
Advanced tools
Comparing version 4.4.0-develop-e711a7-ljectjgs to 4.4.0-develop-ec278f-ljej5e9p
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 { |
@@ -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; |
"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 { |
{ | ||
"name": "@5minds/processcube_engine_client", | ||
"version": "4.4.0-develop-e711a7-ljectjgs", | ||
"version": "4.4.0-develop-ec278f-ljej5e9p", | ||
"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-104a59-ljeixxgq", | ||
"@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
585259
7362
+ Added@5minds/processcube_engine_sdk@4.0.0-develop-104a59-ljeixxgq(transitive)
- Removed@5minds/processcube_engine_sdk@4.0.0-develop-92a52b-ljeclwvo(transitive)
Updated@5minds/processcube_engine_sdk@4.0.0-develop-104a59-ljeixxgq