This commit is contained in:
Ralph Soika 2021-01-14 16:47:06 +01:00
parent bb5f453be8
commit cf9bfd952b

View file

@ -13,8 +13,8 @@ import org.imixs.workflow.exceptions.PluginException;
* Das InvoicePlugin prüft die Eingaben auf gültigkeit, so dass diese problemlos * Das InvoicePlugin prüft die Eingaben auf gültigkeit, so dass diese problemlos
* nach Cargosoft expoertier werden können. * nach Cargosoft expoertier werden können.
* <p> * <p>
* Konkret geht es darum, das in den ChildItems keine leeren Zeilen vorkommen * Konkret geht es darum, das im Status 5200 in den ChildItems keine leeren
* dürfen. * Zeilen vorkommen dürfen.
* *
* @author rsoika * @author rsoika
* @version 1.0 * @version 1.0
@ -30,12 +30,14 @@ public class InvoicePlugin extends AbstractPlugin {
/** /**
* Test childworkitems for empty lines * Test childworkitems for empty lines
* *
* @throws PluginException - if txtCooperateSpace not filled. * @throws PluginException - if data is missing
* *
**/ **/
@Override @Override
public ItemCollection run(ItemCollection workitem, ItemCollection documentActivity) throws PluginException { public ItemCollection run(ItemCollection workitem, ItemCollection documentActivity) throws PluginException {
// die prüfung der positionsnummern erfolgt nur im Status 5200 !
if (workitem.getTaskID() == 5200) {
List<ItemCollection> childs = explodeChildList(workitem); List<ItemCollection> childs = explodeChildList(workitem);
for (ItemCollection posItem : childs) { for (ItemCollection posItem : childs) {
if (posItem.getItemValueString("name").trim().isEmpty()) { if (posItem.getItemValueString("name").trim().isEmpty()) {
@ -52,6 +54,8 @@ public class InvoicePlugin extends AbstractPlugin {
+ " darf nicht 0 sein!"); + " darf nicht 0 sein!");
} }
} }
}
return workitem; return workitem;
} }