The issue I'm having is passing the Catalog location/Directory of the asset ("Start \ L&D Mandatory Training \ Model 2: Data model-led \ Data: Course completions") itself into the workflow, as I need to parse out some of the detail. Is it possible for the asset to identify it's own location on Catalog?
Good question. There are no built-in tools for that. If the asset is guaranteed to have a unique name, then it's possible to build a list of all assets in all directories and then filter by the asset name.
Below is a sample project that lists recursively all assets in all directories in the current space.
Thanks Dmitry, might be something to consider, in our Catalogue development work there might be some applications for an Asset to self-identify it's (and/or it's Directory's) ID (do Catalogue Directory/Asset IDs exist?) and location.
For example, I'm trialling a data access workflow, whereby a user clicks 'Retrieve' which then triggers an email chain to their manager and Data Lead. At the moment the Workflow works, and is able to log the distinct instances of 'Retrieve', but can't self-identify the dataset it applies to. The workflow itself could be applied to an unlimited number of datasets but the morph remain agnostic to the data (i.e. no data-identifying filtering within), so we might only need one morph, rather than one for each dataset.
Since your email on this topic, I've been trying to think of ways to achieve this as there is no current way to directly get which Catalog asset which triggered the workflow.
The EM Server Journal does include entries for the retrieval of an asset including the name and path within the Catalog.
I'd hoped we could query the journal DB for the workflow run ID and then get the asset this way, but the run ID isn't stored in the journal as far as I can see. You could take the chance that it is the last Catalog Asset request from the specific user which would probably be fairly reliable but wouldn't be guaranteed.
The only other solution I can currently think of is to keep your main approval workflow as is and create separate mini workflows, one for each Catalog Asset. These mini workflows do nothing but call the main workflow, passing an identifier for the specific Asset requested. Something like this: