V
V
Vyacheslav Uspensky2014-11-20 21:07:25
PHP
Vyacheslav Uspensky, 2014-11-20 21:07:25

What is the best way to subscribe to notifications?

The essence is approximately the following, there is a system of comments, like the ones here, only belonging to a certain number of objects. Each comment has fields: related_to_type, related_to_id and now I am adding one more related_to_1c_uid.
There is a table of subscriptions in order to send notifications, when a response or registration of a new object is added, a subscription is added. Everything was wonderful, until this thing was extended to interact with 1c, where I can not natively control the life of objects. Now I see the following options:
1. A trigger on the 1s table that adds a subscription to the owner when a row appears, but this will complicate the life of the 1s programmer, because when the configuration changes, 1s recreates the table
2. In addition to the subscription, a certain get_owner function, in which, by type, specify where to look for the owner and use this function on all objects for the owner of the object, while excluding it from subscriptions.
3. Others.
Here's something stuck, I can't decide what to choose 8(
PS again, the question is how to properly organize subscriptions and how you would do it on loaded sources.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
X
xmoonlight, 2014-11-20
@xmoonlight

Little is clear... You
need a wrapper (or a link to the database) between 1C and your scripts.
Or access to the 1C database (instead of data replication).

_
_ _, 2014-11-20
@AMar4enko

Well, strain the 1C programmer so that when creating an entity that can be subscribed to, he pulls some url on your server. This is a dumb task.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question