diff --git a/process/Workflow_lib/process.js b/process/Workflow_lib/process.js index 6bea1c6a4d8262beb8400e58754aca2c88a19468..8d37e73e425a55ff6086c0089d24f2974754b0ff 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); } /**