ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Falcon ICT Pty Ltd <falcon...@gmail.com>
Subject Subscription functionality
Date Tue, 24 Sep 2013 05:26:40 GMT
Hi all

I have been thinking of this subject for a while.  The main characteristics
of the Ofbiz subscriptions are:
a) as noted in the Amicontech link, the access control of the subscribed
internal content is missing, and can be provided by custom means. As well,
subscription to content on external systems needs a trigger, which can be
provided through serviceName.
b) the subscription model has an inbuilt assumption that access to the
resource is terminated outside of the default Ofbiz, such as by a custom
Ofbiz process or an external process.

The generic use case I'm thinking of is external systems providing content
to which a client desires to subscribe which don't have an inbuilt expiry.
 These systems require a trigger to enable provisioning, and another
trigger to enable deprovisioning.

Ofbiz can be used to manage the provision of access to such external
content, triggering the provisioning process through a service in
serviceName.  What's missing is an (optional) trigger for the
deprovisioning process.

One way which we're thinking of resolving this is:
a) to add another column to the Content entity, called
serviceNameOnSubscriptionExpiry.  This would contain the service to run to
trigger the deprovisioning process.  If containing null, nothing would be
run, and the Ofbiz exhibits the current default behaviour.
b) add some code to an existing Ofbiz service, or create a new one, that is
scheduled to run regularly.  This code would check whether a subscription
has expired.  If so, and a service exists within serviceNameOnExpiry, and *
Subscription.automaticExtend=N,* this code runs that service.  This code
can be added as a modification to runSubscriptionAutoReorder in
OrderServices.java,  or as a new process runServiceOnSubscriptionExpiry
within SubscriptionServices.java.  The former has the advantage that lookup
of subscription entities is done once, both for extension and expiry, with
the disadvantage of the code may be seen as beyond scope of the existing
service.  The latter has the advantage of complete separation of the
default and new functionality with the cost of more database lookups.

If there is any interest in the Ofbiz community, I'd be prepared to offer
this code for inclusion in the Ofbiz trunk.  I'm also open to any
suggestions or discussion.

regards


-- 
Ivan Cauchi
Director
Falcon ICT Pty Ltd

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message