Package org.apache.agila.engine

Examples of org.apache.agila.engine.InstanceID


     * @param response
     * @throws ServletException
     * @throws IOException
     */
    public void resume_instance( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException {
        InstanceID instanceID = new InstanceID( Integer.parseInt( request.getParameter( "instanceid" ) ) );
        engine.resume( instanceID );

        List l = eiSvc.listInstanceInfo();

        request.setAttribute( "list", l );
View Full Code Here


            preparedStatement.setInt( 5, Instance.STATUS_RUNNING );
            preparedStatement.execute();
            preparedStatement.close();

            // Retrieve the created instance
            retVal = getInstanceByID( new InstanceID( instanceID ) );
        }
        catch( SQLException e ) {
            throw new RuntimeException( e );
        }
        finally {
View Full Code Here

            Statement statement = connection.createStatement();
            ResultSet result = statement.executeQuery( sql );
            result.next();

            retVal = new InstanceImpl();
            retVal.setInstanceID( new InstanceID(
                result.getInt( "instanceid" ) ) );
            retVal.setBusinessProcessID( new BusinessProcessID(
                result.getInt( "processid" ) ) );
            retVal.setGraphName( result.getString( "graphname" ) );
            retVal.setInstanceVariables(
View Full Code Here

            retVal = new ArrayList();

            while( result.next() ) {
                Instance instance = getInstanceByID(
                    new InstanceID( result.getInt( "instanceid" ) ) );

                InstanceInfo ii = new InstanceInfo(instance);

                retVal.add(ii);
            }
View Full Code Here

            retVal.setTaskDescription( result.getString( "description" ) );
            retVal.setTaskExpirationDate( result.getDate( "expiration" ) );
            retVal.setSourceTokenID( new TokenID(
                result.getInt( "tokenid" ) ) );
            retVal.setTaskStatus( result.getInt( "status" ) );
            retVal.setInstanceID( new InstanceID(
                result.getInt( "instanceid" ) ) );

        } catch( SQLException e ) {
            throw new RuntimeException( e );
        }
View Full Code Here

            ResultSet result = statement.executeQuery( sql );
            result.next();

            retVal = new TokenImpl();
            retVal.setTokenID( new TokenID( result.getInt( "tokenid" ) ) );
            retVal.setInstanceID( new InstanceID(
                result.getInt( "instanceid" ) ) );
            retVal.setCurrentNodeID(new NodeID(result.getInt("nodeid")));
            retVal.setCurrentState( result.getInt( "state" ) );
            retVal.setActive( result.getBoolean( "active" ) );
View Full Code Here

            this.processKey = new Integer(id.getID());
        }
    }

    public InstanceID getInstanceID() {
        return instanceKey != null ? new InstanceID(instanceKey.intValue()) : null;
    }
View Full Code Here

            this.tokenKey = new Integer(tokenID.getID());
        }
    }

    public InstanceID getInstanceID() {
        return instanceKey != null ? new InstanceID(instanceKey.intValue()) : null;
    }
View Full Code Here

         * 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);

        /*
 
View Full Code Here

        renderTemplate(req, res, ctx, "instancelist.vm");
    }

    public void start_process_instance(HttpServletRequest req, HttpServletResponse res, VelocityContext ctx) throws ServletException, IOException {

        InstanceID id = engine.startNewInstance(1, new HashMap());

        ctx.put("iid", id);

        renderTemplate(req, res, ctx, "startedprocess.vm");
    }
View Full Code Here

TOP

Related Classes of org.apache.agila.engine.InstanceID

Copyright © 2018 www.massapicom. 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.