Examples of ContextInstance


Examples of org.drools.process.instance.ContextInstance

    public WorkflowReuseContextInstanceFactory(Class<? extends ContextInstance> cls){
        this.cls = cls;
    }

  public ContextInstance getContextInstance(Context context, ContextInstanceContainer contextInstanceContainer, ProcessInstance processInstance) {     
        ContextInstance result = contextInstanceContainer.getContextInstance( context.getType(), context.getId() );
        if (result != null) {
            return result;
        }
        try {
            AbstractContextInstance contextInstance = (AbstractContextInstance) cls.newInstance();
View Full Code Here

Examples of org.drools.process.instance.ContextInstance

    public void setContextInstance(String contextId, ContextInstance contextInstance) {
        this.contextInstances.put(contextId, contextInstance);
    }
   
    public ContextInstance getContextInstance(String contextId) {
        ContextInstance contextInstance = this.contextInstances.get(contextId);
        if (contextInstance != null) {
            return contextInstance;
        }
        Context context = getCompositeContextNode().getDefaultContext(contextId);
        if (context != null) {
View Full Code Here

Examples of org.drools.process.instance.ContextInstance

                .getConfiguration().getProcessContextInstanceFactoryRegistry();
        ContextInstanceFactory conf = contextRegistry.getContextInstanceFactory(context);
        if (conf == null) {
            throw new IllegalArgumentException("Illegal context type (registry not found): " + context.getClass());
        }
        ContextInstance contextInstance = (ContextInstance) conf.getContextInstance(context, this, (ProcessInstance) getProcessInstance());
        if (contextInstance == null) {
            throw new IllegalArgumentException("Illegal context type (instance not found): " + context.getClass());
        }
        return contextInstance;
    }
View Full Code Here

Examples of org.drools.process.instance.ContextInstance

    public ReuseContextInstanceFactory(Class<? extends ContextInstance> cls){
        this.cls = cls;
    }

  public ContextInstance getContextInstance(Context context, ContextInstanceContainer contextInstanceContainer, ProcessInstance processInstance) {     
        ContextInstance result = contextInstanceContainer.getContextInstance( context.getType(), context.getId() );
        if (result != null) {
            return result;
        }
        try {
            AbstractContextInstance contextInstance = (AbstractContextInstance) cls.newInstance();
View Full Code Here

Examples of org.drools.process.instance.ContextInstance

    public void setContextInstance(String contextId, ContextInstance contextInstance) {
        this.contextInstances.put(contextId, contextInstance);
    }
   
    public ContextInstance getContextInstance(String contextId) {
        ContextInstance contextInstance = this.contextInstances.get(contextId);
        if (contextInstance != null) {
            return contextInstance;
        }
        Context context = ((ContextContainer)getProcess()).getDefaultContext(contextId);
        if (context != null) {
View Full Code Here

Examples of org.drools.process.instance.ContextInstance

                .getConfiguration().getProcessContextInstanceFactoryRegistry();
        ContextInstanceFactory conf = contextRegistry.getContextInstanceFactory(context);
        if (conf == null) {
            throw new IllegalArgumentException("Illegal context type (registry not found): " + context.getClass());
        }
        ContextInstance contextInstance = (ContextInstance) conf.getContextInstance(context, this, this);
        if (contextInstance == null) {
            throw new IllegalArgumentException("Illegal context type (instance not found): " + context.getClass());
        }
        return contextInstance;
    }
View Full Code Here

Examples of org.drools.process.instance.ContextInstance

    public void setContextInstance(String contextId, ContextInstance contextInstance) {
        this.contextInstances.put(contextId, contextInstance);
    }
   
    public ContextInstance getContextInstance(String contextId) {
        ContextInstance contextInstance = this.contextInstances.get(contextId);
        if (contextInstance != null) {
            return contextInstance;
        }
        Context context = ((ContextContainer)getProcess()).getDefaultContext(contextId);
        if (context != null) {
View Full Code Here

Examples of org.drools.process.instance.ContextInstance

                .getConfiguration().getProcessContextInstanceFactoryRegistry();
        ContextInstanceFactory conf = contextRegistry.getContextInstanceFactory(context);
        if (conf == null) {
            throw new IllegalArgumentException("Illegal context type (registry not found): " + context.getClass());
        }
        ContextInstance contextInstance = (ContextInstance) conf.getContextInstance(context, this, this);
        if (contextInstance == null) {
            throw new IllegalArgumentException("Illegal context type (instance not found): " + context.getClass());
        }
        return contextInstance;
    }
View Full Code Here

Examples of org.jbpm.context.exe.ContextInstance

    this.engine = engine;
    this.id = id;
    log().t("instance",id,workflow.getName(),variables);
    processInstance = new ProcessInstance(workflow.getProcessDefinition());
       
    ContextInstance contextInstance = processInstance.getContextInstance();
    if (variables != null) contextInstance.setVariables(variables);
    contextInstance.setProcessInstance(processInstance);
//    contextInstance.setVariable(JBpmContext.VAR_ENGINE, engine.getBpm());
    contextInstance.setVariable(JBpmContext.VAR_INSTANCE_ID,id);
   
    myContext = new JBpmContext(getBpm(),contextInstance);
  }
View Full Code Here

Examples of org.jbpm.context.exe.ContextInstance

      Token root = processInstance.getRootToken();
      if (!action.equals(root.getNode().getName()))
        throw new BpmException(this,"action is not current " + action);
    }
   
    ContextInstance contextInstance = processInstance.getContextInstance();
    if (parameters != null) contextInstance.setVariables(parameters);
    if (name == null) processInstance.signal(); else processInstance.signal(name);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.