I need to get my current process group identifier in order to send it to another tool.
I know that I can get it from the UI but I don't want to hardcode it.
And I don't want to use the Rest API because I want to get the identifier of the process group I'm currently executing.
Is there a way ? Like a core attribute which contains this identifier ?
Thanks.
Related
Please guide me whether is there any way to get the response data from jmeter to robotframework? I have integrated robotframework with jmeter and my use case is to do the data base validation using robotframework for that i want to get the unique id which i recieved in jmeter responce data.Due to some use case i cannot perform Database validation in jmeter itself.
I Dont see any keyword in the documentation,
https://kowalpy.github.io/Robot-Framework-JMeter-Library/JMeterLib.html
I don't think the plugin offers such functionality so the most straightforward way is writing your unique id into a file, depending on how you're getting the ID you can:
Use Save Responses to a file listener - it stores the whole response into a separate file
Use Sample Variables property - it adds specified JMeter Variable(s) values as a separate column(s) in the .jtl results file
Use Flexible File Writer listener where you have the full freedom to choose regarding what, where and how to store
Once done you can read the file using OperatingSystem library and do whatever you need with this ID
I have a SPA who need to automatically detect if she need to be updated by the user.
When I compile ("npm run production") I would like generate an ID or any hash and then write it in a table or a file.
It is possible ?
NB : After that on my client side, I will check (by api call) if a new version exists by comparing the hash or id version.
Thanks
I want to update my processor_group variable via a processor. Even ExecuteScript works. Can this be achieved?
You can only update the variable registry through the REST API, the same way the UI does.
It is a PUT to /process-groups/{id}/variable-registry:
https://nifi.apache.org/docs/nifi-docs/rest-api/index.html
Just as an update to this Answer:
The nifi url you need is (default basic nifi node):
http://[IP ADDRESS]:8080/nifi-api/
The full api url you need to POST an update to an attribute is:
http://[IP ADDRESS]:8080/nifi-api/process-groups/[Process Group ID]/variable-registry/update-requests
An example of the payload is:
{"processGroupRevision":{"clientId":"c530ce77-0174-1000-fb36-93fa5e92e574","version":6},"disconnectedNodeAcknowledged":false,"variableRegistry":{"processGroupId":"c53cdaff-0174-1000-7922-5285dec53a94","variables":[{"variable":{"name":"authToken","value":"test3"}}]}}
To learn more about the payload, do some variable work in your NiFi UI and watch your developer tools for the "update-requests" entries and pay attention to the [Process Group ID] and the Payload.
I'm trying to use express-flash in a standard web express js app. I don't want to use session, because I want to do the app as stateless as possible, but when I try to use without session, the app show me this error:
req.flash() requires sessions
Can I use express-flash without session? Can I use other alternatives for this kind of messages?
Thanks.
Note: A flash message is a variable stored within a session that is only available once, for the next request. That is if we put a flash variable and renders a page, the flash variable is available but if we render the same (or other) page again the flash variable is not present (it is destroyed).
-- acanimal
Based on this premise, you need to have sessions to use message flashing.
One way I think you can accomplish what you want is to add an item to the request (req) object in your middleware, and then in your controller, check if the key exists. You can then pass a specific message to your template, assuming you're using a template engine or pass it as part of your response.
Hope this helps.
I am trying to create a pass that will auto open when its near a beacon.?
I can achieve that. However I would like to get a count on my server as to how many times the pass was auto opened to see how many users who downloaded the pass were close to the location..?
how can i do that.?
Short answer - no, if it were possible then it would be documented in the Passbook web service specification.