demo models

This commit is contained in:
Ralph Soika 2025-11-23 22:25:28 +01:00
parent 9ddf32fc09
commit 65d6f9d75a
3 changed files with 6053 additions and 3 deletions

View file

@ -1,12 +1,18 @@
package ai.dynamixs;
import java.io.Serializable;
import java.util.List;
import java.util.logging.Logger;
import org.imixs.ai.workflow.OpenAIAPIService;
import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.engine.ConditionalExpressionEvent;
import org.imixs.workflow.engine.WorkflowService;
import org.imixs.workflow.exceptions.PluginException;
import org.imixs.workflow.faces.data.WorkflowEvent;
import jakarta.enterprise.event.Observes;
import jakarta.inject.Inject;
/**
* Debug class to test CDI Events of type BPMNConditionEvent
@ -15,16 +21,29 @@ public class ConditionalDebugAdapter implements Serializable {
private static final Logger logger = Logger.getLogger(ConditionalDebugAdapter.class.getName());
@Inject
protected WorkflowService workflowService;
@Inject
protected OpenAIAPIService llmService;
/**
* Test method
*
* @param conditionEvent
* @throws PluginException
*/
public void onConditionEvent(@Observes ConditionalExpressionEvent conditionalEvent) {
public void onConditionEvent(@Observes ConditionalExpressionEvent conditionalEvent) throws PluginException {
logger.info("We observe a BPMNConditionEvent -> SET FALSE");
List<ItemCollection> llmConditionDefinitions;
llmConditionDefinitions = workflowService.evalXMLExpressionList(
conditionalEvent.getCondition(), "imixs-ai", "CONDITION", conditionalEvent.getWorkitem(), true);
for (ItemCollection promptDefinition : llmConditionDefinitions) {
}
conditionalEvent.setCondition("false");
}
public void onWorkflowEvent(@Observes WorkflowEvent conditionEvent) {

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff