PDA

View Full Version : Publish/Subscribe issue


Sangeetha
04-05-2006, 05:52
Hi frnds:)

This is my first post to the forum....

Am a new bie to WebMethods,I am working on V6.1.
Am trying a simple Publish/Subscribe appln using JDBC adapter.
The application goes like this...

* Have created an InsertNotification
* Created a trigger which is triggered when a record is inserted to a particular table in a database and triggers a flow which inserts another record to another table.

The issue is that even though all the services run individually without any error,there is a problem when i run the flow service.I dont get any errors but NULL is inserted to the the table

I use MSSQL V8 and have also installed MSSQL 2000 DataDriver for JDBC.

I did check the logs for the same(using pub.flow.tracePipeline),the values are present in the publishnotifydocument, but NULL is being inserted into the table.

Can someone help me get out of this problem.

Thanks in Advance
Sangeetha

jeevanrego
04-05-2006, 06:01
Hi

How r u mapping the notification document to your insert statement in your flow service ?

Cheers
Jeevan

Sangeetha
04-05-2006, 06:20
The flow service takes the publish document as the input.
In the flow service I have the adapter service that inserts thew value into a table.

I just gave a link for the fields that I needed.

empId(pubdoc)-------->empId(insertInput)
Drag n drop....thts what i`ve done to map

jeevanrego
04-05-2006, 06:56
Hi Sangeetha

The fields datatype(VARCHAR ...) of the pubDoc should be same as the insertInput

You could also check in the input pipeline the notification document name should be same as the notification document published when its triggered.

Cheers
Jeevan

Sangeetha
04-05-2006, 07:16
Yes have done it in the same way...
The values in the server.log file is correct..but it is inserting NULL...;(

rmg
04-05-2006, 09:25
Sangeetha,

Inserting NULL..indicates that mapping to your insert AS fields is not working.Please step thru in your subscribing flow service until insert and make sure the inputs fields has the data before insert calls,probably you will find the root cause.let us know the results.

HTH,
RMG

Sangeetha
04-06-2006, 01:49
Hi rmg,
I checked the same,the value before inserting to db is null....but i donno y..
This is the trace i`m getting in Server.log file

--- END tracePipeline ---
0 insertSampOutput = null
2 pubId {java.lang.String} = 'KiyWLbl8kDI3ZfiO5_O41mssDGc__DefaultClient'
2 recvTime {java.util.Date} = 'Thu Apr 06 09:57:57 IST 2006'
2 enqueueTime {java.util.Date} = 'Thu Apr 06 09:57:57 IST 2006'
2 flags {java.lang.Integer} = '16'
2 age {java.lang.Integer} = '0'
2 trackId {java.lang.String} = 'c3ee9f412ff80ba610a2448514d6_1144297677916'
2 uuid {java.lang.String} = 'c3ee9f412ff80ba610a2448514d6_1144297677916'
2 businessContext {java.lang.String} = 'wm6:b99989c0c52511daa624a45bca03c709\snull\snull:wm6b99989c0c52511daa624a45bca03c709:null:IS_61'
2 activation {java.lang.String} = 'wm6b99989c0c52511daa624a45bca03c709'
2 locale {java.lang.String} = 'urn:icontext:webMethods'
1 _env {com.wm.data.ISMemDataImpl} =>
1 empName {java.lang.String} = 'ddd'
1 empId {java.lang.String} = '999'
0 folder:insertNotifyPublishDocument {com.wm.data.ISMemDataImpl} =>
--- START tracePipeline [4/6/06 9:57 AM] ---

Sangeetha
04-06-2006, 04:02
ok...Can anyone give me a brief explanation as to how to implement a simple Publish/Subscribe appln using a single IS.
So that i`ll verify what am doing is right or not...

jeevanrego
04-06-2006, 05:28
Hi Sangeetha

I am not exaclty sure what the error is ? RMG could surely help !!!

Try to refresh the JDBC Adapter services. Then re-map the data in the flow service and run it again , Hope this helps.

A simple pub/Sub is what you have already implemented ,i.e on any insert into the database table where you configured the webmethods trigger , an insert notification publishable document is fired which is subscribed by your flow service.

Cheers
Jeevan

Sangeetha
04-06-2006, 06:38
Should the Input document to the Flow service be the NotificationPublish document or a document tht references the NotificationPublishdocument?
Actually i tried both the cases...none worked;(
And jeevan i refreshed n tried as u told...even then ...;(((

jeevanrego
04-06-2006, 07:03
Hi Sangeetha

The input document to the flow service should have the complete namespace of the publishable document.

When it creates a publishable document when creating the insert notification trigger u could copy the same and paste it to u'r input tab. So it automatically references to u'r pubshiable doucument

Cheers
Jeevan

Sangeetha
04-06-2006, 07:16
Ya Jeevan,i`ve given the same.
When i try to run the trigger alone..I get this error msg
----------------------------------------------------
Could not run 'TryTrig'.



com.wm.app.b2b.server.ServiceException: [ISS.0085.9169] Could not validate data corresponding to publishable document: Dept1:InsertNtfyPublishDocument
---------------------------------------------
TryTrig is my trigger name
InsertNtfyPublishDocument is the notification document under the folder Dept1

Sangeetha
04-06-2006, 07:21
And wat does this error mean

"Can't start a cloned connection while in manual transaction mode."

rmg
04-06-2006, 07:59
Sangeetha,

You should set subscribe service input with publishable document name as is like
Dept1: InsertNtfyPublishDocument (Dept1: InsertNtfyPublishDocumentReference)..Did you set like this only?


HTH,
RMG

wmuser12
04-06-2006, 22:55
Hi rmg,

I am too facing the same issue. For some reason the data is not mapped properly.

The data is not retrieved from the pipeline.

Bye

wmuser12
04-06-2006, 23:45
when I tested the trigger , it gives the following error:

"Could not run 'insertTrigger'.

java.lang.NullPointerException".

rmg
04-07-2006, 08:08
Any thing missing in the trigger like publishable docname,sub service call??

Please check it.

HTH,
RMG

jeevanrego
04-07-2006, 13:05
Hi Sangeetha

Check the input document name as RMG said, where u have to give the fully qualified path of the notication of document.

-- "Can't start a cloned connection while in manual transaction mode."--

here the trigger already is processing a request and u must tried again too many times trying to to test the trigger , thats why I think the error popped up. A simailar error had once come to me.

Cheers
Jeevan

Sangeetha
04-10-2006, 00:45
Have given the right name..
Dept1:InsertNtfyPublishDocument which is of type document reference referencing the document InsertNtfyPublishDocument
and how do i come out of this error

Could not run 'TryTrig'.
com.wm.app.b2b.server.ServiceException: [ISS.0085.9169] Could not validate data corresponding to publishable document: Dept1:InsertNtfyPublishDocument

jeevanrego
04-10-2006, 07:54
Hi Sangeetha

Try to reference the document InsertNtfyPublishDocument
and set the name Dept1: InsertNtfyPublishDocument as u stated and try once more.

Also re-map u'r flow service also was hase this incoming data

Cheers
Jeevan

Sangeetha
04-11-2006, 00:22
Hey frnds...At last its working now ;) .Thanks a lots for all ur suggestions.
Since i`m doing a self learning course on WM6,i need another help frnds.
The scenario is like this---->
If i insert a record into D1_orders table it publishes a doc,triggers a flow and inserts the same data into D2_orders-->this is working

If i insert a record into D1_LineItems table it publishes a doc,triggers a flow and inserts the same data into D2_LineItems-->this is working

Now when both the events happen,i need to insert some data,which is a combination of both the tables into an audit table.

How do i go abt wid this?
I tried using 2 conditions in a trigger and AND them,but the Joins property is not enabled.Says N/A(Not applicable)

Could someone guide me for the same.

Sangeetha
04-12-2006, 01:05
When do we get this error
Server Log Entries as of 2006-04-12 11:43:30 GMT+05:30
[2043]2006-04-12 11:40:15 GMT+05:30 [ISS.0106.0004D] Received Duplicate Document of type: Dept1:L1InsertNotifyPublishDocument for activation key: Audit:AuditIn:wm6ffd94410c9ea11daa3229151233c424b
[2042]2006-04-12 11:40:13 GMT+05:30 [ISS.0106.0004D] Received Duplicate Document of type: Dept1:L1InsertNotifyPublishDocument for activation key: Audit:InsertInto2:wm6ffd94410c9ea11daa3229151233c424b
Wats the soln?

jaya0313
04-14-2006, 15:54
Sangeetha,
Go through this.
https://advantage.webmethods.com/advantage?targChanId=kb_home&oid=1612979913
Thanks,
Jay

ictgonzo
08-27-2008, 05:46
Hey frnds...At last its working now ;)

Hi Sangeetha, please explain me how you solved the problem of null value passed by trigger, I have the same problem!!!

I need to create a scenario identical to you...


The scenario is like this---->
If i insert a record into D1_orders table it publishes a doc,triggers a flow and inserts the same data into D2_orders-->this is working