Can I embed the Imixs workflow engine in my existing Java WAR project and disable the scheduler triggered by the SetupService startup method? #913
Replies: 2 comments 5 replies
-
Hi @Jegadeeshkannan - welcome to Imixs-Workflow! creating a new process instance you can use the fluent api which ensures that the workitem is initialized correctly. So you code example should look more like this: public String startApprovalWorkflow(int amount) {
try {
ItemCollection workitem=new ItemCollection().model("1.0.0").task(100).event(10);
// No security roles applied
workItem.replaceItemValue("keyReader", ""); // Anyone can read
workItem.replaceItemValue("keyAuthor", ""); // Anyone can modify
workItem.replaceItemValue("txtWorkflowTitle", "Approval Request");
workItem.replaceItemValue("amount", amount); // Add amount value
workItem = workflowService.processWorkItem(workItem);
return "Approval Workflow started with ID: " + workItem.getItemValueString("$uniqueid");
} catch (Exception e) {
return "Error starting Approval Workflow: " + e.getMessage();
}
} The read and write access can and should be controlled by the model. So normally you would not set read and write access programmatically. Regarding your question about the tables: there are only 2 tables needed. The document ant the eventlog table. You will find the create statements here You question about the scheduler services is a little bit unclear to me. As you have not started any schedulers the setup service will not start any of them. Let me know if this solves your problems to get started. |
Beta Was this translation helpful? Give feedback.
-
The process-manager is now also successful tested on the latest version of OpenLiberty with Jakarta EE 10. For some reason I need to start the container twice after a new build. In the first start the OpenLiberty server did not find the timer db created during startup. I am not the OpenLiberty expert, maybe you can help here? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am new to Imixs and currently working on replacing an existing JBPM workflow with Imixs. Our goal is to embed Imixs workflow dependencies, load the BPMN file previously used in JBPM, and execute the process through Imixs. To explore this, I started with a small proof of concept (POC) and added the following code to execute the process defined in the BPMN file.
During this process, I encountered some issues. Initially, I had to manually add the EventLog table to my Oracle database for persistence. After doing so, I faced another error stating that the WLPPART table/view does not exist. My concern is understanding how many additional tables I need to create, as I am unable to find documentation listing the prerequisite tables required for executing the process.
Additionally, my database does not allow automatic table creation through the application, meaning all tables must be manually created using scripts. I need guidance on the following points:
Can I embed the Imixs workflow engine within my existing Java WAR project, load the BPMN file, and execute processes? Or is it necessary to use the Imixs ProcessManager project and host it separately to handle BPMN execution?
If embedding Imixs into my existing WAR project running on Liberty Server is possible, can I disable the default scheduler, which starts through the SetupService startup method?
Where can I find a complete list of required tables needed for process execution (besides Document and EventLog)? Since my database requires manual table creation, I need a clear reference to ensure all necessary tables are in place.
Any guidance on these points would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions