public Object resolveVariable(QName variableName) { return context.getVariable(variableName.getLocalPart()); } });
if (unit.getOtherIdentifiers() != null) { for (int i = 0; i < length; i++ ) { vars[i] = context.getVariable( unit.getOtherIdentifiers()[i] ); InternalWorkingMemory internalWorkingMemory = (InternalWorkingMemory) context.getKieRuntime(); (GlobalResolver) context.getKieRuntime().getGlobals() );
public void execute(ProcessContext context) throws Exception { WorkflowProcessInstance pi = context.getNodeInstance().getProcessInstance(); NodeInstance nodeInstance = findNodeByUniqueId(pi.getNodeInstances(), attachedToNodeId); if (nodeInstance != null) { ((org.jbpm.workflow.instance.NodeInstance)nodeInstance).cancel(); } }
public void execute(ProcessContext context) throws Exception { ScriptEngineManager factory = new ScriptEngineManager(); ScriptEngine engine = factory.getEngineByName("JavaScript"); engine.put("kcontext", context); // insert globals into context Globals globals = context.getKieRuntime().getGlobals(); if (globals != null && globals.getGlobalKeys() != null) { for (String gKey : globals.getGlobalKeys()) { engine.put(gKey, globals.get(gKey)); } } if (context.getProcessInstance() != null && context.getProcessInstance().getProcess() != null) { // insert process variables VariableScopeInstance variableScope = (VariableScopeInstance) ((WorkflowProcessInstance)context.getProcessInstance()) .getContextInstance(VariableScope.VARIABLE_SCOPE); Map<String, Object> variables = variableScope.getVariables(); if (variables != null ) { for (Entry<String, Object> variable : variables.entrySet()) { engine.put(variable.getKey(), variable.getValue()); } } } engine.eval(expr); }
source = context.getVariable(sourceExpr); target = ((WorkItem) workItem).getParameter(targetExpr); } else { target = context.getVariable(targetExpr); source = ((WorkItem) workItem).getResult(sourceExpr); ((WorkItem) workItem).setParameter(targetExpr, target); } else { context.setVariable(targetExpr, target);
source = context.getVariable(sourceExpr); target = ((WorkItem) workItem).getParameter(targetExpr); } else { target = context.getVariable(targetExpr); source = ((WorkItem) workItem).getResult(sourceExpr); ((WorkItem) workItem).setParameter(targetExpr, target); } else { context.setVariable(targetExpr, target);
Globals globals = context.getKieRuntime().getGlobals(); if (context.getProcessInstance() != null && context.getProcessInstance().getProcess() != null) { VariableScopeInstance variableScope = (VariableScopeInstance) ((WorkflowProcessInstance)context.getProcessInstance()) .getContextInstance(VariableScope.VARIABLE_SCOPE);
public void execute(ProcessContext context) throws Exception { logger.info("Detected event for person {}", ((Person) context.getVariable("event")).getName()); myList.add("Executed action"); } });
if (unit.getOtherIdentifiers() != null) { for (int i = 0; i < length; i++ ) { vars[i] = context.getVariable( unit.getOtherIdentifiers()[i] ); InternalWorkingMemory internalWorkingMemory = (InternalWorkingMemory) context.getKieRuntime(); (GlobalResolver) context.getKieRuntime().getGlobals() ); KiePackage pkg = context.getKieRuntime().getKieBase().getKiePackage("MAIN"); if ( pkg instanceof KnowledgePackageImpl) { MVELDialectRuntimeData data = ( MVELDialectRuntimeData ) ((KnowledgePackageImpl) pkg).getDialectRuntimeRegistry().getDialectData( id );
Globals globals = context.getKieRuntime().getGlobals(); if (context.getProcessInstance() != null && context.getProcessInstance().getProcess() != null) { VariableScopeInstance variableScope = (VariableScopeInstance) ((WorkflowProcessInstance)context.getProcessInstance()) .getContextInstance(VariableScope.VARIABLE_SCOPE); DMNRuntime runtime = ((KieSession) context.getKieRuntime()).getKieRuntime(DMNRuntime.class); List<FEELProfile> profiles = (List)((DMNRuntimeImpl) runtime).getProfiles(); FEEL feel = FEEL.newInstance(runtime.getRootClassLoader(), profiles);
public void execute(ProcessContext context) throws Exception { WorkflowProcessInstance pi = context.getNodeInstance().getProcessInstance(); NodeInstance nodeInstance = findNodeByUniqueId(pi.getNodeInstances(), attachedToNodeId); if (nodeInstance != null) { ((org.jbpm.workflow.instance.NodeInstance)nodeInstance).cancel(); } }
public void execute(ProcessContext context) throws Exception { logger.info("Detected other event for person {}", ((Person) context.getVariable("event")).getName()); myList.add("Executed action"); } });
if (unit.getOtherIdentifiers() != null) { for (int i = 0; i < length; i++ ) { vars[i] = context.getVariable( unit.getOtherIdentifiers()[i] ); InternalWorkingMemory internalWorkingMemory = (InternalWorkingMemory) context.getKieRuntime(); (GlobalResolver) context.getKieRuntime().getGlobals() );
public void execute(ProcessContext context) throws Exception { ScriptEngineManager factory = new ScriptEngineManager(); ScriptEngine engine = factory.getEngineByName("JavaScript"); engine.put("kcontext", context); // insert globals into context Globals globals = context.getKieRuntime().getGlobals(); if (globals != null && globals.getGlobalKeys() != null) { for (String gKey : globals.getGlobalKeys()) { engine.put(gKey, globals.get(gKey)); } } if (context.getProcessInstance() != null && context.getProcessInstance().getProcess() != null) { // insert process variables VariableScopeInstance variableScope = (VariableScopeInstance) ((WorkflowProcessInstance)context.getProcessInstance()) .getContextInstance(VariableScope.VARIABLE_SCOPE); Map<String, Object> variables = variableScope.getVariables(); if (variables != null ) { for (Entry<String, Object> variable : variables.entrySet()) { engine.put(variable.getKey(), variable.getValue()); } } } engine.eval(expr); }
public void execute(ProcessContext context) throws Exception { logger.info("Detected event for person {}", ((Person) context.getVariable("event")).getName()); myList.add("Executed action"); } });
if (unit.getOtherIdentifiers() != null) { for (int i = 0; i < length; i++ ) { vars[i] = context.getVariable( unit.getOtherIdentifiers()[i] ); InternalWorkingMemory internalWorkingMemory = (InternalWorkingMemory) context.getKieRuntime(); (GlobalResolver) context.getKieRuntime().getGlobals() ); KiePackage pkg = context.getKieRuntime().getKieBase().getKiePackage("MAIN"); if ( pkg instanceof KnowledgePackageImpl) { MVELDialectRuntimeData data = ( MVELDialectRuntimeData ) ((KnowledgePackageImpl) pkg).getDialectRuntimeRegistry().getDialectData( id );
Globals globals = context.getKieRuntime().getGlobals(); if (context.getProcessInstance() != null && context.getProcessInstance().getProcess() != null) { VariableScopeInstance variableScope = (VariableScopeInstance) ((WorkflowProcessInstance)context.getProcessInstance()) .getContextInstance(VariableScope.VARIABLE_SCOPE);
public void execute(ProcessContext context) throws Exception { logger.info("Detected event for person {}", ((Person) context.getVariable("event")).getName()); myList.add("Executed action"); } });
Globals globals = context.getKieRuntime().getGlobals(); if (context.getProcessInstance() != null && context.getProcessInstance().getProcess() != null) { VariableScopeInstance variableScope = (VariableScopeInstance) ((WorkflowProcessInstance)context.getProcessInstance()) .getContextInstance(VariableScope.VARIABLE_SCOPE); DMNRuntime runtime = ((KieSession) context.getKieRuntime()).getKieRuntime(DMNRuntime.class); List<FEELProfile> profiles = (List)((DMNRuntimeImpl) runtime).getProfiles(); FEEL feel = FEEL.newInstance(runtime.getRootClassLoader(), profiles);
public void execute(ProcessContext context) throws Exception { logger.info("Detected event for person {}", ((Person) context.getVariable("event")).getName()); myList.add("Executed action"); } });