fun loadWorkflowData(stepId: String, key: String?): Any? { var data: Any? = null val workflowUri: String = getMainWorkflowUri(stepId) try { if (workflowUri != null) { val dataPath: String = java.lang.String.format(_zkStepDataPath, workflowUri) + java.lang.String.format( _zkWorkflowData, key ) if (_dataManager.checkExists(dataPath) != null) { data = _dataManager.getData(dataPath, false) } } } catch (ex: Exception) { val exMsg = "Exception adding global data to workflow from stepId: " + stepId + ": " + ex.message _log.error(exMsg) data = null } return data }
Gets the step workflow data stored under /workflow/stepdata/ { workflowURI } /data/ { key } where workflowURI is the URI of the main workflow regardless of whether the step belongs in the main workflow or one of its nested workflows .