Examples of TInstanceInfo


Examples of org.apache.ode.bpel.pmapi.TInstanceInfo

    private InstanceInfoDocument genInstanceInfoDocument(final Long iid) {
        if (iid == null)
            throw new InvalidRequestException("Must specifiy instance id.");

        InstanceInfoDocument ret = InstanceInfoDocument.Factory.newInstance();
        final TInstanceInfo ii = ret.addNewInstanceInfo();

        ii.setIid(iid.toString());
        dbexec(new BpelDatabase.Callable<Object>() {
            public Object run(BpelDAOConnection conn) throws Exception {
                ProcessInstanceDAO instance = conn.getInstance(iid);

                if (instance == null)
View Full Code Here

Examples of org.apache.ode.bpel.pmapi.TInstanceInfo

    private InstanceInfoDocument genInstanceInfoDocument(final Long iid) {
        if (iid == null)
            throw new InvalidRequestException("Must specifiy instance id.");

        InstanceInfoDocument ret = InstanceInfoDocument.Factory.newInstance();
        final TInstanceInfo ii = ret.addNewInstanceInfo();

        ii.setIid(iid.toString());
        dbexec(new BpelDatabase.Callable<Object>() {
            public Object run(BpelDAOConnection conn) throws Exception {
                ProcessInstanceDAO instance = conn.getInstance(iid);

                if (instance == null)
View Full Code Here

Examples of org.apache.ode.bpel.pmapi.TInstanceInfo

    private InstanceInfoDocument genInstanceInfoDocument(final Long iid) {
        if (iid == null)
            throw new InvalidRequestException("Must specifiy instance id.");

        InstanceInfoDocument ret = InstanceInfoDocument.Factory.newInstance();
        final TInstanceInfo ii = ret.addNewInstanceInfo();

        ii.setIid(iid.toString());
        dbexec(new BpelDatabase.Callable<Object>() {
            public Object run(BpelDAOConnection conn) throws Exception {
                ProcessInstanceDAO instance = conn.getInstance(iid);

                if (instance == null)
View Full Code Here

Examples of org.apache.ode.bpel.pmapi.TInstanceInfo

            _db.exec(new BpelDatabase.Callable<Object>() {
                public Object run(BpelDAOConnection conn) {
                    Collection<ProcessInstanceDAO> instances = conn.instanceQuery(instanceFilter);
                    Map<Long, Collection<CorrelationSetDAO>> icsets = conn.getCorrelationSets(instances);
                    for (ProcessInstanceDAO instance : instances) {
                        TInstanceInfo info = infolist.addNewInstanceInfo();
                        fillInstanceSummary(info, instance);
                        Collection<CorrelationSetDAO> csets = icsets.get(instance.getInstanceId());
                        if (csets != null) {
                            for (CorrelationSetDAO cset: csets) {
                                Map<QName, String> props = cset.getProperties();
View Full Code Here

Examples of org.apache.ode.bpel.pmapi.TInstanceInfo

    private InstanceInfoDocument genInstanceInfoDocument(BpelDAOConnection conn,  Long iid) {
        if (iid == null)
            throw new InvalidRequestException("Must specifiy instance id.");

        InstanceInfoDocument ret = InstanceInfoDocument.Factory.newInstance();
        TInstanceInfo ii = ret.addNewInstanceInfo();

        ii.setIid(iid.toString());
        ProcessInstanceDAO instance = conn.getInstance(iid);
        if (instance == null)
            throw new InstanceNotFoundException("InstanceNotFoundException " + iid);
        // TODO: deal with "ERROR" state information.
        fillInstanceInfo(ii, instance);
View Full Code Here

Examples of org.apache.ode.bpel.pmapi.TInstanceInfo

     * @throws Exception
     */
    protected TInstanceInfo lastInstance(TInstanceStatus.Enum expected) throws Exception {
        int counter = 0;
        do {
            TInstanceInfo info = getInstanceInfo();
            if (info != null  && (expected == null || info.getStatus() == expected)) {
                return info;
            }
            if (counter * DELAY > MAX_WAIT) {
                throw new Exception("Timed out wait for instance to reach "+expected+
                        " status. Actual status: "+(info==null?"missing instance" : info.getStatus()));
            }
            counter++;
            Thread.sleep(DELAY);
        } while (true);
    }
View Full Code Here

Examples of org.apache.ode.bpel.pmapi.TInstanceInfo

     */
    protected void assertRecovery(int invoked, String[] actions) throws Exception {
        // Process is still active, none of the completed states.
        assertNotNull(lastInstance(TInstanceStatus.ACTIVE));
        // Tests here will only generate one failure.
        TInstanceInfo instance = lastInstance(null);
        int count = 30;
        int sleep = 0;
        while (true) {
            count--;
            if (count <= 0) throw new AssertionError("No failures info, which are required");
            Thread.sleep(sleep);
            sleep = 1000;
            TFailuresInfo failures = instance.getFailures();
            if (!(failures != null && failures.getCount() == 1)) continue;
            ProcessInfoDocument m = _management.getProcessInfo(_processId);
            if (!m.getProcessInfo().isSetInstanceSummary()) continue;
            failures = m.getProcessInfo().getInstanceSummary().getFailures();
            if (!(failures != null && failures.getCount() == 1)) continue;
View Full Code Here

Examples of org.apache.ode.bpel.pmapi.TInstanceInfo

    /**
     * Blocks for until there are recoveries available or throws an exception
     * if MAX_WAIT exceeded
     */
    private ArrayList<TActivityInfo> getRecoveries() throws Exception {
        TInstanceInfo instance = null;
        int counter = 0;
        do {
            instance = getInstanceInfo();
            if (instance != null) {
                ArrayList<TActivityInfo> recoveries = getRecoveriesInScope(instance, null, null);
View Full Code Here

Examples of org.apache.ode.bpel.pmapi.TInstanceInfo

    private InstanceInfoDocument genInstanceInfoDocument(final Long iid) {
        if (iid == null)
            throw new InvalidRequestException("Must specifiy instance id.");

        InstanceInfoDocument ret = InstanceInfoDocument.Factory.newInstance();
        final TInstanceInfo ii = ret.addNewInstanceInfo();

        ii.setIid(iid.toString());
        dbexec(new BpelDatabase.Callable<Object>() {
            public Object run(BpelDAOConnection conn) throws Exception {
                ProcessInstanceDAO instance = conn.getInstance(iid);

                if (instance == null)
View Full Code Here

Examples of org.apache.ode.bpel.pmapi.TInstanceInfo

    private InstanceInfoDocument genInstanceInfoDocument(final Long iid) {
        if (iid == null)
            throw new InvalidRequestException("Must specifiy instance id.");

        InstanceInfoDocument ret = InstanceInfoDocument.Factory.newInstance();
        final TInstanceInfo ii = ret.addNewInstanceInfo();

        ii.setIid(iid.toString());
        dbexec(new BpelDatabase.Callable<Object>() {
            public Object run(BpelDAOConnection conn) throws Exception {
                ProcessInstanceDAO instance = conn.getInstance(iid);

                if (instance == null)
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.