Examples of BusinessProcess


Examples of org.apache.agila.model.BusinessProcess

        Instance retVal = null;

        Connection connection = null;

        try {
            BusinessProcess businessProcess = getGraphByID( businessProcessID );

            String sql = "insert into bpm_instance" +
                " ( instanceid, processid, graphname, params, status )" +
                " values ( ?, ?, ?, ?, ? )";

            int instanceID = generateKey();

            connection = getConnection();

            PreparedStatement preparedStatement =
                connection.prepareStatement( sql );

            preparedStatement.setInt( 1, instanceID );
            preparedStatement.setInt( 2, businessProcessID.getID() );
            preparedStatement.setString( 3, businessProcess.getName() );
            preparedStatement.setBytes( 4, SerializeUtil.serializeAppParam( params ) );
            preparedStatement.setInt( 5, Instance.STATUS_RUNNING );
            preparedStatement.execute();
            preparedStatement.close();
View Full Code Here

Examples of org.apache.agila.model.BusinessProcess

    public InstanceID newInstance(BusinessProcessID processID, Map params) {

        Instance ei = internalCreate(processID, params);

        BusinessProcess graph = businessProcessService.getGraphByID(processID);

        if (graph == null) {
            logService.error("Unable to get process for ID = " + processID);
            return null;
        }

        ei.setGraphName(graph.getName());

        save(ei);

        return ei.getInstanceID();
    }
View Full Code Here

Examples of org.apache.agila.model.BusinessProcess

        /*
         * now make a token
         */

        BusinessProcess bp =  businessProcessService.getGraphByID(instance.getBusinessProcessID());

        InstanceID instanceID = instance.getInstanceID();
        Node root = bp.getRoot();
        NodeID nodeId = root.getNodeId();
        Token token = tokenService.newToken(instanceID, nodeId, Token.PRE);

        /*
         * and a message
View Full Code Here

Examples of org.apache.agila.model.BusinessProcess

        return( null );
    }

    private void populateNodeTrack(InstanceInfo info) {
        BusinessProcess businessProcess =
                businessProcessService.getGraphByID(info.getBusinessProcessID());

         List activeTokens = tokenService.getActiveTokensForInstance(info.getInstanceID());

         List nodes = new ArrayList();

         for( Iterator iterator = activeTokens.iterator(); iterator.hasNext(); ) {
             Token token = (Token) iterator.next();
             NodeID nodeID = token.getCurrentNodeID();
             String displayName = businessProcess.getNode(nodeID).getDisplayName();

             nodes.add( displayName );
         }

        info.setNodeTrack((String[]) nodes.toArray(new String[nodes.size()]));
View Full Code Here

Examples of org.apache.agila.model.BusinessProcess

        InstanceID instanceID = token.getInstanceID();
        Instance instance = instanceService.getInstanceByID(instanceID);

        BusinessProcessID bpid = businessProcessService.getGraphIDByName(instance.getGraphName());

        BusinessProcess bp = businessProcessService.getGraphByID(bpid);

        return bp.getNode(token.getCurrentNodeID());
    }
View Full Code Here

Examples of org.apache.agila.model.BusinessProcess

        this.graphService = graphService;
        this.queue = queue;
    }

    public void addBusinessProcess( Reader reader ) {
        BusinessProcess newGraph = XMLUtil.deserializeXML( reader );

        graphService.addGraph(newGraph.getGraphAsXML());
    }
View Full Code Here

Examples of org.apache.agila.model.BusinessProcess

        BusinessProcessID id = new BusinessProcessID(processID);
        InstanceID instanceID = eiSvc.newInstance(id, params);

        Instance instance = eiSvc.getInstanceByID(instanceID);

        BusinessProcess proc = graphService.getGraphByID(id);

        instance.setGraphName(proc.getName());
        eiSvc.save(instance);


        eiSvc.start(instanceID);
View Full Code Here

Examples of org.apache.agila.model.BusinessProcess

        return internalAddGraph(graph);
    }

    public BusinessProcessID addGraph( String graph ) {
        BusinessProcess businessProcess = XMLUtil.deserializeXML( new StringReader( graph ) );
       
        return( internalAddGraph( businessProcess ) );
    }
View Full Code Here

Examples of org.apache.agila.model.BusinessProcess

        if (l != null) {

            Iterator it = l.iterator();

            while(it.hasNext()) {
                BusinessProcess bp = (BusinessProcess) it.next();

                BusinessProcessInfo bpi = new BusinessProcessInfo(bp);

                data.add(bpi);
            }
View Full Code Here

Examples of org.camunda.bpm.engine.cdi.BusinessProcess

public class BusinessProcessContextTest extends CdiProcessEngineTestCase {

  @Test
  @Deployment
  public void testResolution() throws Exception {
    BusinessProcess businessProcess = getBeanInstance(BusinessProcess.class);

    businessProcess.startProcessByKey("testResolution").getId();

    assertNotNull(getBeanInstance(CreditCard.class));   
  }
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.