reorg workflows

This commit is contained in:
Ralph Soika 2026-02-12 23:47:14 +01:00
parent 1462e1817e
commit 079d035235
50 changed files with 10048 additions and 94 deletions

File diff suppressed because it is too large Load diff

View file

@ -42,19 +42,25 @@ import java.util.Map;
import java.util.Set;
import java.util.logging.Logger;
import org.imixs.ai.workflow.ImixsAIPromptEvent;
import org.imixs.workflow.FileData;
import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.ItemCollectionComparator;
import org.imixs.workflow.WorkflowKernel;
import org.imixs.workflow.engine.DocumentService;
import org.imixs.workflow.engine.plugins.HistoryPlugin;
import org.imixs.workflow.office.forms.WorkitemService;
import org.imixs.workflow.exceptions.QueryException;
import jakarta.enterprise.event.Observes;
import jakarta.inject.Inject;
/**
* The ChronicleTextBuilder creates a text representation of all chronicle data
* for a given workitem.
*
* The ChronicleTextBuilder is a CDI Bean observing the CDI event
* `ImixsAIPromptEvent` and replaces the placeholder {chronicle} with the
* chronicle data of the given workitem.
* <p>
* The class creates a text representation of all chronicle data for a given
* workitem.
* <p>
* The output format is structured by year and month:
*
@ -98,8 +104,8 @@ public class ChronicleTextBuilder implements Serializable {
private Locale locale;
private String filterType;
@Inject
private WorkitemService workitemService;
// @Inject
// private WorkitemService workitemService;
@Inject
private DocumentService documentService;
@ -113,6 +119,21 @@ public class ChronicleTextBuilder implements Serializable {
private DateTimeFormatter timeFormatter;
private DateTimeFormatter monthFormatter;
/**
* Default constructor
*/
public ChronicleTextBuilder() {
this.locale = Locale.ENGLISH;
this.filterType = null;
this.chronicleEntries = new ArrayList<>();
this.yearsMonths = new HashMap<>();
// Initialize date formatters
this.dayFormatter = DateTimeFormatter.ofPattern("d. MMM yyyy", this.locale);
this.timeFormatter = DateTimeFormatter.ofPattern("HH:mm", this.locale);
this.monthFormatter = DateTimeFormatter.ofPattern("MMMM", this.locale);
}
/**
* Constructor with workitem and locale.
*
@ -142,6 +163,29 @@ public class ChronicleTextBuilder implements Serializable {
this(workitem, Locale.ENGLISH);
}
/**
* This CDI class reacts on the CDI Event `ImixsAIPromptEvent` and replaces the
* placeholder {chronicle} with the chronicle data of the given workitem.
*
* @param event
*/
public void onEvent(@Observes ImixsAIPromptEvent event) {
if (event.getWorkitem() == null) {
return;
}
String prompt = event.getPromptTemplate();
if (prompt.contains("{chronicle}")) {
this.workitem = event.getWorkitem();
String result = build();
prompt = prompt.replace("{chronicle}", result);
// update the prompt tempalte
event.setPromptTemplate(prompt);
}
}
/**
* Sets a filter to include only entries of a specific type. Valid types:
* history, comment, dms, reference, version, imixs-ai
@ -269,11 +313,8 @@ public class ChronicleTextBuilder implements Serializable {
* available.
*/
private void collectVersionEntries() {
if (workitemService == null || documentService == null) {
return;
}
List<ItemCollection> versions = workitemService.findAllVersions(workitem);
List<ItemCollection> versions = findAllVersions(workitem);
for (ItemCollection version : versions) {
// Skip current workitem
if (workitem.getUniqueID().equals(version.getUniqueID())) {
@ -472,4 +513,34 @@ public class ChronicleTextBuilder implements Serializable {
return descending ? -result : result;
}
}
/**
* This method finds all versions of a given workitem.
*
*/
private List<ItemCollection> findAllVersions(ItemCollection workitem) {
List<ItemCollection> versions = new ArrayList<ItemCollection>();
if (null == workitem)
return versions;
List<ItemCollection> col = null;
String sRefID = workitem.getItemValueString("$workitemId");
String refQuery = "( (type:\"workitem\" OR type:\"workitemarchive\" OR type:\"workitemversion\") AND $workitemid:\""
+ sRefID + "\")";
try {
col = documentService.findStubs(refQuery, 999, 0, WorkflowKernel.LASTEVENTDATE, true);
// sort by $modified
Collections.sort(col, new ItemCollectionComparator("$modified", true));
// Only return version list if more than one version was found!
if (col.size() > 1) {
for (ItemCollection aworkitem : col) {
versions.add(aworkitem);
}
}
} catch (QueryException e) {
logger.warning("findAllVersions - invalid query: " + e.getMessage());
}
return versions;
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -91,7 +91,11 @@
<item name="customer.country" type="custom" path="country" required="true" label="Country:" />
<item name="customer.address" type="textarea" label="Address:" span="6" />
</imixs-form-section>
<imixs-form-section columns="3" label="Kontaktdaten" readonly="false">
<item name="customer.firstname" type="text" readonly="false" label="Firstname:" />
<item name="customer.lastname" type="text" readonly="false" label="Lastname.:" />
<item name="customer.email" type="text" readonly="false" required="true" label="E-Mail:" />
</imixs-form-section>
<imixs-form-section columns="1" label="" readonly="false">
<item name="customer.details" type="textarea" label="Details:" />
</imixs-form-section>

View file

@ -36,6 +36,7 @@
<imixs:value><![CDATA[org.imixs.marty.profile.MailPlugin]]></imixs:value>
<imixs:value><![CDATA[org.imixs.workflow.engine.plugins.IntervalPlugin]]></imixs:value>
<imixs:value><![CDATA[org.imixs.workflow.engine.plugins.SplitAndJoinPlugin]]></imixs:value>
<imixs:value><![CDATA[org.imixs.ai.rag.workflow.RAGIndexPlugin]]></imixs:value>
</imixs:item>
<open-bpmn:auto-align>true</open-bpmn:auto-align>
</bpmn2:extensionElements>
@ -71,6 +72,7 @@
<bpmn2:flowNodeRef>event_d4UiTw</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>dataObject_Nw0oQQ</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>event_lj360w</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>event_5Hf7hA</bpmn2:flowNodeRef>
</bpmn2:lane>
<bpmn2:lane id="lane_wSVPvA" name="Lane 2">
<bpmn2:documentation id="documentation_dwLYgA"/>
@ -104,6 +106,7 @@
<bpmn2:flowNodeRef>dataObject_QIYhww</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>textAnnotation_ASEpEw</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>event_XQ7hGQ</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>dataObject_VbiNuQ</bpmn2:flowNodeRef>
</bpmn2:lane>
</bpmn2:laneSet>
<bpmn2:startEvent id="StartEvent_1" name="Start">
@ -1317,31 +1320,34 @@ Product Details:
<bpmn2:dataObject id="dataObject_u4ZytA" imixs:datatype="form-data" name="Order Form">
<bpmn2:documentation id="documentation_lSiw2w"><![CDATA[<?xml version="1.0"?>
<imixs-form>
<imixs-form-section columns="2" label="">
<imixs-form-section columns="1" label="E-Mail Summary" readonly="true" >
<item name="customer.summary" type="custom" path="markdown" />
</imixs-form-section>
<imixs-form-section columns="2" label="Master Data">
<item name="customer.ref"
type="custom" required="false"
path="workitemlink"
options="($workflowgroup:Product)((type:workitem) OR (type:workitemarchive))"
label="Customer:" />
</imixs-form-section>
<imixs-form-section columns="1" label="" readonly="false">
<item name="request.subject" type="text" label="Inquiry:" />
<item name="request.description" type="custom" path="markdowneditor" readonly="true" label="Description:" />
</imixs-form-section>
<imixs-form-section columns="1" label="Offer:" readonly="false" >
<item name="offer.proposal" type="custom" path="markdowneditor" />
</imixs-form-section>
<imixs-form-section columns="1" label="Product Suggestions" readonly="true" >
<item name="product.ref"
type="custom" required="true"
path="workitemlink"
options="($workflowgroup:Product)((type:workitem) OR (type:workitemarchive))"
label="References:" />
label="Product Suggestions:" />
</imixs-form-section>
<imixs-form-section columns="1" label="Offer Proposal:" readonly="false" >
<item name="offer.proposal" type="custom" path="markdowneditor" />
</imixs-form-section>
</imixs-form>
]]></bpmn2:documentation>
<bpmn2:dataState id="dataState_X4nVjg"/>
@ -1349,7 +1355,7 @@ Product Details:
<bpmn2:association id="association_0SKl0g" sourceRef="dataObject_u4ZytA" targetRef="Task_3">
<bpmn2:documentation id="documentation_VQTg6w"/>
</bpmn2:association>
<bpmn2:intermediateCatchEvent id="event_EyDvQQ" imixs:activityid="11" name="Back (Debug)">
<bpmn2:intermediateCatchEvent id="event_EyDvQQ" imixs:activityid="11" name="AI Regeneration">
<bpmn2:extensionElements>
<imixs:item name="keylogtimeformat" type="xs:string">
<imixs:value><![CDATA[2]]></imixs:value>
@ -1401,7 +1407,7 @@ Product Details:
<imixs:value/>
</imixs:item>
<imixs:item name="txtactivityresult" type="xs:string">
<imixs:value><![CDATA[<item name="comment" ignore="true"/>]]></imixs:value>
<imixs:value><![CDATA[<item name="action">home</item>]]></imixs:value>
</imixs:item>
<imixs:item name="txtname" type="xs:string">
<imixs:value><![CDATA[Speichern]]></imixs:value>
@ -1585,7 +1591,7 @@ Product Details:
<imixs:value><![CDATA[0]]></imixs:value>
</imixs:item>
<imixs:item name="rtfresultlog" type="xs:string">
<imixs:value/>
<imixs:value><![CDATA[Anlayse attachments]]></imixs:value>
</imixs:item>
<imixs:item name="keyupdateacl" type="xs:boolean">
<imixs:value>false</imixs:value>
@ -1718,7 +1724,7 @@ Address: <itemvalue>customer.country</itemvalue> <itemvalue>customer.zip</itemva
<imixs:value><![CDATA[0]]></imixs:value>
</imixs:item>
<imixs:item name="rtfresultlog" type="xs:string">
<imixs:value><![CDATA[Retrieve Products]]></imixs:value>
<imixs:value><![CDATA[Retrieve possible Products]]></imixs:value>
</imixs:item>
<imixs:item name="keyupdateacl" type="xs:boolean">
<imixs:value>false</imixs:value>
@ -1818,6 +1824,7 @@ Address: <itemvalue>customer.country</itemvalue> <itemvalue>customer.zip</itemva
</bpmn2:extensionElements>
<bpmn2:documentation id="documentation_wNTWEQ"><![CDATA[Update Data]]></bpmn2:documentation>
<bpmn2:incoming>sequenceFlow_HfDRCQ</bpmn2:incoming>
<bpmn2:incoming>sequenceFlow_jZwWAw</bpmn2:incoming>
<bpmn2:outgoing>sequenceFlow_AUsmbQ</bpmn2:outgoing>
</bpmn2:intermediateCatchEvent>
<bpmn2:sequenceFlow id="sequenceFlow_AUsmbQ" sourceRef="event_niR0HA" targetRef="event_KwpMKw">
@ -1899,9 +1906,6 @@ Address: <itemvalue>customer.country</itemvalue> <itemvalue>customer.zip</itemva
<bpmn2:documentation id="documentation_NpXeZQ"/>
</bpmn2:sequenceFlow>
<bpmn2:association id="association_XvFOIw" sourceRef="DataObject_2" targetRef="Participant_1"/>
<bpmn2:association id="association_0m7KeQ" sourceRef="DataObject_2" targetRef="task_ol2R9A">
<bpmn2:documentation id="documentation_UmygWg"/>
</bpmn2:association>
<bpmn2:association id="association_jW6RnQ" sourceRef="event_KwpMKw" targetRef="dataObject_iq4agg">
<bpmn2:documentation id="documentation_XBh77Q"/>
</bpmn2:association>
@ -1956,12 +1960,6 @@ Address: <itemvalue>customer.country</itemvalue> <itemvalue>customer.zip</itemva
<imixs:item name="txtnextprocesstree" type="xs:string">
<imixs:value/>
</imixs:item>
<imixs:item name="txtactivityresult" type="xs:string">
<imixs:value><![CDATA[<item name="action">home</item>
<dynamixs-ai name="COGNITO" >
<debug>true</debug>
</dynamixs-ai>]]></imixs:value>
</imixs:item>
<imixs:item name="txtname" type="xs:string">
<imixs:value><![CDATA[Speichern]]></imixs:value>
</imixs:item>
@ -1971,6 +1969,13 @@ Address: <itemvalue>customer.country</itemvalue> <itemvalue>customer.zip</itemva
<imixs:item name="keyupdateacl" type="xs:boolean">
<imixs:value>false</imixs:value>
</imixs:item>
<imixs:item name="txtactivityresult" type="xs:string">
<imixs:value><![CDATA[<item name="action">home</item>
<imixs-ai name="PROMPT">
<endpoint>https://embeddings.llama.cpp.imixs.com/</endpoint>
<debug>true</debug>
</imixs-ai>]]></imixs:value>
</imixs:item>
</bpmn2:extensionElements>
<bpmn2:documentation id="documentation_D4Kkgw"><![CDATA[Update Data]]></bpmn2:documentation>
<bpmn2:outgoing>sequenceFlow_1TkjsQ</bpmn2:outgoing>
@ -2521,7 +2526,7 @@ Und erst am Ende alles zurück ins RAG - inklusive der Anfrage des Kunden und de
<imixs:value><![CDATA[0]]></imixs:value>
</imixs:item>
<imixs:item name="rtfresultlog" type="xs:string">
<imixs:value/>
<imixs:value><![CDATA[Summarize customer request]]></imixs:value>
</imixs:item>
<imixs:item name="keyupdateacl" type="xs:boolean">
<imixs:value>false</imixs:value>
@ -2529,7 +2534,7 @@ Und erst am Ende alles zurück ins RAG - inklusive der Anfrage des Kunden und de
<imixs:item name="txtactivityresult" type="xs:string">
<imixs:value><![CDATA[<imixs-ai name="ASSIST">
<endpoint><propertyvalue>llm.service.endpoint</propertyvalue></endpoint>
<options>{"n_predict": 4096, "temperature": 0.7}</options>
<options>{"n_predict": 1024, "temperature": 0.7}</options>
<result-item>customer.summary</result-item>
<debug>true</debug>
</imixs-ai>
@ -2550,12 +2555,12 @@ Und erst am Ende alles zurück ins RAG - inklusive der Anfrage des Kunden und de
<PromptDefinition>
<prompt_options>{"n_predict": 255, "temperature": 0.2, "top_p": 0.9}</prompt_options>
<prompt role="system"><![CDATA[
YYou are a sales advisor. A new workflow is starting for this customer.
You are a sales advisor. A new offer request is starting from a customer.
Create a short briefing in this exact format:
**Customer:**
[1-2 bullet points: key facts about this customer]
[1-2 bullet points: name, address, key facts about this customer]
**Opportunities:**
[1-2 bullet points, or "None identified." if nothing relevant]
@ -2590,9 +2595,6 @@ Created: <itemvalue>$created</itemvalue>
<bpmn2:sequenceFlow id="sequenceFlow_ELk13Q" sourceRef="event_sZERLw" targetRef="event_d4UiTw">
<bpmn2:documentation id="documentation_DVyNBg"/>
</bpmn2:sequenceFlow>
<bpmn2:association id="association_FP4KEw" sourceRef="DataObject_2" targetRef="task_0THxmg">
<bpmn2:documentation id="documentation_H20F5g"/>
</bpmn2:association>
<bpmn2:sequenceFlow id="sequenceFlow_0HTg8g" sourceRef="event_8dt92Q" targetRef="Task_2">
<bpmn2:documentation id="documentation_lvV8kQ"/>
</bpmn2:sequenceFlow>
@ -2607,6 +2609,33 @@ Created: <itemvalue>$created</itemvalue>
<bpmn2:sequenceFlow id="sequenceFlow_5oxu0g" sourceRef="event_lj360w" targetRef="event_z9ZfGA">
<bpmn2:documentation id="documentation_NPvi1w"/>
</bpmn2:sequenceFlow>
<bpmn2:boundaryEvent attachedToRef="task_0THxmg" id="event_5Hf7hA" name="">
<bpmn2:documentation id="documentation_ZODmow"/>
<bpmn2:outgoing>sequenceFlow_jZwWAw</bpmn2:outgoing>
<bpmn2:timerEventDefinition id="timerEventDefinition_GeAR5Q"/>
</bpmn2:boundaryEvent>
<bpmn2:sequenceFlow id="sequenceFlow_jZwWAw" sourceRef="event_5Hf7hA" targetRef="event_niR0HA">
<bpmn2:documentation id="documentation_UOImIQ"/>
</bpmn2:sequenceFlow>
<bpmn2:dataObject id="dataObject_VbiNuQ" imixs:datatype="prompt-data" name="Prompt">
<bpmn2:documentation id="documentation_92A4gw"><![CDATA[<PromptDefinition>
<prompt_options>{"n_predict": 2048, "temperature": 0.2, "top_p": 0.9}</prompt_options>
<prompt role="system"><![CDATA[
You are a process analyst. A workflow has just been completed.
Create a brief project insight:
What specifically happened? (Include relevant names from people, companies, products when mentioned.)
- Is there anything unusual or important to remember for the future? (Pay attention to user comments - they often contain important warnings or decisions.)
No general advice. Only project-specific facts and insights. ]]]]><![CDATA[>
</prompt>
<prompt role="user"><![CDATA[
{chronicle}
]]]]><![CDATA[>
</prompt>
</PromptDefinition>]]></bpmn2:documentation>
</bpmn2:dataObject>
<bpmn2:association id="association_ifwUdg" sourceRef="dataObject_VbiNuQ" targetRef="event_oOnn8A">
<bpmn2:documentation id="documentation_65Go1A"/>
</bpmn2:association>
</bpmn2:process>
<bpmn2:process id="process_2" name="Default Process" processType="Public">
<bpmn2:documentation id="documentation_imRbaw"/>
@ -2709,7 +2738,7 @@ Create a short briefing (3-5 bullet points):
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="TextAnnotation_4" id="BPMNShape_TextAnnotation_4">
<dc:Bounds height="60.0" width="239.0" x="1560.0" y="1040.0"/>
<dc:Bounds height="60.0" width="239.0" x="1570.0" y="930.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="IntermediateCatchEvent_7" id="BPMNShape_IntermediateCatchEvent_12">
<dc:Bounds height="36.0" width="36.0" x="1387.0" y="1117.0"/>
@ -2888,6 +2917,18 @@ Create a short briefing (3-5 bullet points):
<dc:Bounds height="20.0" width="100.0" x="395.0" y="326.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="event_5Hf7hA" id="BPMNShape_1rWr8w">
<dc:Bounds height="36.0" width="36.0" x="1537.0" y="292.0"/>
<bpmndi:BPMNLabel id="BPMNLabel_YnjDsg">
<dc:Bounds height="20.0" width="100.0" x="1505.0" y="331.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="dataObject_VbiNuQ" id="BPMNShape_3etXvg">
<dc:Bounds height="50.0" width="35.0" x="930.0" y="620.0"/>
<bpmndi:BPMNLabel id="BPMNLabel_sm2Otg">
<dc:Bounds height="20.0" width="100.0" x="897.5" y="675.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="Association_2" id="BPMNEdge_Association_2" sourceElement="BPMNShape_DataObject_1" targetElement="BPMNShape_Task_5">
<di:waypoint x="282.0" y="240.0"/>
<di:waypoint x="282.0" y="285.0"/>
@ -2934,8 +2975,8 @@ Create a short briefing (3-5 bullet points):
<bpmndi:BPMNLabel id="BPMNLabel_62"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="Association_5" id="BPMNEdge_Association_5" sourceElement="BPMNShape_TextAnnotation_4" targetElement="BPMNShape_Task_3">
<di:waypoint x="1560.0" y="1061.0"/>
<di:waypoint x="1527.0" y="1061.0"/>
<di:waypoint x="1570.0" y="955.0"/>
<di:waypoint x="1527.0" y="955.0"/>
<di:waypoint x="1527.0" y="1110.0"/>
<bpmndi:BPMNLabel id="BPMNLabel_12"/>
</bpmndi:BPMNEdge>
@ -3143,11 +3184,6 @@ Create a short briefing (3-5 bullet points):
<di:waypoint x="277.5" y="235.0"/>
<di:waypoint x="1300.0" y="1120.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="association_0m7KeQ" id="BPMNEdge_7vOH4w" sourceElement="BPMNShape_DataObject_1" targetElement="BPMNShape_GaaSuQ">
<di:waypoint x="295.0" y="234.0"/>
<di:waypoint x="646.0" y="234.0"/>
<di:waypoint x="646.0" y="310.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="association_jW6RnQ" id="BPMNEdge_gHz4HQ" sourceElement="BPMNShape_qvXTpw" targetElement="BPMNShape_tMFi0g">
<di:waypoint x="1735.0" y="317.0"/>
<di:waypoint x="1735.0" y="289.0"/>
@ -3155,8 +3191,8 @@ Create a short briefing (3-5 bullet points):
<di:waypoint x="1738.0" y="260.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_1TkjsQ" id="BPMNEdge_k0IlIw" sourceElement="BPMNShape_5MzWQg" targetElement="BPMNShape_Task_9">
<di:waypoint x="1024.0" y="743.0"/>
<di:waypoint x="1024.0" y="773.0"/>
<di:waypoint x="1025.0" y="743.0"/>
<di:waypoint x="1025.0" y="773.0"/>
<di:waypoint x="1115.0" y="773.0"/>
<di:waypoint x="1115.0" y="800.0"/>
</bpmndi:BPMNEdge>
@ -3241,11 +3277,6 @@ Create a short briefing (3-5 bullet points):
<di:waypoint x="1083.0" y="335.0"/>
<di:waypoint x="1337.0" y="335.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="association_FP4KEw" id="BPMNEdge_qQMhbw" sourceElement="BPMNShape_DataObject_1" targetElement="BPMNShape_wu0GaA">
<di:waypoint x="295.0" y="215.0"/>
<di:waypoint x="1525.0" y="215.0"/>
<di:waypoint x="1525.0" y="310.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_0HTg8g" id="BPMNEdge_CpWQFw" sourceElement="BPMNShape_GGKSew" targetElement="BPMNShape_Task_5">
<di:waypoint x="313.0" y="335.0"/>
<di:waypoint x="360.0" y="335.0"/>
@ -3260,6 +3291,17 @@ Create a short briefing (3-5 bullet points):
<di:waypoint x="525.0" y="266.0"/>
<di:waypoint x="525.0" y="317.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_jZwWAw" id="BPMNEdge_iACOlw" sourceElement="BPMNShape_1rWr8w" targetElement="BPMNShape_LHVlgA">
<di:waypoint x="1555.0" y="292.0"/>
<di:waypoint x="1555.0" y="270.0"/>
<di:waypoint x="1655.0" y="270.0"/>
<di:waypoint x="1655.0" y="317.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="association_ifwUdg" id="BPMNEdge_Od4ouA" sourceElement="BPMNShape_3etXvg" targetElement="BPMNShape_5MzWQg">
<di:waypoint x="965.0" y="644.0"/>
<di:waypoint x="1025.0" y="644.0"/>
<di:waypoint x="1025.0" y="707.0"/>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
<bpmndi:BPMNLabelStyle id="BPMNLabelStyle_1">
<dc:Font name="arial" size="9.0"/>

View file

@ -22,7 +22,7 @@
<imixs:item name="txtplugins" type="xs:string">
<imixs:value><![CDATA[org.imixs.workflow.office.plugins.WorkitemLinkPlugin]]></imixs:value>
<imixs:value><![CDATA[ai.dynamixs.OrderPlugin]]></imixs:value>
<imixs:value><![CDATA[org.imixs.ai.rag.RAGIndexPlugin]]></imixs:value>
<imixs:value><![CDATA[org.imixs.ai.rag.workflow.RAGIndexPlugin]]></imixs:value>
<imixs:value><![CDATA[org.imixs.workflow.engine.plugins.ResultPlugin]]></imixs:value>
<imixs:value><![CDATA[org.imixs.workflow.engine.plugins.RulePlugin]]></imixs:value>
<imixs:value><![CDATA[org.imixs.marty.profile.ProfilePlugin]]></imixs:value>
@ -37,7 +37,6 @@
<imixs:value><![CDATA[org.imixs.marty.profile.MailPlugin]]></imixs:value>
<imixs:value><![CDATA[org.imixs.workflow.engine.plugins.IntervalPlugin]]></imixs:value>
<imixs:value><![CDATA[org.imixs.workflow.engine.plugins.SplitAndJoinPlugin]]></imixs:value>
<imixs:value><![CDATA[ai.dynamixs.cognition.CognitoPlugin]]></imixs:value>
</imixs:item>
<open-bpmn:auto-align>true</open-bpmn:auto-align>
</bpmn2:extensionElements>
@ -159,40 +158,33 @@ Address: <itemvalue>customer.country</itemvalue> <itemvalue>customer.zip</itemva
<bpmn2:dataObject id="DataObject_2" imixs:datatype="form-data" name="Order Form">
<bpmn2:documentation id="Documentation_8"><![CDATA[<?xml version="1.0"?>
<imixs-form>
<imixs-form-section columns="1" label="Purchase Order Header">
<item name="purchase.order.id" span="2" type="text" required="true" label="PO ID:" />
<item name="purchase.order.date" span="3" type="date" required="true" label="PO Date:" />
<item name="purchase.order.duedate" span="3" type="date" required="true" label="Due Date:" />
<item name="supplier.id" span="4" type="text" required="true" label="Supplier ID:" />
<item name="supplier.name" span="12" type="text" required="true" label="Supplier Name:" />
<imixs-form-section columns="3" readonly="true" >
<item name="document.company" type="text" label="Company: " />
<item name="document.type" type="text" label="Doument Type: " />
<item name="document.language" type="text" label="Language: " />
</imixs-form-section>
<imixs-form-section columns="1" label="Purchase Order Details">
<item name="purchase.order.description" span="12" type="textarea" required="true" label="Order Description:" />
<item name="purchase.order.reference" span="6" type="text" label="Reference:" />
<item name="purchase.order.priority" span="3" type="selectOneMenu" label="Priority:"
options="Low;Medium;High" required="true" />
<item name="purchase.order.currency" span="3" type="selectOneMenu" label="Currency:"
options="EUR;USD;CHF;GBP" required="true" />
<imixs-form-section columns="1" label="Customer Summary" readonly="true" >
<item name="customer.summary" type="custom" path="markdown" />
</imixs-form-section>
<imixs-form-section columns="4" label="Order Lines">
<item name="purchase.order.items" type="html" label="Order Items (Add Rows in System)" />
<imixs-form-section columns="1" label="Product Catalog" readonly="false">
<item name="customer.ref"
type="custom" required="false"
path="workitemlink"
options="($workflowgroup:Product)((type:workitem) OR (type:workitemarchive))"
label="Customer:" />
<item name="product.ref"
type="custom" required="false"
path="workitemlink"
options="($workflowgroup:Product)((type:workitem) OR (type:workitemarchive))"
label="Products:" />
</imixs-form-section>
<imixs-form-section columns="1" label="Controlling">
<item name="purchase.order.status" span="3" type="selectOneMenu" label="Status:"
options="Draft;Submitted;Approved;Rejected;Completed" required="true" />
<item name="purchase.order.approver" span="3" type="text" label="Approver:" />
<item name="purchase.order.approvaldate" span="3" type="date" label="Approval Date:" />
<item name="purchase.order.notes" span="12" type="textarea" label="Additional Notes:" />
</imixs-form-section>
<imixs-form-section columns="3" label="Budget Information">
<item name="purchase.order.budgetcode" type="text" label="Budget Code:" />
<item name="purchase.order.budgetresponsible" type="text" label="Budget Responsible:" />
<item name="purchase.order.budgetamount" type="currency" label="Budget Amount:" />
</imixs-form-section>
</imixs-form>]]></bpmn2:documentation>
<bpmn2:dataState id="DataState_1"/>
</bpmn2:dataObject>
@ -2636,7 +2628,7 @@ Create a short briefing (3-5 bullet points):
</bpmn2:association>
</bpmn2:process>
<bpmn2:signal id="signal_3" name="org.imixs.ai.workflow.OpenAIAPIAdapter"/>
<bpmn2:signal id="signal_4" name="org.imixs.ai.rag.RAGRetrievalAdapter"/>
<bpmn2:signal id="signal_4" name="org.imixs.ai.rag.workflow.RAGRetrievalAdapter"/>
<bpmn2:message id="message_1" name="Message 1">
<bpmn2:documentation id="documentation_lq3hSg"/>
</bpmn2:message>
@ -2682,7 +2674,7 @@ Create a short briefing (3-5 bullet points):
<bpmndi:BPMNShape bpmnElement="EndEvent_2" id="BPMNShape_EndEvent_2">
<dc:Bounds height="36.0" width="36.0" x="2097.0" y="1187.0"/>
<bpmndi:BPMNLabel id="BPMNLabel_110" labelStyle="BPMNLabelStyle_1">
<dc:Bounds height="20.0" width="100.0" x="2071.138671875" y="1225.1079711914062"/>
<dc:Bounds height="20.0" width="100.0" x="2071.138671875" y="1225.10791015625"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="IntermediateCatchEvent_17" id="BPMNShape_IntermediateCatchEvent_27">

View file

@ -0,0 +1,20 @@
<imixs-ai name="PROMPT">
<endpoint>https://embeddings.llama.cpp.imixs.com/</endpoint>
<prompt-template>
<PromptDefinition>
<prompt_options>{"n_predict": 2048, "temperature": 0.2, "top_p": 0.9}</prompt_options>
<prompt role="system"><![CDATA[
You are a process analyst. A workflow has just been completed.
Create a brief project insight:
What specifically happened? (Include relevant names from people, companies, products when mentioned.)
- Is there anything unusual or important to remember for the future? (Pay attention to user comments - they often contain important warnings or decisions.)
No general advice. Only project-specific facts and insights. ]]>
</prompt>
<prompt role="user"><![CDATA[
{chronicle}
]]>
</prompt>
</PromptDefinition>
</prompt-template>
<debug>true</debug>
</imixs-ai>

View file

@ -1 +0,0 @@
**Company Information** - Company Name: Imixs Software Solution GmbH - Address: Agnes-Poeckels-Bogen 1, 80992 München - Contact: Herr Thomas Riess **General Billing Data** - Customer Number: 987654321 - Delivery/Performance Date: 28.04.2023 - Invoice Date: 02.05.2023 - Invoice Number: R12345 **Invoice Total Information** - Net Amount: €1,039.90 - VAT (19%): €197.58 - Total Amount: €1,237.48 **Payment Summary** - Payment Terms: Within 14 days from invoice date without deductions **Invoice Items** | Pos. | Bezeichnung | Menge | Einzelpreis (€) | Gesamtpreis (€) | |---|---|---|---|---| | 1 | Dell Inspiron 16 Laptop | 1 | 1,000.00 | 1,000.00 | | 2 | Logitech G PRO Wireless Maus | 1 | 39.90 | 39.90 |