Hi IvyTeam,

I sometime manually replace the deployed classes by the new one. Is there anyway to tell Ivy Engine reload the Process Model contains these classes? Just like when we deploy new Process Model Version.

FYI: I'm using Ivy Engine for my local development, everytime I build the modules, I need to copy the iar to deploy folder (or use Admin Tool to deploy), It's really take time, I want to automate it.

asked 09.07.2019 at 10:32

vinh_'s gravatar image

vinh_
(suspended)
accept rate: 40%


Hi Vinh

You can try the following code that uses heavily internal unsupported API (non public):

import ch.ivyteam.ivy.deployment.restricted.configuration.JavaConfigurationSynchronizer;
import ch.ivyteam.ivy.application.ActivityOperationState;
import ch.ivyteam.ivy.java.JavaConfigurationNavigationUtil;
import ch.ivyteam.ivy.application.IProcessModelVersion;

IProcessModelVersion pmv = ivy.wf.getApplication().findProcessModelVersion("Test$1");

pmv.deactivate();
while (pmv.getActivityOperationState() != ActivityOperationState.INACTIVE)
{
    Thread.sleep(200);
}

JavaConfigurationNavigationUtil.getJavaConfiguration(pmv).getClassLoaderHolder().updateRepositories();

pmv.activate();
while (pmv.getActivityOperationState() != ActivityOperationState.ACTIVE)
{
    Thread.sleep(200);  
}

Also you have to timeout if pmv cannot be deactivated or activated.

Regards

Reto Weiss, Axon.ivy Support

link
This answer is marked "community wiki".

answered 09.07.2019 at 11:22

Reto%20Weiss's gravatar image

Reto Weiss ♦♦
4.9k202857
accept rate: 74%

edited 09.07.2019 at 11:28

Hi Reto Weiss, I could run this code successfully. Thank you so much.

(11.07.2019 at 02:09) vinh_ vinh_'s gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×147
×44
×26
×9

Asked: 09.07.2019 at 10:32

Seen: 1,579 times

Last updated: 11.07.2019 at 02:09