Examples of ContextInstance


Examples of org.jbpm.context.exe.ContextInstance

    ProcessInstance processInstance = new ProcessInstance(processDefinition);
    processInstance.signal();
    Token tokenA = processInstance.findToken("/a");
    Token tokenB = processInstance.findToken("/b");
   
    ContextInstance contextInstance = processInstance.getContextInstance();
    contextInstance.setVariable("r", "rrrrrr");
    contextInstance.createVariable("a", "aaaaaa", tokenA);
    contextInstance.createVariable("b", "bbbbbb", tokenB);
   
    processInstance = saveAndReload(processInstance);
   
    graphSession.deleteProcessInstance(processInstance);
   
View Full Code Here

Examples of org.jbpm.context.exe.ContextInstance

      "</process-definition>"
    );
    processDefinition.addDefinition(new ContextDefinition());
   
    ProcessInstance processInstance = new ProcessInstance(processDefinition);
    ContextInstance contextInstance = processInstance.getContextInstance();
    contextInstance.setVariable("number", new Float(5.5));
    contextInstance.setVariable("text", "one of the few");
    processInstance.signal();
   
    LoggingInstance loggingInstance = processInstance.getLoggingInstance();
    loggingInstance.logLogs();
  }
View Full Code Here

Examples of org.jbpm.context.exe.ContextInstance

public class ActionExpressionDbTest extends AbstractDbTestCase {
 
  public static class MyActionObject implements Serializable {
    private static final long serialVersionUID = 1L;
    public void gettingStarted() {
      ContextInstance contextInstance = ExecutionContext.currentExecutionContext().getContextInstance();
      contextInstance.setVariable("getting started", "done");
    }
View Full Code Here

Examples of org.jbpm.context.exe.ContextInstance

    public void gettingStarted() {
      ContextInstance contextInstance = ExecutionContext.currentExecutionContext().getContextInstance();
      contextInstance.setVariable("getting started", "done");
    }
    public void halfWayThere() {
      ContextInstance contextInstance = ExecutionContext.currentExecutionContext().getContextInstance();
      contextInstance.setVariable("half way there", "done");
    }
View Full Code Here

Examples of org.jbpm.context.exe.ContextInstance

    public void halfWayThere() {
      ContextInstance contextInstance = ExecutionContext.currentExecutionContext().getContextInstance();
      contextInstance.setVariable("half way there", "done");
    }
    public void concluding() {
      ContextInstance contextInstance = ExecutionContext.currentExecutionContext().getContextInstance();
      contextInstance.setVariable("concluding", "done");
    }
View Full Code Here

Examples of org.jbpm.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.jbpm.process.instance.ContextInstance

    public ContextInstance getContextInstance(final Context context) {
        ContextInstanceFactory conf = ContextInstanceFactoryRegistry.INSTANCE.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.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.jbpm.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.jbpm.process.instance.ContextInstance

    public ContextInstance getContextInstance(final Context context) {
        ContextInstanceFactory conf = ContextInstanceFactoryRegistry.INSTANCE.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
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.