From e972c8fe1251ffbc40a6b9535c3e0280efd1e673 Mon Sep 17 00:00:00 2001 From: Sebastian Listl <s.listl@adito.de> Date: Mon, 12 Oct 2020 12:09:49 +0200 Subject: [PATCH] WorkflowSignalSender variables added to method arguments --- process/Workflow_lib/process.js | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/process/Workflow_lib/process.js b/process/Workflow_lib/process.js index 6bea1c6a4d8..8d37e73e425 100644 --- a/process/Workflow_lib/process.js +++ b/process/Workflow_lib/process.js @@ -128,33 +128,36 @@ WorkflowSignalSender.EVENT_DELETE = function () * Adds an entry to a context-variable that tells a insert happened. The variable is then checked by WorkflowSignalSender.doInsertedOrUpdated, * where the actual logic is executed. The reason for this approach is that 'inserted' signals should be thrown after the insert finished. * - * @param {String} pTargetId uid of the inserted dataset - * @param {String} pTargetContext context of the inserted dataset + * @param {Object} [pVariables] variables to set + * @param {String} [pTargetId=$sys.uid] uid of the inserted dataset + * @param {String} [pTargetContext=current context] context of the inserted dataset */ -WorkflowSignalSender.inserted = function (pTargetId, pTargetContext) +WorkflowSignalSender.inserted = function (pVariables, pTargetId, pTargetContext) { - WorkflowSignalSender.eventHappened(WorkflowSignalSender.EVENT_INSERT(), pTargetId, pTargetContext); + WorkflowSignalSender.eventHappened(WorkflowSignalSender.EVENT_INSERT(), pTargetId, pTargetContext, pVariables); } /** * Adds an entry to a context-variable that tells a update happened. The variable is then checked by WorkflowSignalSender.doInsertedOrUpdated, * where the actual logic is executed. The reason for this approach is that 'updated' signals should be thrown after the update finished. * - * @param {String} pTargetId uid of the updated dataset - * @param {String} pTargetContext context of the updated dataset + * @param {Object} [pVariables] variables to set + * @param {String} [pTargetId=$sys.uid] uid of the inserted dataset + * @param {String} [pTargetContext=current context] context of the inserted dataset */ -WorkflowSignalSender.updated = function (pTargetId, pTargetContext) +WorkflowSignalSender.updated = function (pVariables, pTargetId, pTargetContext) { - WorkflowSignalSender.eventHappened(WorkflowSignalSender.EVENT_UPDATE(), pTargetId, pTargetContext); + WorkflowSignalSender.eventHappened(WorkflowSignalSender.EVENT_UPDATE(), pTargetId, pTargetContext, pVariables); } /** - * @param {String} pTargetId uid of the deleted dataset - * @param {String} pTargetContext context of the deleted dataset + * @param {Object} [pVariables] variables to set + * @param {String} [pTargetId=$sys.uid] uid of the inserted dataset + * @param {String} [pTargetContext=current context] context of the inserted dataset */ -WorkflowSignalSender.deleted = function (pTargetId, pTargetContext) +WorkflowSignalSender.deleted = function (pVariables, pTargetId, pTargetContext) { - WorkflowSignalSender.eventHappened(WorkflowSignalSender.EVENT_DELETE(), pTargetId, pTargetContext); + WorkflowSignalSender.eventHappened(WorkflowSignalSender.EVENT_DELETE(), pTargetId, pTargetContext, pVariables); } /** -- GitLab