diff --git a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/InvoicePlugin.java b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/InvoicePlugin.java
index 5d9994d..7e9c4e8 100644
--- a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/InvoicePlugin.java
+++ b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/InvoicePlugin.java
@@ -53,8 +53,19 @@ public class InvoicePlugin extends AbstractPlugin {
*
**/
@Override
- public ItemCollection run(ItemCollection workitem, ItemCollection documentActivity) throws PluginException {
+ public ItemCollection run(ItemCollection workitem, ItemCollection event) throws PluginException {
+ // skip if validaten tag is required=false
+ ItemCollection evalItemCollection = this.getWorkflowService().evalWorkflowResult(event, "validation", workitem);
+ if (evalItemCollection != null) {
+ // evaluate the validation rules...
+ if ("false".equalsIgnoreCase(evalItemCollection.getItemValueString("required"))) {
+ return workitem;
+ }
+ }
+
+
+
// Payment.type muss immer eingetragne werden!
if (workitem.getTaskID() >= TASK_ERFASSUNG && workitem.getEventID()<900) {
if (workitem.getItemValueString("payment.type").trim().isEmpty()) {
diff --git a/workflow/gutschriftabgleich-de-1.0.2.bpmn b/workflow/gutschriftabgleich-de-1.0.2.bpmn
index 1dc95c3..59d79fd 100644
--- a/workflow/gutschriftabgleich-de-1.0.2.bpmn
+++ b/workflow/gutschriftabgleich-de-1.0.2.bpmn
@@ -594,7 +594,7 @@ result.isValid=true;
true
-
+
diff --git a/workflow/rechnungseingang-de-1.1.0.bpmn b/workflow/rechnungseingang-de-1.1.0.bpmn
index 2bd7838..17f5459 100644
--- a/workflow/rechnungseingang-de-1.1.0.bpmn
+++ b/workflow/rechnungseingang-de-1.1.0.bpmn
@@ -2700,7 +2700,7 @@ Betrag: _amount (Brutto € _amount_brutto
-
+
false
@@ -2709,7 +2709,7 @@ Betrag: _amount (Brutto € _amount_brutto
-
+
SequenceFlow_65
SequenceFlow_69
@@ -3156,7 +3156,7 @@ Betrag: invoice.total invoice.currency
-
+
false
@@ -3165,7 +3165,7 @@ Betrag: invoice.total invoice.currency
-
+
SequenceFlow_71
SequenceFlow_64
diff --git a/workflow/rechnungseingang-sachrechnung-de-1.0.0.bpmn b/workflow/rechnungseingang-sachrechnung-de-1.0.0.bpmn
index 3a934d9..25376ed 100644
--- a/workflow/rechnungseingang-sachrechnung-de-1.0.0.bpmn
+++ b/workflow/rechnungseingang-sachrechnung-de-1.0.0.bpmn
@@ -397,7 +397,7 @@ Betrag: _amount (Brutto € _amount_bruttotrue
-
+