Examples of InstanceImpl


Examples of fr.imag.adele.apam.impl.InstanceImpl

    auxListInstances("instances existing before the test-");

    Composite instanceComposite = (Composite) ct1.createInstance(null,new HashMap<String, String>());

    InstanceImpl mainInstance = (InstanceImpl) instanceComposite
        .getMainInst();

    Assert.assertTrue(String.format(message,
        "Although, the test failed to instantiate the composite"),
        instanceComposite != null && mainInstance != null);
   
    apam.waitForIt(Constants.CONST_WAIT_TIME);


    auxListInstances("instances existing after the test-");

    Set<Link> resolutionResult = mainInstance.getExistingLinks("deadMansSwitch");
   
    Assert.assertTrue( String.format(message,
        "Although, there exist no instance of dependence required(specification 'electronic-device'), which means that it was not injected correctly."),
        resolutionResult.size() == 1);
View Full Code Here

Examples of fr.imag.adele.apam.impl.InstanceImpl

    auxListInstances("instances existing before the test-");

    Composite instanceComposite = (Composite) ct1.createInstance(null,
        new HashMap<String, String>());

    InstanceImpl mainInstance = (InstanceImpl) instanceComposite
        .getMainInst();

    Assert.assertTrue(String.format(message,
        "Although, the test failed to instantiate the composite"),
        instanceComposite != null && mainInstance != null);

    apam.waitForIt(Constants.CONST_WAIT_TIME);

    auxListInstances("instances existing after the test-");

    Assert.assertTrue( String.format(message,
        "Although, there exist no instance of dependence required(specification 'electronic-device'), which means that it was not injected correctly."),
        mainInstance.getExistingLinks("deadMansSwitch").size() == 1);
  }
View Full Code Here

Examples of org.apache.agila.impl.InstanceImpl

            return process.getBusinessProcessID();
        }
    }

    public Instance newInstance(BusinessProcessID processID, Map params) {
        InstanceImpl answer = new InstanceImpl();
        answer.setBusinessProcessID(processID);
        answer.setInstanceVariables(params);
        getHibernateTemplate().save(answer);
        getHibernateTemplate().flush();
        return answer;
    }
View Full Code Here

Examples of org.apache.agila.impl.InstanceImpl

    public List listInstanceInfo() {
        List list = getHibernateTemplate().loadAll(InstanceImpl.class);
        List answer = new ArrayList(list.size());
        for (Iterator iter = list.iterator(); iter.hasNext();) {
            InstanceImpl instance = (InstanceImpl) iter.next();
            InstanceInfo info = new InstanceInfo(instance);
            answer.add(info);
        }
        return answer;
    }
View Full Code Here

Examples of org.apache.agila.impl.InstanceImpl

        int running = 0;
        int completed = 0;

        List instances = getHibernateTemplate().loadAll(InstanceImpl.class);
        for (Iterator iter = instances.iterator(); iter.hasNext();) {
            InstanceImpl instance = (InstanceImpl) iter.next();

            int status = instance.getStatus();

            switch (status) {
                case Instance.STATUS_STOPPED:
                    stopped++;
                    break;
View Full Code Here

Examples of org.apache.agila.impl.InstanceImpl

    }

    public Instance getInstanceByID( InstanceID instanceID ) {

        InstanceImpl retVal = null;

        Connection connection = null;

        try {
            String sql = "select * from bpm_instance" +
                " where instanceid = " + instanceID.getID();

            connection = getConnection();
            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(
                SerializeUtil.deserializeAppParam( result.getBytes( "params" ) ) );
            retVal.setStartDate( result.getDate( "startdate" ) );
            retVal.setLastStepDate( result.getDate( "stepdate" ) );
            retVal.setStatus( result.getInt( "status" ) );

            result.close();
            statement.close();
        } catch( SQLException e ) {
            throw new RuntimeException( e );
View Full Code Here

Examples of org.apache.agila.impl.InstanceImpl

     * @param processID
     * @param params
     * @return
     */
    protected Instance internalCreate(BusinessProcessID processID, Map params) {
        Instance ei = new InstanceImpl();

        ei.setBusinessProcessID(processID);
        ei.setInstanceID(new InstanceID(++counter));
        ei.setInstanceVariables(params);
        ei.setStatus( Instance.STATUS_RUNNING );

        hm.put(ei.getInstanceID(), ei);

        return ei;
    }
View Full Code Here

Examples of org.apache.agila.impl.InstanceImpl

        Iterator it = hm.values().iterator();

        while(it.hasNext()) {

            InstanceImpl impl = (InstanceImpl) it.next();

            data.add(new InstanceInfo(impl));
        }

        return data;
View Full Code Here

Examples of org.apache.agila.impl.InstanceImpl

        int completed = 0;

        Iterator it = hm.values().iterator();

        while(it.hasNext()) {
            InstanceImpl impl = (InstanceImpl) it.next();

            switch(impl.getStatus()){

                case Instance.STATUS_RUNNING :
                    running++;
                    break;
View Full Code Here

Examples of quickml.data.InstanceImpl

        for (String key : instance.getAttributes().keySet()) {
            if (attributeWhiteList.isEmpty() || attributeWhiteList.contains(key)) {
                attributes.put(key, instance.getAttributes().get(key));
            }
        }
        return new InstanceImpl(attributes, instance.getLabel(), instance.getWeight());
    }
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.