Examples of WfResource


Examples of de.danet.an.workflow.omgcore.WfResource

                logger.debug ("Retrieving assignments list");
                assignedActivitiesList = new ArrayList ();
                if (selectedResourceKey != null) {
                    try {
                        WorkflowService wfs = wsc.getWorkflowService();
                        WfResource resource
                            = wfs.resourceByKey(selectedResourceKey);
                        Collection assignments = resource.workItems();
                        for (Iterator i = assignments.iterator(); i.hasNext ();) {
                            WfAssignment assignment = (WfAssignment)i.next();
                            assignedActivitiesList.add
                                (new ActivityWrapper
                                 (wfs, (Activity)assignment.activity()));
View Full Code Here

Examples of de.danet.an.workflow.omgcore.WfResource

        } else if (type.isHuman()) {
            String crit = (String)participant.getResourceSelection();
            if (crit != null && crit.startsWith ("!:currentUser")
                && principal != null) {
                try {
                    WfResource res = asResource (principal);
                    assigned.add (res);
                    addAssignment (finderId(finder), actId, res);
                    return assigned;
                } catch (AlreadyAssignedException rnf) {
                    return assigned;
                } catch (InvalidKeyException rnf) {
                    return assigned;
                }
            }
            resSel = "M:" + participant.getName();
        }

        // fall through
        try {
            Collection reses = rms.selectResources (resSel);
            if (reses.size() == 0) {
                return assigned;
            }
            long finderId = finderId (finder);
            for (Iterator i = reses.iterator(); i.hasNext();) {
                WfResource res = (WfResource)i.next();
                assigned.add (res);
                addAssignment (finderId, actId, res);
            }
            return assigned;
        } catch (AlreadyAssignedException rnf) {
View Full Code Here

Examples of de.danet.an.workflow.omgcore.WfResource

     * activity whose container is the created test process.
     */
    private boolean assignmentExists(String key, String name)
  throws Exception {
  boolean found = false;
  WfResource resource = ras.resourceByKey(key);
  Collection assignedActivities = ras.workItems(resource);
  for (Iterator i = assignedActivities.iterator(); i.hasNext();) {
      WfAssignment assignment = (WfAssignment)i.next();
      WfActivity act = assignment.activity();
      if (testProc.key().equals(act.container().key())) {
View Full Code Here

Examples of de.danet.an.workflow.omgcore.WfResource

    /**
     * Change an assignment
     */
    public void changeAssignment () throws Exception {
  // find predefined resource "Test, JUnit" and "Lipp, Michael"
  WfResource resOP = null;
  WfResource resMLipp = null;
  Collection resList = workflowService().knownResources();
  for (Iterator i = resList.iterator(); i.hasNext();) {
      WfResource resource = (WfResource)i.next();
      if (resource.resourceName().equals ("ML")) {
    resMLipp = resource;
      }
      if (resource.resourceName().equals ("Order Processing")) {
    resOP = resource;
      }
  }
  assertTrue (resOP != null);
  assertTrue (resMLipp != null);
View Full Code Here

Examples of de.danet.an.workflow.omgcore.WfResource

     */
    public DataModel getDirectAssignments () throws RemoteException {
        if (directAssignmentsCache == null) {
            try {
                Principal principalMe = wsc.getWorkflowService().caller();
                WfResource resourceMe
                    = wsc.getWorkflowService().asResource(principalMe);
                ProcessDirectory pd
                    = wsc.getWorkflowService().processDirectory();
                List assignments = new ArrayList ();
                assignments.addAll (assignmentDataFromInfos(pd, resourceMe));
View Full Code Here

Examples of de.danet.an.workflow.omgcore.WfResource

     */
    public DataModel getIndirectAssignments () throws RemoteException {
        if (indirectAssignmentsCache == null) {
            try {
                Principal principalMe = wsc.getWorkflowService().caller();
                WfResource resourceMe
                    = wsc.getWorkflowService().asResource(principalMe);
                ProcessDirectory pd
                    = wsc.getWorkflowService().processDirectory();
                List assignments = new ArrayList ();
                Collection auths
                    = wsc.getWorkflowService().authorizers(resourceMe);
                for (Iterator i = auths.iterator(); i.hasNext();) {
                    WfResource res = (WfResource)i.next();
                    assignments.addAll (assignmentDataFromInfos(pd, res));
                }
                if (indirectAssignmentsSorter != null) {
                    indirectAssignmentsSorter.sort(assignments);
                }
View Full Code Here

Examples of de.danet.an.workflow.omgcore.WfResource

      // Save info for optimization in releaseResources.
      setPaNoAssignments (!i.hasNext ());
      if (getPaAuditEventSelection()
    == ProcessDefinition.AUDIT_SELECTION_ALL_EVENTS) {
    while (i.hasNext ()) {
        WfResource resource = (WfResource)i.next();
        fireAuditEvent
                        (new DefaultAssignmentAuditEvent
                         (auditEventBase
        (WfAuditEvent.ACTIVITY_ASSIGNMENT_CHANGED),
        null, ras.retrieveKey(resource),
View Full Code Here

Examples of de.danet.an.workflow.omgcore.WfResource

      return;
  }
  for (Iterator i = assignments().iterator(); i.hasNext ();) {
      WfAssignment assignment = (WfAssignment)i.next ();
            try {
                WfResource resource = ras.retrieveAssignee(assignment);
                ras.removeAssignment
                    (activityFinder(), getPaKey(), toActivity(), resource);
                if (getPaAuditEventSelection()
                    == ProcessDefinition.AUDIT_SELECTION_ALL_EVENTS) {
                    fireAuditEvent
View Full Code Here

Examples of de.danet.an.workflow.omgcore.WfResource

        ResultSet rs = null;
        try {
            ps = con.prepareStatement(props.getProperty(queryKey));
            rs = ps.executeQuery();
            while (rs.next()) {
                WfResource resource = null;
                if (queryKey.equals("allUsersQuery")) {
                    resource = new DefaultUserResource
                        (rasCtx, rs.getString(1), rs.getString(2));
                } else if (queryKey.equals("allGroupsQuery")) {
                    resource = new DefaultGroupResource
View Full Code Here

Examples of de.danet.an.workflow.omgcore.WfResource

            maybeAddTextNode(description, val);
            Collection assignments = activity.assignments();
            Iterator assignmentIterator = assignments.iterator();
            while (assignmentIterator.hasNext()) {
                Assignment assignment = (Assignment) iterator.next();
                WfResource resource = assignment.assignee();
                SOAPElement assignee = activityNode.addChildElement("Assignee",
                        Consts.WFXML_PREFIX);
                val = resource.resourceName();
                if (val == null) {
                    assignee.addTextNode(resource.resourceKey());
                } else {
                    assignee.addTextNode(val);
                }
            }
        }
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.