Skip to content

Commit

Permalink
fixed output format (Issue #171)
Browse files Browse the repository at this point in the history
  • Loading branch information
rsoika committed Mar 6, 2025
1 parent 041f378 commit bb774fd
Show file tree
Hide file tree
Showing 4 changed files with 165 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import org.imixs.workflow.engine.WorkflowService;
import org.imixs.workflow.exceptions.AccessDeniedException;
import org.imixs.workflow.exceptions.AdapterException;
import org.imixs.workflow.exceptions.ModelException;
import org.imixs.workflow.exceptions.PluginException;
import org.imixs.workflow.exceptions.ProcessingErrorException;

Expand Down Expand Up @@ -203,10 +202,7 @@ public ItemCollection execute(ItemCollection datevExport, ItemCollection event)
}
}

// update and process invoices in new transaction to avoid partial updates...
processDatevExportEntities(datevExport, masterDataSet, event, configuration);

} catch (AccessDeniedException | ProcessingErrorException | ModelException e) {
} catch (AccessDeniedException | ProcessingErrorException e) {
throw new PluginException(DatevExportAdapter.class.getName(), DatevException.DATEV_EXPORT_ERROR,
e.getMessage(), e);
}
Expand Down Expand Up @@ -239,26 +235,4 @@ private List<ItemCollection> buildMasterDataSet(ItemCollection workitem) {
return result;
}

/**
* This method finishes the workflow process of invoices
*
* <p>
* The update is only performed if not taskID=5900
*
*/
private void processDatevExportEntities(ItemCollection datevExport, List<ItemCollection> datevExportEntities,
final ItemCollection event, ItemCollection configuration)
throws AccessDeniedException, ProcessingErrorException, PluginException, ModelException {

// process all invoices...
for (ItemCollection invoice : datevExportEntities) {
if (invoice.getTaskID() != 5900) {
invoice.event(EVENT_INVOICE_COMPLETED);
workflowService.processWorkItem(invoice);
}
}
// write log
logger.info("..." + datevExportEntities.size() + " invoices exported. ");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
#{beleg.item['$workflowsummary']}
</td>

<td style="text-align: center;"><h:outputText value="#{beleg.item['datev.blegdatum']}">
<td style="text-align: center;"><h:outputText value="#{beleg.item['datev.belegdatum']}">
<f:convertDateTime pattern="#{message.datePatternShort}"
timeZone="#{message.timeZone}" />
</h:outputText></td>
Expand Down
Loading

0 comments on commit bb774fd

Please sign in to comment.