Situation:
I looked at http://support.adeptia.com/entries/36873846-Use-Case-Record-by-record-processing-in-a-loop-in-process-flow. I want to do something similar, record by record processing but instead of directly putting those records in target, I was wondering if I can get that individual record in custom plugin? For example, instead of target, if I had a custom plugin where I call a stored procedure, I want to pass some of the record values to a stored procedure from that custom plugin. So can I get that record from context in Custom plugin and split to use only certain needed fields
Solution:
In your scenario the activity after Record Queue Receiver will be a Mapping where the target schema in the mapping would be context schema (Actions > Create Context Schema). The incoming data can be mapped to the context variables through this Mapping (make the generate stream to false) and then execute your custom plugin.
In the custom plugin you can declare a variable such as
String companyid = context.get("companyid");
To get the values from the context variable and use it in your stored proc code.
For example companyid can be the context variable name in the mapping which you are using in the custom plugin.
For info on how to use the custom plugin refer to
http://support.adeptia.com/entries/36949426-Use-Case-Create-a-custom-service-using-Custom-Plugin
Comments
0 comments
Article is closed for comments.