Package org.enhydra.shark.api.client.wfmodel

Examples of org.enhydra.shark.api.client.wfmodel.WfAssignment


    /**
     * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
     */
    public int compare(Object obj1, Object obj2) {
        try {
            WfAssignment as1 = (WfAssignment) obj1;
            WfAssignment as2 = (WfAssignment) obj2;
            if (as1 == null && as2 != null) {
                return (order == ASCENDING_ORDER ? -1 : 1);
            }
            if (as2 == null && as1 != null) {
                return (order == ASCENDING_ORDER ? 1 : -1);
View Full Code Here


    /**
     * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
     */
    public int compare(Object obj1, Object obj2) {
        try {
            WfAssignment as1 = (WfAssignment) obj1;
            WfAssignment as2 = (WfAssignment) obj2;
            if (as1 == null && as2 != null) {
                return (order == ASCENDING_ORDER ? -1 : 1);
            }
            if (as2 == null && as1 != null) {
                return (order == ASCENDING_ORDER ? 1 : -1);
View Full Code Here

            WfAssignment[] wItems = sc.getResourceObject().get_sequence_work_item(0);
            if (wItems != null) {
                for (int i = 0; i < wItems.length; ++i) {
                    String tempProcessId = wItems[i].activity().container().manager().name().split("#")[2];
                    if (processId.equals(tempProcessId)) {
                        WfAssignment wfa = wItems[i];
                        boolean acceptedStatus = wfa.get_accepted_status();
                        boolean validItem = ((accepted == null) || (accepted.booleanValue() && acceptedStatus) || (!accepted.booleanValue() && !acceptedStatus));
                        if (validItem) {
                            WfActivity activity = wfa.activity();
                            processMap.put(activity.name(), activity.key());
                        }
                    }
                }
            }
View Full Code Here

        SharkConnection sc = null;

        try {
            sc = connect();

            WfAssignment wfa = getSharkAssignment(sc, activityId);
            if (wfa != null) {
                return true;
            }
        } catch (Exception ex) {
            LogUtil.error(getClass().getName(), ex, "");
View Full Code Here

        try {

            sc = connect();

            WfAssignment wfa = getSharkAssignment(sc, activityId);
            if (wfa != null) {
                WfActivity activity = wfa.activity();
                WfResource assignee = wfa.assignee();
                WfProcess process = activity.container();
                WfProcessMgr manager = process.manager();
                ass = new WorkflowAssignment();
                ass.setAccepted(wfa.get_accepted_status());
                ass.setActivityId(activity.key());
                ass.setActivityName(activity.name());
                ass.setAssigneeId(assignee.resource_key());
                ass.setAssigneeName(assignee.resource_name());
                ass.setDescription(activity.description());
View Full Code Here

            // execute
            WfAssignmentIterator ai = sc.get_iterator_assignment();
            ai.set_query_expression(aieb.toIteratorExpression(sessionHandle, filter));
            WfAssignment[] wItems = ai.get_next_n_sequence(0);
            for (int i = 0; i < wItems.length; ++i) {
                WfAssignment wfa = wItems[i];
                boolean acceptedStatus = wfa.get_accepted_status();
                WorkflowAssignment ass = new WorkflowAssignment();
                ass.setAccepted(acceptedStatus);
                WfActivity activity = wfa.activity();
                WfResource assignee = wfa.assignee();
                WfProcess process = activity.container();
                WfProcessMgr manager = process.manager();
                ass.setActivityId(activity.key());
                ass.setActivityName(activity.name());
                ass.setAssigneeId(assignee.resource_key());
View Full Code Here

            // execute
            WfAssignmentIterator ai = sc.get_iterator_assignment();
            ai.set_query_expression(aieb.toIteratorExpression(sessionHandle, filter));
            WfAssignment[] wItems = ai.get_next_n_sequence(0);
            for (int i = 0; i < wItems.length; ++i) {
                WfAssignment wfa = wItems[i];
                boolean acceptedStatus = wfa.get_accepted_status();
                WorkflowAssignment ass = new WorkflowAssignment();
                ass.setAccepted(acceptedStatus);
                WfActivity activity = wfa.activity();
                WfResource assignee = wfa.assignee();
                WfProcess process = activity.container();
                WfProcessMgr manager = process.manager();
                ass.setActivityId(activity.key());
                ass.setActivityName(activity.name());
                ass.setAssigneeId(assignee.resource_key());
View Full Code Here

            // execute
            WfAssignmentIterator ai = sc.get_iterator_assignment();
            ai.set_query_expression(aieb.toIteratorExpression(sessionHandle, filter));
            WfAssignment[] wItems = ai.get_next_n_sequence(0);
            for (int i = 0; i < wItems.length; ++i) {
                WfAssignment wfa = wItems[i];
                boolean acceptedStatus = wfa.get_accepted_status();
                WorkflowAssignment ass = new WorkflowAssignment();
                ass.setAccepted(acceptedStatus);
                WfActivity activity = wfa.activity();
                WfResource assignee = wfa.assignee();
                WfProcess process = activity.container();
                WfProcessMgr manager = process.manager();
                ass.setActivityId(activity.key());
                ass.setActivityName(activity.name());
                ass.setAssigneeId(assignee.resource_key());
View Full Code Here

        try {

            sc = connect();

            WfAssignment wfa = getSharkAssignment(sc, activityId);
            wfa.set_accepted_status(true);

        } catch (Exception ex) {
            LogUtil.error(getClass().getName(), ex, "");
        } finally {
            try {
View Full Code Here

        try {

            sc = connect();

            WfAssignment wfa = getSharkAssignment(sc, activityId);
            wfa.set_accepted_status(false);

        } catch (Exception ex) {
            LogUtil.error(getClass().getName(), ex, "");
        } finally {
            try {
View Full Code Here

TOP

Related Classes of org.enhydra.shark.api.client.wfmodel.WfAssignment

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.