Skip to content

Commit

Permalink
MID-7484: example of typed recipientExpression/value in test sysconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
virgo47 committed Feb 23, 2022
1 parent fbc2d07 commit 7941120
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,9 @@ public static List<Object> parseValueElements(
for (Object valueElement : valueElements) {
RawType rawType = getRawType(valueElement, contextDescription);
Object rawValue = rawType.getParsedRealValue(null, null);
// TODO: This is very crude, but without definition we don't know how to parse the value,
// This is very crude, but without definition we don't know how to parse the value,
// let's just take its value as is and see what conversion does with it.
// User has always the option to use the xsi:type for value to avoid RawType.Raw value.
if (!rawType.isParsed()) {
rawValue = rawType.getValue();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
~ Copyright (c) 2010-2017 Evolveum and contributors
~ Copyright (C) 2010-2022 Evolveum and contributors
~
~ This work is dual-licensed under the Apache License 2.0
~ and European Union Public License. See LICENSE file for details.
-->

<systemConfiguration oid="00000000-0000-0000-0000-000000000001" version="0"
xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3">
xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3">

<name>SystemConfiguration</name>
<logging>
<rootLoggerAppender>File Appender</rootLoggerAppender>
<rootLoggerLevel>INFO</rootLoggerLevel>
<classLogger>
<level>TRACE</level>
<package>com.evolveum.midpoint.common.LoggingConfigurationManager</package>
</classLogger>
</classLogger>
<appender xsi:type="c:FileAppenderConfigurationType" name="File Appender" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<pattern>%date [%thread] %-5level \(%logger{46}\): %message%n</pattern>
<fileName>target/test.log</fileName>
Expand All @@ -28,7 +29,10 @@
<simpleWorkflowNotifier>
<category>workflowProcessEvent</category>
<recipientExpression>
<value>recipient@evolveum.com</value>
<!-- Demonstration of parsed raw type of type Focus which is also acceptable here -->
<value xsi:type="UserType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<emailAddress>recipient@evolveum.com</emailAddress>
</value>
</recipientExpression>
<transport>dummy:simpleWorkflowNotifier-Processes</transport>
</simpleWorkflowNotifier>
Expand All @@ -46,16 +50,18 @@
<simpleTaskNotifier>
<expressionFilter>
<script>
<!-- MID-4121 -->
<code>import com.evolveum.midpoint.wf.impl.assignments.TestAssignmentsAdvanced
<!-- MID-4121 @formatter:off -->
<code>
import com.evolveum.midpoint.wf.impl.assignments.TestAssignmentsAdvanced

try {
return event.isSuccess()
} catch (Exception e) {
TestAssignmentsAdvanced.exception = e
throw e
}
try {
return event.isSuccess()
} catch (Exception e) {
TestAssignmentsAdvanced.exception = e
throw e
}
</code>
<!-- @formatter:on -->
</script>
</expressionFilter>
</simpleTaskNotifier>
Expand Down

0 comments on commit 7941120

Please sign in to comment.