[
https://issues.apache.org/jira/browse/OFBIZ-5333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jacques Le Roux reassigned OFBIZ-5333:
--------------------------------------
Assignee: Jacques Le Roux
> 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
>
>
> 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)