My requirement is to extract the records from a table to insert the same to another table. Instead of directly inserting
them after extraction through adapter services, client specified to use publish/subscribe mechanism for this
(publishing a document for each extracted record, subscribing to the
published document and through it inserting the records in the target table.
I am using Broker and one IS only (both for publish and subscribe). The
strategy I used:
- insert notification for the source table and a trigger which takes insert notification publish document and invokes a flow service (in this I publish the records using a loop over records).
I have to subscribe to published documents through a trigger for which I
need the publishable document type. I tried to create a document refernce for the broker document type, but it is not allowing me to do it, saying that specified Broker Document Type is already bound to Document Type insertNotifyPublishDocument.
So I used the nsertNotifyPublishDocument even for the subscription trigger also. But I am not getting the result (updattion in the target table).
I observed the documents published number is getting increased in the Broker Admin, but not sure whether the particular records are getting published or not. How to see the exact document published in IS 6.1 ? I can take the document reference only in the Input fields place, which requires manual input, which I don’t want. I mapped the extracted records to a document for publish service. But I am getting an exception :
“Invalid input. ‘document’ is a required parameter of type IData”
If I specify the input (document reference of insertNotifyPublishDocument), I am getting the error:
"Invalid input. documentTypeName’ is a required parameter of type String.
Could anyone help me out in getting the result ?
On the DocumentTypeName of pub:publish service, have u given the type of document?
Then u can use document tracker tool to see the exact records have published or not.if u dont have the above tool, just use savePipeLine and restorePipeline only for checking the published records.
Then try to give the input as document type with same fields of publishable document with fully qualified name in your subscribing service.
i mentioned here what i knows,if anything wrong means please experts correct me.
Thanks & regards
I guess the way u r subscribing the doc is not correct.
follow these steps:
- Have ur Notification as it is
- Create a Document in IS, which have structure like ur database.
- Make that doc publishable.
- in Notification service, where u r looping through the database records, map database fields to ur Docuement(Step 2).
- Publish that document.
- Subscribe that doc using trigger.
- than read the document and do the Insert.
- Please note that the notification publishable doc and ur data publishable docs are different.
- There will be two main service, one which create the doc after Notification. and the other one which subscribe it.
Hi Nandoo and Bibek,
Thanks for your replies.
Bibek, This time I created another document type (name: publishableBar, as you see in the screen shot) which has the structure of database and made it publishable and synchronized it with Broker document type also. I used a trigger to use insertNotifyPublish document and invoke a flow service which has the select adapter service and in loop (for the select adapter service output), publish service. I attached the screen shot of it. In publish service I set the value publishable document type I created for ‘documentType’ (documentType=BAR.getBar:PublishableBar) and for document, I mapped the select adapter service output to document. You can see it in the screenshot. But still if I do an insertion in the source database table, the number of documents published for publishableBar Broker document is not getting increased, but it is happening for insertNotifyPublishable Broker document.
Also, in the subscriber service which would be invoked by subscription trigger, I have included an insert adapter service to insert into target database table. But for reading the published document before that, what should I do ? Could you please tell me how can I proceed for it ? (Also, about not getting the publshed document for wm::is::BAR::getBar::PublishableBar).
Sorry, I tried to attach the sreenshot, but could not because of limit - 70 KB. Even after zipping it, it is slightly exceeding (72 KB). Can we request for more uploading size limit ??