Petals-SE-Flowable 1.4.0+

compared with
Current by Christophe DENEUX
on Jul 09, 2024 16:10.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (6)

View Page History
{warning}This version must be installed on [Petals ESB 5.3.0|petalsesb530:Petals ESB 5.3.0]+{warning}

{warning}Previous service units are no more compliant with this component version and must be migrated. See [Migrating service units developed for previous versions|#migrationguide]{warning}

{multi-excerpt-include:petalscomponents:Petals-SE-Flowable|name=features|nopanel=true}

{code}

{anchor:petals_getPlaceholder}
h3. petals:getPlaceholder

This custom JUEL function retrieve the value as {{String}} of the given placeholder.

Required argument:
* the first argument is the placeholder name as {{String}}.

Returned value:
* the placeholder value as {{String}}, or {{null}} if the placeholder is not defined.

Example:
{code}
<serviceTask id="servicetask1" name="User Task"
flowable:class="org.ow2.petals.flowable.junit.tasks.DummyJavaDelegate">
<extensionElements>
<flowable:field name="param1">
<flowable:expression>${petals:getPlaceholder('my-placeholder')}</flowable:expression>
</flowable:field>
</extensionElements>
</serviceTask>
{code}

h3. petals:getPlaceholderWithDefault

This custom JUEL function retrieve the value as {{String}} of the given placeholder.

Required arguments:
* the first argument is the placeholder name as {{String}}.
* the second argument is the default value, as {{String}}, to return if the given placeholder is not defined.

Returned value:
* the placeholder value as {{String}}, or the given default value if the placeholder is not defined.

Example:
{code}
<serviceTask id="servicetask1" name="User Task"
flowable:class="org.ow2.petals.flowable.junit.tasks.DummyJavaDelegate">
<extensionElements>
<flowable:field name="param1">
<flowable:expression>${petals:getPlaceholderWithDefault('my-placeholder', 'my-placeholder-default-value')}</flowable:expression>
</flowable:field>
</extensionElements>
</serviceTask>
{code}

h1. Configuring the component

h2. Using placeholders to configure the process definition

The placeholders defined in the properties file of the SE Flowable can be used in the process definition. A dedicated map variable containing all placeholders is set when starting the process instance: *petalsPlaceholders*. If the placeholder '{{signaturePeriod}}' is defined, it can be used as following in the process definition:
{code:xml}
<intermediateCatchEvent id="waitBeforeGetStatus" name="Wait">
<timerEventDefinition>
<timeDuration>${empty execution.variableInstances.petalsPlaceholders.getValue().signaturePeriod ? "PT1H" : execution.variableInstances.petalsPlaceholders.getValue().signaturePeriod}</timeDuration>
</timerEventDefinition>
</intermediateCatchEvent>
{code}
The placeholders defined in the properties file of the SE Flowable can be used in the process definition through the [custom JUEL function '{{petals:getPlaceholder(...)}}'|#petals_getPlaceholder].

{note}The dedicated map variable is automatically copied to be accessible as variable of sub-processes.{note}

h1. Business monitoring

{code}
where SoapUI project files contains mock service definitions.


{anchor:migrationguide}
h1. Migration guide

h2. Migrating service units developed for previous versions

To be deployed on this version of the Petals SE Flowable, the Petals SE Flowable service units must be migrated. Please follow the following chapters to know which changes must be applied.

h3. From 1.3.2 to 1.4.x

Please apply the following changes in your Petals SE Flowable service unit to migrate them from Petals SE Flowable 1.3.2 to Petals SE Flowable 1.4.x:
* in your process definitions and unit tests:
** the process variable '{{petalsPlaceholders}}' associated to the placeholders is now replaced by the custom JUEL functions '{{petals:getPlaceholder}}' or '{{petals:getPlaceholderWithDefault}}'.