Matt, Is there a way tell what parts of the ProcessorDTO object (or any *DTO) apply on a create/update request versus what gets returned in response to a get request?
What you said makes sense to me now, but I struggled with it starting out. The API docs for creating a processor show all the fields of the RelationshipDTO schema without indicating any read/write status, so I expected that posting a new Processor with relationships having "autoTerminate: true" in them to set the flag on the processor or throw an error that it couldn't apply the read-only value. I eventually sorted it out by debugging the UI requests, which is a great for getting insight into the REST API. Regards, Joe On Thu, Jul 28, 2016 at 1:30 PM, Nawaz Akther -X (nakther - INSIGHT GLOBAL INC at Cisco) <[email protected]> wrote: > That worked! Thanks Matt. > > > > Nawaz. > > > > *From:* Matt Gilman [mailto:[email protected]] > *Sent:* Thursday, July 28, 2016 12:27 PM > > *To:* [email protected] > *Subject:* Re: changing processor relationship via REST API > > > > Nawaz, > > > > Yes. The relationships array is read-only and reports the current state of > the relationship. There is a separate array called > autoTerminatedRelationships in the processor config. > > > > { > > "config": { > > "autoTerminatedRelationships": ["success"] > > } > > } > > > > Let me know if you have any other questions. Thanks! > > > > Matt > > > > On Thu, Jul 28, 2016 at 1:20 PM, Nawaz Akther -X (nakther - INSIGHT GLOBAL > INC at Cisco) <[email protected]> wrote: > > Matt, > > > > "relationships": [ > > { > > "name": "success", > > "description": "All created FlowFiles are routed to this > relationship", > > "autoTerminate": true > > } > > ], > > > > > > I have added this bit in the JSON. Even though I set the autoTerminate to > true it stays false. > > > > Thanks, > > Nawaz > > > > *From:* Matt Gilman [mailto:[email protected]] > *Sent:* Thursday, July 28, 2016 12:15 PM > *To:* [email protected] > *Subject:* Re: changing processor relationship via REST API > > > > Nawaz, > > > > Can you double check how you're attempting to set the relationship to > auto-terminate? There is a flag which is part of the Relationship that is > considered read-only and reports the current state of the relationship. > However, to auto-terminate a connection you need to add it to the > autoTerminatedRelationships array in the processor config. If you open up > the Dev Tools in your browser you should be able to see it in action. > > > > Let me know if you have any other questions. Thanks! > > > > Matt > > > > > > > > On Thu, Jul 28, 2016 at 1:02 PM, Nawaz Akther -X (nakther - INSIGHT GLOBAL > INC at Cisco) <[email protected]> wrote: > > Hi, > > > > I am trying to create an executeProcess processor via the REST API. And I > am trying to set the relationship of success to be auto terminated. And for > some reason if I include the autoTerminate as True in the JSON the > processor is still created with the autoTerminate option as False. And I am > trying to change it via a PUT call and it still remains false. Has onyone > encountered this problem. > > > > Thanks, > > Nawaz > > > > >
