I am trying to update processors for a workflow, which was previously generated 
from a template by instantiating it. All work is done from a Java program 
through NiFi REST API. Template holds processors in a group. Since I know the 
template group name and strategy by which NiFi assigns a new group name when it 
instantiates a template ("Copy of " <original group name in a template>), I 
find instantiated group by name, get its group id and get list of processors in 
the group a ProcessorsEntity object. I then step through the list of processors 
contained in ProcessorsEntity, and for each processor set desired properties 
contained in  ProcessorEntity and its linked ProcessorDTO and 
ProcessorConfigDTO classes. I then set ClientId in the Revison object like this:
Here proc is ProcessorEntity and restClient is a custom class which contains 
all code necessary to communicate with NiFi REST API.
At this point I am trying to update the processor through PUT/processors/{id} 
call, passing it modified data in ProcessorEntity, the same one that I got from 
ProcessorsEntity and update in place, rather than updating a copy. I figured 
that there is no need to do it for a DTO object.
When I execute PUT/processors/{id} call, I get an exception, which I need the 
help with. Here is what I see in Eclipse.
Exception when calling: ProcessorsApi#updateProcessor
Response body: Text '01/01/1970 13:04:02 EST' could not be parsed at index 2 
(through reference chain: 
io.swagger.client.ApiException: Bad Request
               at io.swagger.client.ApiClient.execute(ApiClient.java:981)
               at com.bdss.nifi.trickle.Trickle.main(Trickle.java:132)

Everything that begins with com.bdss.nifi.trickle are classes in the Java 
application which I am implementing.
To access NiFi REST API I am using this REST client: 
https://github.com/simplesteph/nifi-api-client-java, which itself relies on 

Many thanks for any tips.

STATEMENT OF CONFIDENTIALITY The information contained in this email message 
and any attachments may be confidential and legally privileged and is intended 
for the use of the addressee(s) only. If you are not an intended recipient, 
please: (1) notify me immediately by replying to this message; (2) do not use, 
disseminate, distribute or reproduce any part of the message or any attachment; 
and (3) destroy all copies of this message and any attachments.

Reply via email to