3 Replies Latest reply on Nov 3, 2011 6:29 AM by yrachek

    how do you undeploy processdefinition?

    greg823

      Is it possible to undeploy a deployed process definition?
      I tried

      processDefinition.removeDefinition(ctx);
      but it did not work.
      I would like to get rid of all versions of the process definitions previously deployed.


        • 1. Re: how do you undeploy processdefinition?
          jemodurn

          You can try this:

          ProcessDefinition pd = jbpmContext.getGraphSession().findLatestProcessDefinition(process.getName());
          jbpmContext.getGraphSession().deleteProcessDefinition(pd);


          • 2. Re: how do you undeploy processdefinition?
            greg823

            Thank you. It worked.

            • 3. Re: how do you undeploy processdefinition?
              yrachek

              While deployment of orchestration I want to undeploy all previous versions of it.

               

              To find them I use

              bpelGraphSession.findAllProcessDefinition(name + "$%", orchestrationId);

               

              Then I deleting them all using this:

               

                   graphSession.deleteProcessDefinition( pfd);

               

              But need I delete something else to full DB clearance from information that not already useful ?

               

              I tried to delete Deployment Descriptors for each ProcessDefinition that I found :

               

              deploymentDescriptors = bpelGraphSession.findDeploymentDescriptors( pfd.getName());

               

              but got some exception(Hibernate =something like : couldn't delete because it has parent) while deleting some of them.

               

              Thnx !