Hi again
For the webinterface, i need to provide a manual on how to create user_variables but it looks like this part is somehow buggy. Maybe there are workarounds already known?
What i do when creating a new variable is to open the variables editor on a random node, e.g. populate varaibles. In the "Select variable:" window, i select the "User" tab (if any) and thne rigthclick - New. After that, the corresponding variable does not exist in the workflow export xml, nor in the API
http://localhost:65445/api/json/v1/work ... 1220091541
What i could already figure out is, that the created user_variable from above will exist in the exported workflow xml as soon as i started some job after registering the new variable.
But i did not yet manage to get out what is needed to get the variable visible in the API calls. I know it is possible because i already had some variables in the API calls but i don't know how to get there intentionally.
By the way, i did not yet manage to get ANY user_variables in the details call, even when the above one already shows the variable. I would love to use the details call, as the other one contains a lot less information. But currently i need to utilize both calls to get out all details
http://localhost:65445/api/json/v1/workflows/details
Cheers!
emcodem
API user_variables hard to create and not visible in API while XML export shows them!
API user_variables hard to create and not visible in API while XML export shows them!
emcodem, wrapping since 2009 you got the rhyme?
Re: API user_variables hard to create and not visible in API while XML export shows them!
Hi emcodem,
A while ago I fixed several issues regarding dealing with user variables in different scenarios. The issues you're reporting are some of them so stay tuned for the next version. I will send you a beta-build so you can test your nice web interface
-steinar
A while ago I fixed several issues regarding dealing with user variables in different scenarios. The issues you're reporting are some of them so stay tuned for the next version. I will send you a beta-build so you can test your nice web interface
-steinar
Re: API user_variables hard to create and not visible in API while XML export shows them!
Hey Steinar,
lots of thanks for the quick response, looking forward to the beta but take your time...
Actually i thought there might be a simple workaround as it seems to work sometimes... I guess one just has to know where to click in order to present the variable to the API as well?
Thanks!
emcodem
lots of thanks for the quick response, looking forward to the beta but take your time...
Actually i thought there might be a simple workaround as it seems to work sometimes... I guess one just has to know where to click in order to present the variable to the API as well?
Thanks!
emcodem
emcodem, wrapping since 2009 you got the rhyme?
Re: API user_variables hard to create and not visible in API while XML export shows them!
Hey steinar,
very good news, i was able to find a workaround:
The user_variables are only presented to the api when they are (or have ever been) actually used in a value field.
So i can create and edit variables but only when they are used in some value field (i used populate to test, i believe it works with any value field), they are visible to the API. In the end this makes somehow sense.. why should non used variables be presented to the API
This way i can write a nice user manual how to use the mighty variable feature for job creation on the WebUI
Cheers!
emcodem
very good news, i was able to find a workaround:
The user_variables are only presented to the api when they are (or have ever been) actually used in a value field.
So i can create and edit variables but only when they are used in some value field (i used populate to test, i believe it works with any value field), they are visible to the API. In the end this makes somehow sense.. why should non used variables be presented to the API
This way i can write a nice user manual how to use the mighty variable feature for job creation on the WebUI
Cheers!
emcodem
emcodem, wrapping since 2009 you got the rhyme?
Re: API user_variables hard to create and not visible in API while XML export shows them!
User variables not used in a workflow will not be exposed in the API (or the exported XMLs). As you point out, this makes sense and it's by design.
-steinar
-steinar