Skip to main content

Hi,

I am querying a DB table for some records and filtering few of them to create an XML string then sending this to an web service through HTTPCaller.After successfully sent this XML,i would like to update the table back with status filed = 'Y' for all the records i have fetched initially.

The records i am fetching has got ID field which i would like to use for matching purpose but how could i store this ID within the workspace initially after fetching from DB and reuse for my update at the end of my process?

Any help would be much appreciated.

Thanks,

reachmj

Hi @reachmj, the feature entered into the HTTPCaller would be output via the Output port, if the HTTP request was successful. If the input feature has the ID as an attribute, it will be propagated to the output feature, so I think you can just connect a writer to the port in order to update the database. The FeatureWriter, SQLExecutor, or DatabaseUpdater could also be used to update DB instead of a writer.


Hi @reachmj, the feature entered into the HTTPCaller would be output via the Output port, if the HTTP request was successful. If the input feature has the ID as an attribute, it will be propagated to the output feature, so I think you can just connect a writer to the port in order to update the database. The FeatureWriter, SQLExecutor, or DatabaseUpdater could also be used to update DB instead of a writer.

Hi Takashi,

 

Thanks for your quick response.The HTTPCaller got 2 input features

 

1.First one is XML textline where no ID field (Run time order 1)

 

2.ID value from the initial SQL executor (Run time order 2)

 

First input XML message successfully output through Output Port

 

But unfortunately the second inputs are rejected through the HTTPCaller's Rejected port as because its got only ID field,so i am unable to do mapping.

 

Any clue please?

 

 

Thanks,

 

reachmj

 

 


Hi @reachmj, the feature entered into the HTTPCaller would be output via the Output port, if the HTTP request was successful. If the input feature has the ID as an attribute, it will be propagated to the output feature, so I think you can just connect a writer to the port in order to update the database. The FeatureWriter, SQLExecutor, or DatabaseUpdater could also be used to update DB instead of a writer.

If you have only two features, you can just merge them unconditionally before the HTTPCaller, with a FeatureMerger (set a constant value e.g. "1" to Join On for both Requestor and Supplier) or an Aggregator (Accumulation Mode: Merge Incoming Attributes).

 

 


There's also the VariableSetter and VariableRetriever that can be very helpful sometimes.


Reply