Is there a possibility to start a Xpert.ivy process from a Java bean in my ivy project? Either by calling a request start or a sub process... Something like:
The main purpose is to be able to catch exceptions which may be thrown from the process. |
Calling a Sub-Process from plain Java has become much simpler since Axon.ivy 6.3. There is now a nice fluent API to invoke a process and get back the the resulting data. The entry point is here: ch.ivyteam.ivy.process.call.SubProcessCall You can find an example in the ConnectivityDemos where a Java REST-Service implementation starts a Process in the engine.
See
|
Alternative (with System Events) I do not like the search of the correct process. You have to change your process a little. Add a "event start" element instead the normal "request start" element. Or you can put it also next to the process start. Write your one event bean like this:
Or you could use the example from ivyhacker The java code to jump in the process looks nicer:
Like this, you are able to jump to any start event with an identifier string, and you could hand out a parameter as an object type of your choice. For further information read this entry ivyhacker. Conclusion:
But you can't add parameters to the call. Yes, you can. But it is just one parameter object of class E. This could also be a parameter-list-object, a JSON string or a ivy dataclass. (Be careful about ivy dataclasses, they are not compatible by diffrent ProcessModelVersions PMV.) |
Hello, is that possible to call a sub process which call another html dialog inside. E.g SubProcessCall.withPath("Functional Processes/callAnotherDialog").call(); I tried it and got exception with number 1
ClassCastException: java.lang.Object cannot be cast to ch.ivyteam.ivy.scripting.objects.util.IIvyDataObject.
Number 2 solution work well
|
Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Tags:
Asked: 06.12.2013 at 14:38
Seen: 10,581 times
Last updated: 30.08.2021 at 08:21