[ 
https://issues.apache.org/jira/browse/OFBIZ-5333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14008092#comment-14008092
 ] 

Ivan Cauchi commented on OFBIZ-5333:
------------------------------------

thanks again Jacques for your help in this and your encouragement.

OFBiz users are beneficiaries of such an impressive product, that we feel 
giving something back is only fair and in line with the spirit of open source.

If we encounter anything else that might be of interest to the OFBiz community, 
no doubt you'll hear from us again.

> Trigger for service to run upon subscription expiry
> ---------------------------------------------------
>
>                 Key: OFBIZ-5333
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5333
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: content, order, product
>    Affects Versions: SVN trunk
>            Reporter: Ivan Cauchi
>            Assignee: Jacques Le Roux
>              Labels: entity, expiry, patch, product, service, subscription
>             Fix For: SVN trunk
>
>         Attachments: CR_0003_V05.updated.patch, OFBIZ-5333 - Trigger for 
> service to run upon subscription expiry.patch
>
>
> This issue is a follow up of a discussion on the Ofbiz user and dev fora, 
> titled 'Subscription Functionality'.
> The main characteristics of the Ofbiz subscriptions are:
> a) 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 Content.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 Content.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 SubscriptionResource entity, called 
> serviceNameOnExpiry (note to people that had followed the discussion on the 
> Ofbiz mailing lists: the field name has been shortened to fit the 30 
> character limit).  This would contain the service to run to trigger the 
> deprovisioning process.  If containing null, nothing would be run, and Ofbiz 
> exhibits the current default behaviour.
> b) create a new service runServiceOnSubscriptionExpiry within 
> SubscriptionServices.java, that is scheduled to run regularly, similar to the 
> existing runSubscriptionAutoReorder.  This code would check whether a 
> subscription has expired.  If so, and a service exists within 
> SubscriptionResource.serviceNameOnExpiry, and Subscription.automaticExtend=N, 
> this code runs that service.  
> This approach has the advantage of complete separation of the default and new 
> functionality with the cost of some additional database lookups.
> We will be submitting patches for this new functionality shortly.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to