diff --git a/process/Workflow_lib/process.js b/process/Workflow_lib/process.js index baa1aa8dd3a01987ff1b06d66d7f6d33000fefcc..31639afe38fc1c35b729b59fd89c7c96b2b68738 100644 --- a/process/Workflow_lib/process.js +++ b/process/Workflow_lib/process.js @@ -48,15 +48,18 @@ WorkflowUtils.openNewInstance = function (pVariables, pTargetIds, pTargetContext { if ((!pTargetIds || pTargetIds.length === 0) && pSelectionFilter) pTargetIds = []; + else if (!pTargetIds) + pTargetIds = [WorkflowVariables.TARGET_ID.getDefaultValue()]; if (!pVariables) pVariables = {}; Object.assign(pVariables, WorkflowVariables.getTargetVariables(pTargetIds, pTargetContext)); neon.openContext("WorkflowLauncher", "WorkflowLauncherEdit_view", null, neon.OPERATINGSTATE_VIEW, { - "ProcessVariables_param" : JSON.stringify(pVariables), - "TargetContext_param" : pVariables[WorkflowVariables.TARGET_CONTEXT()], - "TargetFilter_param" : pSelectionFilter ? JSON.stringify(pSelectionFilter) : "" + "ProcessVariables_param": JSON.stringify(pVariables), + "TargetContext_param": pVariables[WorkflowVariables.TARGET_CONTEXT()], + "TargetFilter_param": pSelectionFilter ? JSON.stringify(pSelectionFilter) : "", + "Targets_param": JSON.stringify(pTargetIds) }); } @@ -273,7 +276,7 @@ WorkflowVariables.TARGET_ID = function () */ WorkflowVariables.TARGET_ID.getDefaultValue = function () { - return vars.get("$local.uid"); + return vars.exists("$local.uid") ? vars.get("$local.uid") : vars.get("$sys.uid"); } /**