Is it possible to have the name of the graph that is currently executing available as a parameter available in CTL?
My use case is that I have many graphs running synchronously (via RunGraph) doing various data checks. If an issue is found the graph will write this to a log and I’d like to include (as part of that log) what graph picked up the error. Currently i’m hard coding the values in each graph but it’s cumbersome to maintain and would be great if I could just have the value dynamically populated.
I know this can be done when using the Server license but that’s not available to me so wondering if behavior can achieved in Designer.
As I understand it, you would like to use a graph name and write it to a field using CTL transformation. To do that, you might find the following code useful:
This piece of code will write graph file identification to the output in the following form:
graph/graphname.grf
The “graph” states for Graph directory in the project path. If you don’t want that extra part to be there, you might want to use some string functions such as split. Example:
That’s exactly what I needed. I did not see the GRAPH_FILE parameter listed in workspace.prm - is there a place all the parameters available are documented?
The parameters available are indeed listed in the documentation (https://doc.cloverdx.com/latest/server/graph-parameters.html). However, please don’t get confused that the link is from Server-related documentation. These parameters are used in the Designer runtime as well.
You might have also noticed, that the previously mentioned parameter GRAPH_FILE is not listed on the above-mentioned page. Recently I have been informed that this parameter is about to be deprecated soon and we should be using JOB_FILE parameter instead. Doing so in a graph (.grf design) will behave the same way as the GRAPH_FILE parameter.