The focus on this release upgrades is to describe how to allow custom code to rely on the virtual time support.
Please stop the edoras one server, do all the upgrades described in the next paragraphs and then start the server again at the end. This way you ensure that all upgrades are executed properly and that you do not get an inconsistent state when starting it in the middle of the upgrades.
edoras one CMMN
-
_triggerItems
are no longer automatically persisted to Work Objects. If you want to persist_triggerItems
for tasks, please store them via suitable task input parameter mappings. -
Manual repetition now works differently. A plan item that has Manual activation, Repetition and no entry sentries, will now repeat upon its completion. This is different from the earlier behavior where the plan item would repeat upon the
manualStart
event. The old behaviour can still be modeled by means of a plan item on-part to itself. For more information, please refer to sectionManual Repetition
in the CMMN documentation. -
A Java Locale parameter was removed from certain low-level API. The current user locale is now passed as part of the TransitionData object.
-
timeProvider
anduserManager
constructor arguments have been added to select bean configurations in cmmn-engine-context.xml.
Virtual time support
From the release 1.5.0.S100 we introduce virtual time. Relying on the system time (e.g. the call to the methods new Date()
or System.currentTimeMillis()
) is allowed only in
special occasions. One of them is license checking, which must rely on the real time. Other usages must use virtual time to support moving forward/backward in the time. Edoras
one creates time provider bean with the name timeProvider
by default at the start up. The default timeProvider
configuration relies on the system time. No additional
configuration changes are needed. From the implementation perspective you should consider usage of timeProvider
bean to provide you virtual time instead of real time. When
your custom code does not satisfy this requirement it won’t be possible to execute simulations in virtual time for your customizations. The simulation support will enhance
product in the future sprints.
Configuration changes for Virtual time support
These changes are dependent on how you use edoras one: if you use the vanilla edoras-one-hosted
WAR file then you do not need to follow these steps, but if you use edoras one
as a dependency in your project then please read the changes carefully. Maybe not all changes apply to your setup as you did not overwrite the specified edoras one
configuration files. These are the changes you need to do if you overwrite the mentioned file:
-
In the
com/edorasware/vis/config/vis-application-context.xml
:-
to the existing bean declaration with the id
modelerConfiguration
add a third constructor argument with nametimeProvider
and reftimeProvider
.
-
-
In the
com/edorasware/vis/config/vis-rest-config.xml
:-
to the existing bean declaration with the id
editorHandler
add a constructor argument with nametimeProvider
and reftimeProvider
.
-
Content management API improvements
The following sections describe the changes in the API.
ContentListener (f.k.a. ContentProviderListener) method signatures changed to include the new ContentEvent Type
The ContentProviderListener
Interface contained the following methods:
void contentAdded(ContentScope contentScope, ContentReference contentReference);
void contentUpdated(ContentScope contentScope, ContentReference oldContentReference, ContentReference newContentReference);
void contentDeleted(ContentScope contentScope, ContentReference contentReference, Optional<String> version);
Now, the ContentListener
interface contains these methods:
void contentAdded(ContentEvent contentEvent);
void contentUpdated(ContentEvent contentEvent);
void contentDeleted(ContentEvent contentEvent, Optional<String> version);
The ContentEvent
type contanins not only the content scope and the old and the new content references, but also, a reference to the content manager. Now, if inside a content
listener implementation you want to call a content manager method you can use that reference. This is an example, of how to get an input stream of the content:
InputStream inputStream = contentEvent.getContentManager().getContent(contentEvent.getNewContentReference());
setContentListeners
method replacing the addContentListener
method
Previously to add a content listener you used the addContentListener
method:
contentProvider.addContentListener(myProviderListener);
Now, this is done at the content manager level.
contentManager.setContentListeners(ImmutableList.<ContentListener>of(myProviderListener1,myProviderListener2,myProviderListener3));
The same can be done by Spring XML configuration. The following XML snippet shows how to configure two content listeners in the content manager declaration.
<bean id="contentManager" class="com.edorasware.commons.core.content.internal.DefaultConfigurableContentManager">
<constructor-arg>
<list>
<ref bean="databaseContentProvider"/>
</list>
</constructor-arg>
<constructor-arg>
<ref bean="currentTenantService"/>
</constructor-arg>
<property name="contentListeners">
<list>
<bean class="com.edorasware.cloud.core.content.internal.FilenameLoggerContentListener"/>
<bean class="com.edorasware.cloud.core.content.internal.VersionLoggerContentListener"/>
</list>
</property>
</bean>
New view engine in create action
The activation of the new view engine in the create action
can be controlled through a new configuration property called experimental.view.engine.create.enabled
.
The default value of this property is false what forces the front end to use the previous implementation. As this new property is part of the configuration of edoras one,
it is required to be present in the one .properties
file. As per this release, the experimental configuration section looks as follows:
##############################
# Experimental configuration #
##############################
experimental.view.engine.enabled = false
experimental.view.engine.create.enabled = false
Miscellaneous
Bootstrap project
Here you will find a list of files which have changed since the last release. This helps you check the difference between your bootstrap project version and the current one:
/src/main/resources/com/edorasware/bootstrap/config/one.properties
: experimental.view.engine.create.enabled = false
property was added