Hi all

There is many times that i saw similar public api from ivy then i could not distinguish between them, i believe some of my co-workers has the same feeling. In this post i need your help to make it more clear.

Does they return the same result?

1/ Application:

Ivy.request().getApplication()
Ivy.wf().getApplication()
Ivy.wfTask().getApplication()
Ivy.wfCase().getApplication()
Ivy.session().getWorkflowContext().getApplication()

2/ ProcessModel

Ivy.wfTask().getProcessModel()
Ivy.wfCase().getProcessModel()

3/ ProcessModels

Ivy.wfCase().getApplication().getProcessModels()
Ivy.wf().getApplication().getProcessModels()

4/ ProcessModelVersion

Ivy.request().getProcessModel().getProcessModelVersions()
Ivy.request().getProcessModel().getReleasedProcessModelVersion()
Ivy.request().getProject().getProcessModelVersion()
Ivy.wfTask().getProcessModelVersion()
Ivy.wfCase().getProcessModelVersion()
Ivy.request().getProcessModelVersion()

There is some more but first i stop here :)

Thanks in advance

asked 29.12.2016 at 02:25

trungdv's gravatar image

trungdv
(suspended)
accept rate: 52%

edited 29.12.2016 at 02:25

We can write some small test processes to check it right? :D

(29.12.2016 at 12:09) Genzer Hawker Genzer%20Hawker's gravatar image

Yes and no. If you do not understand it, I think we have to update the java-doc...

(29.12.2016 at 14:34) Flavio Sadeghi ♦♦ Flavio%20Sadeghi's gravatar image

Yes, thanks. Actually i can create test and check for myself but can't do fo everyone. They need a clear documentation. This post here for them. They dont need to ask around everytime they use it. :)

(30.12.2016 at 10:13) trungdv trungdv's gravatar image

First we have to separate between configuration and runtime data:

  • Configuration data are in the system database stored data, like Applications, Cases, Tasks, Users, etc.
  • Runtime data are not persistent and exists only at runtime, like the requests or sessions.


All API calls on the Ivy-Bean returns either configuration or runtime data related to the current execution context. E.g. the current executing request or the task of the current execution process.

The following APIs return runtime objects:

The following APIs return configuration objects:

Further calls on a configuration object returns always further configuration objects:

Hope this information will help. Don't hesitate to ask further question as comment. I will update the answer.

link

answered 30.12.2016 at 12:55

Flavio%20Sadeghi's gravatar image

Flavio Sadeghi ♦♦
(suspended)
accept rate: 75%

hi @Flavio Sadeghi ♦♦

Yes, i have another question, as you said "Case/Task lives always in the PMV the Case was started in". so for example i have a project A then i deploy it to PMV 1, i create some cases/tasks on this version.

Then i change implementation of Project A (i keep all task elements, just implement some new java class, new api, new logic). Now i deploy project A to PMV 2 (new version) and make it Active and Released.

Question: What happen if i start cases/task of PMV1 from released PMV (version 2)? which classes will be loaded?

I have some small test and i saw the old task will run on released PMV (PMV2), is it correct?

Thanks

(05.01.2017 at 05:50) trungdv trungdv's gravatar image

Hello @trungdv

How do you start a case/task of PMV1 from PMV2? I would argue that the the case/task is started in PMV1 and that classes of PMV2 are not visible in PMV1, since this would lead to conflicts, because classes exist in both PMVs, at least the class of the process itself... (except you have some application-wide caching , which is not allowed in such use cases)

If it should be possible, I would classify this as an bug. Of course, I would be happy for the test projecte to verify the behaviour.

(05.01.2017 at 09:51) Flavio Sadeghi ♦♦ Flavio%20Sadeghi's gravatar image

hi @Flavio Sadeghi ♦♦

thanks a lot.

I just realize that somehow is a problem of deployment wizard tool, when i use it to deploy, it always deploy latest version on PMV1 (even i select PMV2 as the target). that's why i see the new logic on old cases.

So when i try with Deploy button on each PMV, it work as you said. alt text I'm using version 6.3.0, don't know whether this is an issue or not.

(06.01.2017 at 02:31) trungdv trungdv's gravatar image

hi @trungdv

The deployment wizard decides on the basis of the project version (IvyProject -> Definitions -> Deployment -> Project Version) if a new PMV has to be created or an already existing PMV can be used. And yes, there were some fixes since 6.3...

(09.01.2017 at 14:05) Flavio Sadeghi ♦♦ Flavio%20Sadeghi's gravatar image

hi @Flavio Sadeghi ♦♦ Continuous with PMV, i have a case as below:

In my app, we store the task in two places, when creating task, for the main data model, we store in our persistence (BusinessReposiroty) and we take out the id from there then store to Ivy Task.

Q1: When user open task, we have that id then load business data from Repository. this case will work.i guess it will load with classLoader of pmv which the task belong to. is it correct?

Q2: for the case we have that id then load directly data model from repo(not start from task), it could be an issue? any way to avoid it?

Thanks

(10.01.2017 at 10:23) trungdv trungdv's gravatar image

hi @trungdv. I have copied you last question into a new one and edited it, as I have understood the question. Feel free to commet it if I have misunderstood it. See here: http://answers.axonivy.com/questions/2364/how-is-the-handling-when-loading-business-data-in-different-pmvs

(10.01.2017 at 11:18) Flavio Sadeghi ♦♦ Flavio%20Sadeghi's gravatar image
showing 5 of 6 show 1 more comments

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:

×37

Asked: 29.12.2016 at 02:25

Seen: 2,352 times

Last updated: 10.01.2017 at 11:20