Hi Samith and Gayan, Thank you for pointed out the mistake. I have updated the diagram by having different diagrams for both life cycles.
*Life cycle for non uploadable applications* *New Life cycle for uploadable applications* Thanks. Mahendran Pirinthapan Software Engineer | WSO2 Inc. Mobile +94772378732. On Fri, Oct 31, 2014 at 10:01 AM, Gayan Dhanushka <[email protected]> wrote: > Hi Pirinthapan, > > If we are introducing a new lifecycle for uploadable app types it should > have a seperate lifecycle diagram. According to the above we can demote > from production to testing. Hence it is wrong. > > Regards > GayanD > > On Thu, Oct 30, 2014 at 9:29 PM, Samith Dassanayake <[email protected]> > wrote: > >> Hi Pirinthapan >> According to the above diagram, even the app type is an uploadable app >> type, we can demote to testing stage. If it is an uploadable app type, it >> should only have production and retired life cycles. >> >> Thanks, >> Samith >> >> On Thu, Oct 30, 2014 at 5:07 PM, Pirinthapan Mahendran < >> [email protected]> wrote: >> >>> Hi all, >>> >>> As all of you suggested I'm going with implementing a new life cycle for >>> uploadable artifacts. The following diagram shows the entire life cycle of >>> an application after we add the new life cycle. >>> >>> >>> >>> >>> >>> >>> >>> >>> Mahendran Pirinthapan >>> Software Engineer | WSO2 Inc. >>> Mobile +94772378732. >>> >>> On Wed, Oct 29, 2014 at 9:46 PM, Dimuthu Leelarathne <[email protected]> >>> wrote: >>> >>>> Hi all, >>>> >>>> In addition this decision will stabilise our Uploadable Artifact story. >>>> Right now it is very shaky. >>>> >>>> thanks, >>>> dimuthu >>>> >>>> On Wed, Oct 29, 2014 at 9:15 AM, Dimuthu Leelarathne <[email protected] >>>> > wrote: >>>> >>>>> Hi all, >>>>> >>>>> We hava a Redmine item for app type specific life cycles. But until >>>>> that becomes a reality we can have two life cycles as suggested by the >>>>> team. >>>>> >>>>> +1 for having a different lifecycle for upload able app types. But >>>>> when implementing lets keep in mind the future. >>>>> >>>>> thanks, >>>>> dimuthu >>>>> >>>>> On Wed, Oct 29, 2014 at 7:58 AM, Janaka Ranabahu <[email protected]> >>>>> wrote: >>>>> >>>>>> Hi Gayan, Dimuthu, >>>>>> >>>>>> On Wed, Oct 29, 2014 at 6:29 PM, Gayan Dhanushka <[email protected]> >>>>>> wrote: >>>>>> >>>>>>> Hi Pirinthapan, >>>>>>> >>>>>>> AFAIU you are going to have a "onDeploymentSuccess" method in >>>>>>> "ApplicationEventsHandler" class and write a handler to call >>>>>>> "updateApplicationDeploymentSuccessStatus" from within the >>>>>>> implementation >>>>>>> of that method. I can see this as a possible solution. Still I have some >>>>>>> doubts. I believe you have to check whether the application is an >>>>>>> uploadable application from within the >>>>>>> "updateApplicationDeploymentSuccessStatus" method. Otherwise every time >>>>>>> we >>>>>>> deploy an application (Even non uploadable applications), the >>>>>>> application >>>>>>> will be promoted into production. >>>>>>> >>>>>>> Further more I believe you can call the promoting logic from within >>>>>>> the "updateApplicationDeploymentSuccessStatus" method rather than >>>>>>> calling >>>>>>> the bpel service once again. >>>>>>> >>>>>>> @Dimuthu >>>>>>> >>>>>>> Shouldn't this be ideally handled by having a seperate application >>>>>>> lifecycle for uploadable artifacts ? >>>>>>> >>>>>> IMO, this is the correct way to address this issue. Currently what we >>>>>> are trying, is to use the same lifecycle for all the app types in >>>>>> AppFactory. This is wrong because all the app types does not have the >>>>>> same >>>>>> lifecycle. Certain apps we create such as Java Web applications and >>>>>> Jax-rs/Jax-ws applications have a lifecycle which goes from development >>>>>> to >>>>>> production whereas uploadable applications are deployed directly into >>>>>> production. So clearly there are 2 lifecycles for these 2 application >>>>>> categories. >>>>>> >>>>>> So I'm +1 for introducing a different lifecycle(which have only 2 >>>>>> stages, which are 'production' and 'retired') for uploadable >>>>>> applications. >>>>>> >>>>>> WDYT? >>>>>> >>>>>> Thanks, >>>>>> Janaka >>>>>> >>>>>>> >>>>>>> Regards >>>>>>> GayanD >>>>>>> >>>>>>> On Tue, Oct 28, 2014 at 8:47 PM, Pirinthapan Mahendran < >>>>>>> [email protected]> wrote: >>>>>>> >>>>>>>> Hi all, >>>>>>>> >>>>>>>> In the above solution there is a problem. >>>>>>>> >>>>>>>> *Problem in the above solution* >>>>>>>> >>>>>>>> According to the above solution we are going to have a new event >>>>>>>> handler for promoting uploadable apps. When an application is created >>>>>>>> the >>>>>>>> "oncreate" method of all the event handlers will be called. And these >>>>>>>> event >>>>>>>> handlers will be executed according to the priority order. In that >>>>>>>> case our >>>>>>>> new handler will be executed at last because of its low priority. >>>>>>>> During this, when the "JenkinsApplicationEventsListener" is >>>>>>>> executed, it will create and start a job in jenkins. Once the job is >>>>>>>> started "JenkinsApplicationEventsListener" will continue its >>>>>>>> execution. It >>>>>>>> won't wait until the job is finished. >>>>>>>> >>>>>>>> So after "JenkinsApplicationEventsListener" finished its execution, >>>>>>>> all the remaining event handlers (including our new event handler) >>>>>>>> will be >>>>>>>> executed according to the priority order. So again the building >>>>>>>> process and >>>>>>>> the promoting process is going to be happen parallel. >>>>>>>> >>>>>>>> *Improved Solution* >>>>>>>> >>>>>>>> In the above solution instead of calling the promoting process from >>>>>>>> "oncreate" method we can introduce a new method called >>>>>>>> "onDeploymentSuccess" to the abstract class "ApplicationEventsHandler" >>>>>>>> and >>>>>>>> implement that method in our new event listener class. Within this >>>>>>>> method >>>>>>>> we will call the promoting process. And we will publish the deployment >>>>>>>> success event to the listeners from the method >>>>>>>> "updateApplicationDeploymentSuccessStatus" in >>>>>>>> "ApplicationManagementService". >>>>>>>> >>>>>>>> So whenever a deployment is success for uploadable applications in >>>>>>>> development stage, we can execute the promoting process. After the >>>>>>>> promotion is finished we will call the deployment process to deploy the >>>>>>>> application in production stage. >>>>>>>> >>>>>>>> Kindly expect your feedbacks on the above solution. >>>>>>>> >>>>>>>> Thanks. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Mahendran Pirinthapan >>>>>>>> Software Engineer | WSO2 Inc. >>>>>>>> Mobile +94772378732. >>>>>>>> >>>>>>>> On Tue, Oct 28, 2014 at 4:58 PM, Dimuthu Leelarathne < >>>>>>>> [email protected]> wrote: >>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> On Tue, Oct 28, 2014 at 1:17 AM, Pirinthapan Mahendran < >>>>>>>>> [email protected]> wrote: >>>>>>>>> >>>>>>>>>> Hi Danushka and Gayan, >>>>>>>>>> >>>>>>>>>> As we discussed offline I'm going with the following solution. >>>>>>>>>> >>>>>>>>>> Remove the promoting code from jaggery layer and Create an Event >>>>>>>>>> handler by extending the abstract class "ApplicationEventsHandler" >>>>>>>>>> for >>>>>>>>>> promoting uploadable artifacts. And setting this event handler's >>>>>>>>>> priority >>>>>>>>>> to low so that it will be executed at last. After the promotion >>>>>>>>>> process is >>>>>>>>>> finished we will call the deployment process from this handler class >>>>>>>>>> to >>>>>>>>>> deploy the application in production stage. >>>>>>>>>> >>>>>>>>> >>>>>>>>> +1. Perfect solution guys! Good job in picking the correct >>>>>>>>> solution. >>>>>>>>> >>>>>>>>> thanks, >>>>>>>>> dimuthu >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>>> >>>>>>>>>> Thanks. >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Mahendran Pirinthapan >>>>>>>>>> Software Engineer | WSO2 Inc. >>>>>>>>>> Mobile +94772378732. >>>>>>>>>> >>>>>>>>>> On Mon, Oct 27, 2014 at 10:21 PM, Danushka Fernando < >>>>>>>>>> [email protected]> wrote: >>>>>>>>>> >>>>>>>>>>> Gayan >>>>>>>>>>> AFAIK there is a limitation in governance lifecycle which >>>>>>>>>>> prevent us doing that. So I think better thing would be to fix >>>>>>>>>>> current flow >>>>>>>>>>> to be consistent. >>>>>>>>>>> >>>>>>>>>>> Thanks & Regards >>>>>>>>>>> Danushka Fernando >>>>>>>>>>> Software Engineer >>>>>>>>>>> WSO2 inc. http://wso2.com/ >>>>>>>>>>> Mobile : +94716332729 >>>>>>>>>>> >>>>>>>>>>> On Mon, Oct 27, 2014 at 9:48 PM, Gayan Dhanushka < >>>>>>>>>>> [email protected]> wrote: >>>>>>>>>>> >>>>>>>>>>>> Hi Pirinthapan, >>>>>>>>>>>> >>>>>>>>>>>> As discussed the other day if we are going to change the >>>>>>>>>>>> current implementation where we first deploy the artifact to >>>>>>>>>>>> Development >>>>>>>>>>>> and then promote it up to Production, this will be a very straight >>>>>>>>>>>> forward >>>>>>>>>>>> fix. We can just deploy the application into Production in one go. >>>>>>>>>>>> Then it >>>>>>>>>>>> will be just like deploying an application in the Production stage. >>>>>>>>>>>> >>>>>>>>>>>> Regards >>>>>>>>>>>> GayanD >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> On Sun, Oct 26, 2014 at 3:26 PM, Danushka Fernando < >>>>>>>>>>>> [email protected]> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> Hi >>>>>>>>>>>>> @Pirinthapan : Great findings. >>>>>>>>>>>>> IMO if we are sticking to the plan that we are going to >>>>>>>>>>>>> promote uploadable applications to production, then we need to >>>>>>>>>>>>> wait until >>>>>>>>>>>>> application creation is over and then promote them to production. >>>>>>>>>>>>> We might >>>>>>>>>>>>> be able to run Application Even Listener with ordered to run last >>>>>>>>>>>>> to do >>>>>>>>>>>>> this task. >>>>>>>>>>>>> @Dimuthu, Janaka : WDYT? >>>>>>>>>>>>> >>>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>>> Danushka Fernando >>>>>>>>>>>>> Software Engineer >>>>>>>>>>>>> WSO2 inc. http://wso2.com/ >>>>>>>>>>>>> Mobile : +94716332729 >>>>>>>>>>>>> >>>>>>>>>>>>> On Sun, Oct 26, 2014 at 3:04 PM, Pirinthapan Mahendran < >>>>>>>>>>>>> [email protected]> wrote: >>>>>>>>>>>>> >>>>>>>>>>>>>> Hi All, >>>>>>>>>>>>>> >>>>>>>>>>>>>> In AppFactory when we upload an existing artifact, it should >>>>>>>>>>>>>> be directly deployed to production stage. >>>>>>>>>>>>>> But in the current implementation sometimes it is getting >>>>>>>>>>>>>> deployed to development stage and sometimes it is getting >>>>>>>>>>>>>> deployed to >>>>>>>>>>>>>> production stage. >>>>>>>>>>>>>> >>>>>>>>>>>>>> According to my understanding the reason for this is, we are >>>>>>>>>>>>>> creating and promoting the application within the single method >>>>>>>>>>>>>> "uploadExistingApplication" >>>>>>>>>>>>>> in [1]. In this method first we are creating the application >>>>>>>>>>>>>> using the uploaded artifact. Once the application is created >>>>>>>>>>>>>> build is >>>>>>>>>>>>>> triggered automatically in a background thread. At the same time >>>>>>>>>>>>>> we are >>>>>>>>>>>>>> calling the bpel service to promote the application. So building >>>>>>>>>>>>>> and >>>>>>>>>>>>>> promoting are happening at the same time. This will give some >>>>>>>>>>>>>> unpredictable >>>>>>>>>>>>>> results. >>>>>>>>>>>>>> >>>>>>>>>>>>>> To overcome this issue we need to wait until all the >>>>>>>>>>>>>> application creation, initial build and initial deployment >>>>>>>>>>>>>> processes are >>>>>>>>>>>>>> finished. After that we need to promote the application. Once >>>>>>>>>>>>>> the promotion >>>>>>>>>>>>>> process is finished we need to deploy the application in the >>>>>>>>>>>>>> production >>>>>>>>>>>>>> stage. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Kindly expect your ideas on this issue. >>>>>>>>>>>>>> >>>>>>>>>>>>>> 1. appmgt/src/site/blocks/application/add/ajax/add.jag >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> Mahendran Pirinthapan >>>>>>>>>>>>>> Software Engineer | WSO2 Inc. >>>>>>>>>>>>>> Mobile +94772378732. >>>>>>>>>>>>>> >>>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>>> Architecture mailing list >>>>>>>>>>>>>> [email protected] >>>>>>>>>>>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>> Architecture mailing list >>>>>>>>>>>>> [email protected] >>>>>>>>>>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> Gayan Dhanuska >>>>>>>>>>>> Software Engineer >>>>>>>>>>>> http://wso2.com/ >>>>>>>>>>>> Lean Enterprise Middleware >>>>>>>>>>>> >>>>>>>>>>>> Mobile >>>>>>>>>>>> 071 666 2327 >>>>>>>>>>>> >>>>>>>>>>>> Office >>>>>>>>>>>> Tel : 94 11 214 5345 >>>>>>>>>>>> Fax : 94 11 214 5300 >>>>>>>>>>>> >>>>>>>>>>>> Twitter : https://twitter.com/gayanlggd >>>>>>>>>>>> >>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>> Architecture mailing list >>>>>>>>>>>> [email protected] >>>>>>>>>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Architecture mailing list >>>>>>>>>>> [email protected] >>>>>>>>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> _______________________________________________ >>>>>>>>>> Architecture mailing list >>>>>>>>>> [email protected] >>>>>>>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Dimuthu Leelarathne >>>>>>>>> Architect & Product Lead of App Factory >>>>>>>>> >>>>>>>>> WSO2, Inc. (http://wso2.com) >>>>>>>>> email: [email protected] >>>>>>>>> Mobile : 0773661935 >>>>>>>>> >>>>>>>>> Lean . Enterprise . Middleware >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Architecture mailing list >>>>>>>>> [email protected] >>>>>>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Architecture mailing list >>>>>>>> [email protected] >>>>>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Gayan Dhanuska >>>>>>> Software Engineer >>>>>>> http://wso2.com/ >>>>>>> Lean Enterprise Middleware >>>>>>> >>>>>>> Mobile >>>>>>> 071 666 2327 >>>>>>> >>>>>>> Office >>>>>>> Tel : 94 11 214 5345 >>>>>>> Fax : 94 11 214 5300 >>>>>>> >>>>>>> Twitter : https://twitter.com/gayanlggd >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Architecture mailing list >>>>>>> [email protected] >>>>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> *Janaka Ranabahu* >>>>>> Senior Software Engineer; WSO2 Inc.; http://wso2.com >>>>>> >>>>>> >>>>>> *E-mail: [email protected] <http://wso2.com>**M: **+94 718370861 >>>>>> <%2B94%20718370861>* >>>>>> >>>>>> Lean . Enterprise . Middleware >>>>>> >>>>>> _______________________________________________ >>>>>> Architecture mailing list >>>>>> [email protected] >>>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Dimuthu Leelarathne >>>>> Architect & Product Lead of App Factory >>>>> >>>>> WSO2, Inc. (http://wso2.com) >>>>> email: [email protected] >>>>> Mobile : 0773661935 >>>>> >>>>> Lean . Enterprise . Middleware >>>>> >>>> >>>> >>>> >>>> -- >>>> Dimuthu Leelarathne >>>> Architect & Product Lead of App Factory >>>> >>>> WSO2, Inc. (http://wso2.com) >>>> email: [email protected] >>>> Mobile : 0773661935 >>>> >>>> Lean . Enterprise . Middleware >>>> >>>> _______________________________________________ >>>> Architecture mailing list >>>> [email protected] >>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >>>> >>>> >>> >>> _______________________________________________ >>> Architecture mailing list >>> [email protected] >>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >>> >>> >> >> >> -- >> Best Regards >> >> Samith Dassanayake >> Software Engineer, WSO2 Inc. >> >> >> _______________________________________________ >> Architecture mailing list >> [email protected] >> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >> >> > > > -- > Gayan Dhanuska > Software Engineer > http://wso2.com/ > Lean Enterprise Middleware > > Mobile > 071 666 2327 > > Office > Tel : 94 11 214 5345 > Fax : 94 11 214 5300 > > Twitter : https://twitter.com/gayanlggd >
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
