diff --git a/imixs-adapters-datev/pom.xml b/imixs-adapters-datev/pom.xml index 7f1acda5..ab1db394 100644 --- a/imixs-adapters-datev/pom.xml +++ b/imixs-adapters-datev/pom.xml @@ -1,9 +1,11 @@ - + 4.0.0 org.imixs.workflow imixs-adapters - 3.0.4-SNAPSHOT + 3.1.0-SNAPSHOT imixs-adapters-datev Imixs DATEV Adapter diff --git a/imixs-adapters-e-invoice/pom.xml b/imixs-adapters-e-invoice/pom.xml index 08505c01..efd1d03b 100644 --- a/imixs-adapters-e-invoice/pom.xml +++ b/imixs-adapters-e-invoice/pom.xml @@ -1,9 +1,11 @@ - + 4.0.0 org.imixs.workflow imixs-adapters - 3.0.4-SNAPSHOT + 3.1.0-SNAPSHOT imixs-adapters-e-invoice Imixs eInvoice Adapter diff --git a/imixs-adapters-kafka/pom.xml b/imixs-adapters-kafka/pom.xml index 4a0f6db8..a4722060 100644 --- a/imixs-adapters-kafka/pom.xml +++ b/imixs-adapters-kafka/pom.xml @@ -1,9 +1,11 @@ - + 4.0.0 org.imixs.workflow imixs-adapters - 3.0.4-SNAPSHOT + 3.1.0-SNAPSHOT imixs-adapters-kafka Imixs-Workflow Kafka Adapter diff --git a/imixs-adapters-kafka/src/main/java/org/imixs/workflow/kafka/ProducerService.java b/imixs-adapters-kafka/src/main/java/org/imixs/workflow/kafka/ProducerService.java index 10e8e480..4ae7856d 100644 --- a/imixs-adapters-kafka/src/main/java/org/imixs/workflow/kafka/ProducerService.java +++ b/imixs-adapters-kafka/src/main/java/org/imixs/workflow/kafka/ProducerService.java @@ -7,13 +7,6 @@ import java.util.logging.Logger; import java.util.regex.Pattern; -import jakarta.annotation.PostConstruct; -import jakarta.ejb.ConcurrencyManagement; -import jakarta.ejb.ConcurrencyManagementType; -import jakarta.ejb.Singleton; -import javax.enterprise.event.Observes; -import jakarta.xml.bind.JAXBException; - import org.apache.kafka.clients.producer.KafkaProducer; import org.apache.kafka.clients.producer.Producer; import org.apache.kafka.clients.producer.ProducerConfig; @@ -27,6 +20,13 @@ import org.imixs.workflow.exceptions.ProcessingErrorException; import org.imixs.workflow.xml.XMLDocumentAdapter; +import jakarta.annotation.PostConstruct; +import jakarta.ejb.ConcurrencyManagement; +import jakarta.ejb.ConcurrencyManagementType; +import jakarta.ejb.Singleton; +import jakarta.enterprise.event.Observes; +import jakarta.xml.bind.JAXBException; + /** * The ProducerService is a Kafka client that publishes workflow events to the * Kafka cluster. @@ -121,10 +121,10 @@ public void onProcess(@Observes ProcessingEvent documentEvent) { logger.info("...consuming ProcssingEvent (model:" + modelPattern + ") -> send new kafka event..."); try { - sendWorkitem(documentEvent.getDocument()); + sendWorkitem(documentEvent.getDocument()); } catch (AdapterException e) { // convert Adapter Exception into runtime Exception! - throw new ProcessingErrorException(e.getErrorContext() , e.getErrorCode(), e.getMessage(),e); + throw new ProcessingErrorException(e.getErrorContext(), e.getErrorCode(), e.getMessage(), e); } } @@ -138,7 +138,7 @@ public void onProcess(@Observes ProcessingEvent documentEvent) { * The value is a serialized version of the workitem. * * @param workitem - * @throws AdapterException + * @throws AdapterException */ public void sendWorkitem(ItemCollection workitem) throws AdapterException { String uid = workitem.getUniqueID(); diff --git a/imixs-adapters-ldap/pom.xml b/imixs-adapters-ldap/pom.xml index 2f5d978b..c79cfd8d 100644 --- a/imixs-adapters-ldap/pom.xml +++ b/imixs-adapters-ldap/pom.xml @@ -1,9 +1,11 @@ - + 4.0.0 org.imixs.workflow imixs-adapters - 3.0.4-SNAPSHOT + 3.1.0-SNAPSHOT imixs-adapters-ldap diff --git a/imixs-adapters-odf/pom.xml b/imixs-adapters-odf/pom.xml index e9a9bb31..92ea33da 100644 --- a/imixs-adapters-odf/pom.xml +++ b/imixs-adapters-odf/pom.xml @@ -1,9 +1,11 @@ - + 4.0.0 org.imixs.workflow imixs-adapters - 3.0.4-SNAPSHOT + 3.1.0-SNAPSHOT imixs-adapters-odf Imixs ODF Adapter diff --git a/imixs-adapters-poi/pom.xml b/imixs-adapters-poi/pom.xml index c78f5393..c4b3efd5 100644 --- a/imixs-adapters-poi/pom.xml +++ b/imixs-adapters-poi/pom.xml @@ -1,9 +1,11 @@ - + 4.0.0 org.imixs.workflow imixs-adapters - 3.0.4-SNAPSHOT + 3.1.0-SNAPSHOT imixs-adapters-poi Imixs POI Adapter diff --git a/imixs-adapters-qrcode/pom.xml b/imixs-adapters-qrcode/pom.xml index 0de73e71..8fec2d59 100644 --- a/imixs-adapters-qrcode/pom.xml +++ b/imixs-adapters-qrcode/pom.xml @@ -1,9 +1,11 @@ - + 4.0.0 org.imixs.workflow imixs-adapters - 3.0.4-SNAPSHOT + 3.1.0-SNAPSHOT imixs-adapters-qrcode diff --git a/imixs-adapters-sepa/pom.xml b/imixs-adapters-sepa/pom.xml index 82be0565..44a05b70 100644 --- a/imixs-adapters-sepa/pom.xml +++ b/imixs-adapters-sepa/pom.xml @@ -1,9 +1,11 @@ - + 4.0.0 org.imixs.workflow imixs-adapters - 3.0.4-SNAPSHOT + 3.1.0-SNAPSHOT imixs-adapters-sepa Imixs SEPA Adapter @@ -19,7 +21,7 @@ org.imixs.workflow imixs-workflow-engine - + org.imixs.workflow imixs-workflow-faces @@ -30,7 +32,6 @@ imixs-marty - diff --git a/imixs-adapters-sepa/src/main/java/org/imixs/workflow/sepa/services/SepaScheduler.java b/imixs-adapters-sepa/src/main/java/org/imixs/workflow/sepa/services/SepaScheduler.java index 43ebbd03..f8db1882 100644 --- a/imixs-adapters-sepa/src/main/java/org/imixs/workflow/sepa/services/SepaScheduler.java +++ b/imixs-adapters-sepa/src/main/java/org/imixs/workflow/sepa/services/SepaScheduler.java @@ -37,7 +37,6 @@ import org.eclipse.microprofile.config.inject.ConfigProperty; import org.imixs.workflow.FileData; import org.imixs.workflow.ItemCollection; -import org.imixs.workflow.Model; import org.imixs.workflow.WorkflowKernel; import org.imixs.workflow.engine.DocumentService; import org.imixs.workflow.engine.ModelService; @@ -51,6 +50,7 @@ import org.imixs.workflow.exceptions.PluginException; import org.imixs.workflow.exceptions.ProcessingErrorException; import org.imixs.workflow.exceptions.QueryException; +import org.openbpmn.bpmn.BPMNModel; import jakarta.ejb.EJB; import jakarta.inject.Inject; @@ -107,10 +107,13 @@ public ItemCollection run(ItemCollection configuration) throws SchedulerExceptio int taskID = configuration.getItemValueInteger(SepaWorkflowService.ITEM_INITIAL_TASK); try { // fetch the initial event - Model model = modelService.getModel(modelVersion); - ItemCollection event = model.getEvent(taskID, SepaWorkflowService.EVENT_START); - ItemCollection task = model.getTask(taskID); - + BPMNModel model = modelService.getModelManager().getModel(modelVersion); + // ItemCollection event = model.getEvent(taskID, + // SepaWorkflowService.EVENT_START); + ItemCollection event = modelService.getModelManager().findEventByID(model, taskID, taskID); + // ItemCollection task = model.getTask(taskID); + ItemCollection task = modelService.getModelManager().findTaskByID(model, taskID); + // load the report ItemCollection report = reportService.findReport(event.getItemValueString("txtReportName")); if (report == null) { @@ -274,7 +277,7 @@ public ItemCollection run(ItemCollection configuration) throws SchedulerExceptio sepaWorkflowService.logMessage("Failed: " + e.getMessage(), configuration, sepaExport); sepaExport.event(SepaWorkflowService.EVENT_FAILED); workflowService.processWorkItem(sepaExport); - + } catch (AccessDeniedException | ProcessingErrorException | PluginException | ModelException e1) { throw new SchedulerException(SepaWorkflowService.REPORT_ERROR, "Failed to execute sepa report '" + reportName + "' : " + e.getMessage(), e); @@ -284,7 +287,7 @@ public ItemCollection run(ItemCollection configuration) throws SchedulerExceptio // in all other cases we stop the processing try { if (sepaExport == null) { - // build the sepa export workitem.... + // build the sepa export workitem.... sepaExport = new ItemCollection().model(modelVersion).task(taskID); sepaExport.replaceItemValue(WorkflowKernel.CREATED, new Date()); sepaExport.replaceItemValue(WorkflowKernel.MODIFIED, new Date()); @@ -293,7 +296,7 @@ public ItemCollection run(ItemCollection configuration) throws SchedulerExceptio sepaWorkflowService.logMessage("Failed: " + e.getMessage(), configuration, sepaExport); sepaExport.event(SepaWorkflowService.EVENT_FAILED); workflowService.processWorkItem(sepaExport); - + } catch (AccessDeniedException | ProcessingErrorException | PluginException | ModelException e1) { throw new SchedulerException(SepaWorkflowService.REPORT_ERROR, "Failed to execute sepa report '" + reportName + "' : " + e.getMessage(), e); diff --git a/imixs-adapters-sepa/src/main/java/org/imixs/workflow/sepa/services/SepaWorkflowService.java b/imixs-adapters-sepa/src/main/java/org/imixs/workflow/sepa/services/SepaWorkflowService.java index ff798cd7..970e13bb 100644 --- a/imixs-adapters-sepa/src/main/java/org/imixs/workflow/sepa/services/SepaWorkflowService.java +++ b/imixs-adapters-sepa/src/main/java/org/imixs/workflow/sepa/services/SepaWorkflowService.java @@ -36,7 +36,6 @@ import java.util.regex.Pattern; import org.imixs.workflow.ItemCollection; -import org.imixs.workflow.Model; import org.imixs.workflow.WorkflowKernel; import org.imixs.workflow.engine.DocumentService; import org.imixs.workflow.engine.ModelService; @@ -48,6 +47,7 @@ import org.imixs.workflow.exceptions.ProcessingErrorException; import org.imixs.workflow.exceptions.QueryException; import org.imixs.workflow.util.XMLParser; +import org.openbpmn.bpmn.BPMNModel; import jakarta.annotation.security.DeclareRoles; import jakarta.annotation.security.RunAs; @@ -80,7 +80,7 @@ public class SepaWorkflowService { public static final int EVENT_REMOVE_REF = 200; public static final String INVOICE_UPDATE = "invoice_update"; - public static final String LINK_PROPERTY = "$workitemref"; + public static final String LINK_PROPERTY = ""; public static final String ITEM_MODEL_VERSION = "_model_version"; public static final String ITEM_INITIAL_TASK = "_initial_task"; @@ -386,8 +386,10 @@ public ItemCollection createNewSEPAExport(String key, ItemCollection workitem, I } // set workflow group name from the Task Element to identify document in xslt - Model model = modelService.getModel(modelVersion); - ItemCollection task = model.getTask(taskID); + BPMNModel model = modelService.getModelManager().getModel(modelVersion); + ItemCollection task = modelService.getModelManager().findTaskByID(model, taskID); + + // model.openDefaultProces().fin(type);.getTask(taskID); String modelTaskGroupName = task.getItemValueString("txtworkflowgroup"); // DO NOT CHANGE! sepaExport.setItemValue(WorkflowKernel.WORKFLOWGROUP, modelTaskGroupName); diff --git a/imixs-adapters-wopi/pom.xml b/imixs-adapters-wopi/pom.xml index f3cc18bf..74ed3b2f 100644 --- a/imixs-adapters-wopi/pom.xml +++ b/imixs-adapters-wopi/pom.xml @@ -1,9 +1,11 @@ - + 4.0.0 org.imixs.workflow imixs-adapters - 3.0.4-SNAPSHOT + 3.1.0-SNAPSHOT imixs-adapters-wopi diff --git a/imixs-adapters-wopi/src/main/java/org/imixs/workflow/wopi/WopiController.java b/imixs-adapters-wopi/src/main/java/org/imixs/workflow/wopi/WopiController.java index 0a440a8c..b04853c1 100644 --- a/imixs-adapters-wopi/src/main/java/org/imixs/workflow/wopi/WopiController.java +++ b/imixs-adapters-wopi/src/main/java/org/imixs/workflow/wopi/WopiController.java @@ -29,12 +29,6 @@ import java.util.logging.Logger; -import jakarta.annotation.PostConstruct; -import jakarta.enterprise.context.ConversationScoped; -import jakarta.enterprise.event.Observes; -import jakarta.inject.Inject; -import jakarta.inject.Named; - import org.eclipse.microprofile.config.inject.ConfigProperty; import org.imixs.jwt.JWTException; import org.imixs.workflow.FileData; @@ -42,6 +36,12 @@ import org.imixs.workflow.faces.fileupload.FileUploadController; import org.imixs.workflow.faces.util.ResourceBundleHandler; +import jakarta.annotation.PostConstruct; +import jakarta.enterprise.context.ConversationScoped; +import jakarta.enterprise.event.Observes; +import jakarta.inject.Inject; +import jakarta.inject.Named; + /** * The WopiController is a front end controller providing the access endpoint * for a file. @@ -80,7 +80,7 @@ public class WopiController implements Serializable { @Inject @ConfigProperty(name = "wopi.options", defaultValue = "none") String wopiOptions; - + @Inject WopiAccessHandler wopiAccessHandler; @@ -165,18 +165,17 @@ public String getWopiAccessURL(String uniqueid, String file, String userid, Stri logger.warning("...no wopi client endpoint found!"); return null; } - + // cut onlyoffice hints - if (baseURL.indexOf("&-1) { - baseURL=baseURL.substring(0,baseURL.indexOf("& postMessageOrigin; @@ -181,8 +181,6 @@ public Response getFileInfo(@PathParam("uniqueid") String uniqueid, @PathParam(" logger.warning("wokitem '" + uniqueid + "' no fileData object not found!"); return Response.status(Response.Status.NOT_FOUND).build(); } - - // create the json object JsonObjectBuilder builder = null; @@ -206,7 +204,8 @@ public Response getFileInfo(@PathParam("uniqueid") String uniqueid, @PathParam(" *

* /wopi/xxxxxxx-0000-0000-0000-yyyy_{FILENAME} *

- * If the file content was already modified before, the content is fetched from the + * If the file content was already modified before, the content is fetched from + * the * local wopi file cache * * @param name - the file name to be opened @@ -252,7 +251,8 @@ public Response getFileContents(@PathParam("uniqueid") String uniqueid, @PathPar } /** - * This method stores a modified file content form the wopi client into the local wopi file cache. + * This method stores a modified file content form the wopi client into the + * local wopi file cache. *

* The method expects a $uniqueID and filename *

@@ -269,19 +269,19 @@ public Response getFileContents(@PathParam("uniqueid") String uniqueid, @PathPar @Path("/{uniqueid : ([0-9a-f]{8}-.*|[0-9a-f]{11}-.*)}/files/{file}/contents") public Response postFileContents(@PathParam("uniqueid") String uniqueid, @PathParam("file") String file, InputStream contentStream, @QueryParam("access_token") String accessToken, @Context UriInfo info) { - + logger.info("......POST postFileContents: " + uniqueid + "/" + file); - // analyze header X-LOOL-WOPI-Timestamp, X-LOOL-WOPI-IsAutosave, X-LOOL-WOPI-IsExitSave + // analyze header X-LOOL-WOPI-Timestamp, X-LOOL-WOPI-IsAutosave, + // X-LOOL-WOPI-IsExitSave // We do ignroe the X-LOOL-WOPI-IsExitSave event - String wopiHeader=servletRequest.getHeader("X-LOOL-WOPI-IsExitSave"); - if (wopiHeader!=null && "true".equalsIgnoreCase(wopiHeader)) { + String wopiHeader = servletRequest.getHeader("X-LOOL-WOPI-IsExitSave"); + if (wopiHeader != null && "true".equalsIgnoreCase(wopiHeader)) { logger.info("...ignore X-LOOL-WOPI-IsExitSave = " + wopiHeader); - return Response.ok().build(); + return Response.ok().build(); } - + // clean unexpected query params accessToken = wopiAccessHandler.purgeAccessToken(accessToken); - // validate access_token JsonObject acessTokenPayload = wopiAccessHandler.validateAccessToken(accessToken); @@ -294,7 +294,7 @@ public Response postFileContents(@PathParam("uniqueid") String uniqueid, @PathPa try { content = readAllBytes(contentStream); logger.finest("...receifed " + content.length + " bytes"); - // cache the file data temporary + // cache the file data temporary fileData = new FileData(file, content, null, null); wopiAccessHandler.cacheFileData(accessToken, fileData); @@ -453,13 +453,11 @@ private JsonObjectBuilder buildJsonFileInfo(FileData fileData, Date modified, Js builder.add("UserCanWrite", true); builder.add("SupportsUpdate", true); // builder.add("EditNotificationPostMessage", true); - - + if (postMessageOrigin.isPresent() && !postMessageOrigin.get().isEmpty()) { - logger.info("......setting postMessageOrigin=" + postMessageOrigin.get() ); + logger.info("......setting postMessageOrigin=" + postMessageOrigin.get()); builder.add("PostMessageOrigin", postMessageOrigin.get()); } - return builder; } diff --git a/pom.xml b/pom.xml index 1361c936..ce14e27a 100644 --- a/pom.xml +++ b/pom.xml @@ -1,8 +1,10 @@ - + 4.0.0 org.imixs.workflow imixs-adapters - 3.0.4-SNAPSHOT + 3.1.0-SNAPSHOT pom Imxis Adapters @@ -19,11 +21,11 @@ UTF-8 - 6.0.8 + 6.1.0 5.0.0 3.0.1 10.0.0 - 3.0 + 6.0 2.0.0