Examples of ProcessDefinition


Examples of org.jbpm.pvm.ProcessDefinition

* @author Tom Baeyens
*/
public class _03_BasicGraphExecutionText extends TestCase {

  public void testBuildFirstProcessGraph() {
    ProcessDefinition processDefinition = ProcessFactory.build()
        .node("accept loan request").initial().behaviour(new WaitState())
          .transition().to("loan evaluation")
        .node("loan evaluation").behaviour(new WaitState())
          .transition("approve").to("wire the money")
          .transition("reject").to("end")
        .node("wire the money").behaviour(new Display("automatic payment"))
          .transition().to("end")
        .node("end").behaviour(new WaitState())
    .done();
   
    Execution execution = processDefinition.startExecution();
    assertEquals("accept loan request", execution.getNode().getName());
    execution.signal();
    assertEquals("loan evaluation", execution.getNode().getName());
    execution.signal("approve");
    assertEquals("end", execution.getNode().getName());
   
    execution = processDefinition.startExecution();
    assertEquals("accept loan request", execution.getNode().getName());
    execution.signal();
    assertEquals("loan evaluation", execution.getNode().getName());
    execution.signal("reject");
    assertEquals("end", execution.getNode().getName());
View Full Code Here

Examples of org.jbpm.pvm.ProcessDefinition

* @author Tom Baeyens
*/
public class _04_EventTest extends TestCase {

  public void testEventAction() {
    ProcessDefinition processDefinition = ProcessFactory.build()
        .node("a").initial().behaviour(new WaitState())
          .event("node-leave")
            .listener(new Display("leaving a"))
            .listener(new Display("second message while leaving a"))
          .transition().to("b")
            .listener(new Display("taking transition"))
        .node("b").behaviour(new WaitState())
          .event("node-enter")
            .listener(new Display("entering b"))
    .done();

    Execution execution = processDefinition.startExecution();
    execution.signal();
  }
View Full Code Here

Examples of org.jbpm.pvm.ProcessDefinition

   
    Environment environment = environmentFactory.openEnvironment();
    try {
      PvmDbSession pvmDbSession = environment.get(PvmDbSession.class);
     
      ProcessDefinition processDefinition = ProcessFactory.build("persited process")
      .done();
     
      pvmDbSession.save(processDefinition);
     
    } finally {
View Full Code Here

Examples of org.jbpm.pvm.ProcessDefinition

  }

  public Object execute(Environment environment) throws Exception {
    PvmDbSession pvmDbSession = environment.get(PvmDbSession.class);

    ProcessDefinition processDefinition = null;
   
    if (processDefinitionName!=null) {
      processDefinition = pvmDbSession.findProcessDefinition(processDefinitionName);
    } else {
      processDefinition = pvmDbSession.get(ProcessDefinitionImpl.class, processDefinitionDbid);
    }
   
    ExecutionImpl execution = (ExecutionImpl) processDefinition.startExecution(key, variables);
   
    pvmDbSession.save(execution);
    return execution;
  }
View Full Code Here

Examples of org.jbpm.services.api.model.ProcessDefinition

        } catch( Exception e) {
            // possibly because the deployment is being modified and not fully un/deployed.. (un/deploy*ing*)
            logger.debug( "Unable to retrieve process ids for deployment '{}': {}", deploymentId, e.getMessage(), e);
        }
        for( String processId : processIdList ) {
            ProcessDefinition processAssetDesc;
            try {
                processAssetDesc = runtimeDataService.getProcessesByDeploymentIdProcessId(deploymentId, processId);
                if( processAssetDesc == null ) {
                    logger.error( "No process definition information available for process definition '{}' in deployment '{}'!",
                            processId, deploymentId);
View Full Code Here

Examples of org.jbpm.ui.common.model.ProcessDefinition

    }
   
    @Override
    public final String showConfigurationDialog(Delegable delegable) {
        Map<String, String> variableNames = new HashMap<String, String>();
        ProcessDefinition definition = ((GraphElement) delegable).getProcessDefinition();
        for (Variable variable : definition.getVariablesList()) {
            variableNames.put(variable.getName(), variable.getFormat());
        }
        for (String swimlaneName : definition.getSwimlaneNames()) {
            variableNames.put(swimlaneName, "ru.runa.wf.web.forms.format.StringFormat");
        }
       
        ConfigurationWizardPage page = new ConfigurationWizardPage(
                variableNames,
View Full Code Here

Examples of org.nightlabs.jfire.jbpm.graph.def.ProcessDefinition

      pm.getExtent(RecurringOffer.class);
      pm.getExtent(RecurredOffer.class);

      // persist process definitions
      ProcessDefinitionID processDefinitionOfferVendorID = ProcessDefinitionID.create(Organisation.DEV_ORGANISATION_ID, RECURRING_OFFER_PROCESS_DEFINITION_NAME_VENDOR);
      ProcessDefinition processDefinitionOfferVendor;
      try {
        processDefinitionOfferVendor = (ProcessDefinition) pm.getObjectById(processDefinitionOfferVendorID);
      } catch (JDOObjectNotFoundException e) {
        processDefinitionOfferVendor = recurringTrader.storeProcessDefinitionRecurringOffer(TradeSide.vendor, ProcessDefinitionAssignment.class.getResource("recurring/offer/vendor/"));
        pm.makePersistent(new ProcessDefinitionAssignment(RecurringOffer.class, TradeSide.vendor, processDefinitionOfferVendor));
View Full Code Here

Examples of org.uengine.kernel.ProcessDefinition

    InputStream defIS = (InputStream)extendedContext.get("wsdl");
   
    TwisterProcess tp = (new TwisterBPELToolkit()).read(is, defIS);
    Adapter apt = new TwisterProcessAdapter();
    ProcessDefinition pd = (ProcessDefinition)apt.convert(tp, null);
       
    return pd;
  }
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.