Examples of TaskRef


Examples of org.fireflow.model.TaskRef

     */
    protected void writeTaskRefs(List<TaskRef> taskRefs, Element parent) {
        Element taskRefsElement = Util4Serializer.addElement(parent, TASKREFS);
        Iterator<TaskRef>  iter = taskRefs.iterator();
        while (iter.hasNext()) {
            TaskRef taskRef = iter.next();
            Element taskRefElement = Util4Serializer.addElement(taskRefsElement, TASKREF);
            taskRefElement.addAttribute(REFERENCE, taskRef.getReferencedTask().getId());
        }
    }
View Full Code Here

Examples of org.fireflow.model.TaskRef

        while(iter.hasNext()){
            Element elm = iter.next();
            String taskId = elm.attributeValue(REFERENCE);
            Task task = (Task)workflowProcess.findWFElementById(taskId);
            if (task!=null){
                TaskRef taskRef = new TaskRef(parent,task);
                taskRef.setSn(UUID.randomUUID().toString());
                taskRefs.add(taskRef);
            }
        }
    }
View Full Code Here

Examples of org.fireflow.model.TaskRef

    protected void writeTaskRefs(List<TaskRef> taskRefs, Element parent,Document document) {
        Element taskRefsElement = Util4JAXPSerializer.addElement(document,parent, TASKREFS);
        Iterator<TaskRef> iter = taskRefs.iterator();
        while (iter.hasNext()) {
            TaskRef taskRef = iter.next();
            Element taskRefElement = Util4JAXPSerializer.addElement(document,taskRefsElement, TASKREF);
            taskRefElement.setAttribute(REFERENCE, taskRef.getReferencedTask().getId());
        }
    }
View Full Code Here

Examples of org.fireflow.model.TaskRef

     */
    public List<Task> getTasks() {
        List<Task> tasks = new ArrayList<Task>();
        tasks.addAll(this.inlineTasks);
        for (int i=0;i<this.taskRefs.size();i++){
            TaskRef taskRef = taskRefs.get(i);
            tasks.add(taskRef.getReferencedTask());
        }
        return tasks;
    }
View Full Code Here

Examples of org.fireflow.model.TaskRef

        while (iter.hasNext()) {
            Element elm = iter.next();
            String taskId = elm.getAttribute(REFERENCE);
            Task task = (Task) workflowProcess.findWFElementById(taskId);
            if (task != null) {
                TaskRef taskRef = new TaskRef(parent, task);
                taskRef.setSn(UUID.randomUUID().toString());
                taskRefs.add(taskRef);
            }
        }
    }
View Full Code Here

Examples of org.jboss.bpm.console.client.model.TaskRef

    result.setRootToken(token);
    return result;
  }
 
  public static TaskRef task(TaskSummary task) {
    return new TaskRef(
      task.getId(),
      Long.toString(task.getProcessInstanceId()),
      "",
      task.getName(),
      task.getActualOwner() == null ? null : task.getActualOwner().getId(),
View Full Code Here

Examples of org.jboss.bpm.console.client.model.TaskRef

    for (I18NText text: task.getNames()) {
      if ("en-UK".equals(text.getLanguage())) {
        name = text.getText();
      }
    }
    return new TaskRef(
      task.getId(),
      Long.toString(task.getTaskData().getProcessInstanceId()),
      "",
      name,
      task.getTaskData().getActualOwner() == null ? null : task.getTaskData().getActualOwner().getId(),
View Full Code Here

Examples of org.jboss.bpm.console.client.model.TaskRef

      listBox.addRowSelectionHandler(
          new RowSelectionHandler()
          {
            public void onRowSelection(RowSelectionEvent rowSelectionEvent)
            {
              TaskRef task = getSelection(); // first call always null?
              if(task!=null)
              {
                if (!task.isBlocking()) {
                  skipBtn.setEnabled(true);
                } else {
                  skipBtn.setEnabled(false);
                }
                controller.handleEvent(
                    new Event(UpdateDetailsAction.ID, new DetailViewEvent("OpenDetailView", task))
                );
              }
            }
          }
      );

      // toolbar
      final MosaicPanel toolBox = new MosaicPanel();
      toolBox.setPadding(0);
      toolBox.setWidgetSpacing(5);

      final ToolBar toolBar = new ToolBar();
      toolBar.add(
          new Button("Refresh", new ClickHandler() {
            public void onClick(ClickEvent clickEvent)
            {
              reload();


            }
          }
          )
      );

      toolBar.add(
          new Button("Claim", new ClickHandler() {
            public void onClick(ClickEvent clickEvent)
            {
              TaskRef selection = getSelection();

              if(selection!=null)
              {
                controller.handleEvent(
                    new Event(
                        ClaimTaskAction.ID,
                        new TaskIdentityEvent(appContext.getAuthentication().getUsername(), selection)
                    )
                );
              }
              else
              {
                MessageBox.alert("Missing selection", "Please select a task");
              }
            }
          }
          )
      );
     
      skipBtn = new Button("Skip", new ClickHandler() {
          public void onClick(ClickEvent clickEvent)
          {
            TaskRef selection = getSelection();

            if(selection!=null && !selection.isBlocking())
            {
              controller.handleEvent(
                        new Event(
                            SkipTaskAction.ID,
                            new TaskIdentityEvent(appContext.getAuthentication().getUsername(), selection)
View Full Code Here

Examples of org.jboss.bpm.console.client.model.TaskRef

      listBox.addRowSelectionHandler(
          new RowSelectionHandler()
          {
            public void onRowSelection(RowSelectionEvent rowSelectionEvent)
            {
              TaskRef task = getSelection(); // first call always null?
              if(task!=null)
              {
                if (!task.isBlocking()) {
                  skipBtn.setEnabled(true);
                } else {
                  skipBtn.setEnabled(false);
                }
                controller.handleEvent(
                    new Event(UpdateDetailsAction.ID, new DetailViewEvent("AssignedDetailView", task))
                );
              }

            }
          }
      );

      // toolbar
      final MosaicPanel toolBox = new MosaicPanel();
      toolBox.setPadding(0);
      toolBox.setWidgetSpacing(5);
      //toolBox.setLayout(new BoxLayout(BoxLayout.Orientation.VERTICAL));

      final ToolBar toolBar = new ToolBar();
      toolBar.add(
          new Button("Refresh", new ClickHandler() {
            public void onClick(ClickEvent clickEvent)
            {
              reload();

            }
          }
          )
      );


      Button viewBtn = new Button("View", new ClickHandler()
      {

        public void onClick(ClickEvent clickEvent)
        {
          TaskRef selection = getSelection();

          if (selection != null)
          {
            if (selection.getUrl() != null && !selection.getUrl().equals(""))
            {
              iframeWindow = new IFrameWindowPanel(
                  selection.getUrl(), "Task Form: "+selection.getName()
              );

              iframeWindow.setCallback(
                  new IFrameWindowCallback()
                  {
                    public void onWindowClosed()
                    {
                      reload();
                    }
                  }
              );

              iframeWindow.show();
            }
            else
            {
              MessageBox.alert("Invalid operation", "The task doesn't provide a UI");
            }
          }
          else
          {
            MessageBox.alert("Missing selection", "Please select a task");
          }
        }
      }
      );
      toolBar.add(viewBtn);

      toolBar.add(
          new Button("Release", new ClickHandler() {
            public void onClick(ClickEvent clickEvent)
            {
              TaskRef selection = getSelection();

              if(selection!=null)
              {
                TaskIdentityEvent payload = new TaskIdentityEvent(
                    null, selection
                );

                controller.handleEvent(
                    new Event(ReleaseTaskAction.ID, payload)
                );
              }
              else
              {
                MessageBox.alert("Missing selection", "Please select a task");
              }
            }
          }
          )
      );
     
      skipBtn = new Button("Skip", new ClickHandler() {
          public void onClick(ClickEvent clickEvent)
          {
            TaskRef selection = getSelection();

            if(selection!=null && !selection.isBlocking())
            {
              controller.handleEvent(
                  new Event(
                      SkipTaskAction.ID,
                      new TaskIdentityEvent(appContext.getAuthentication().getUsername(), selection)
View Full Code Here

Examples of org.jboss.bpm.console.client.model.TaskRef

  public final static String ID = UpdateDetailsAction.class.getName();
 
  public void execute(Controller controller, Object object)
  {
    DetailViewEvent event = (DetailViewEvent)object;
    TaskRef task = event.getTask()!=null? event.getTask() : null;
    TaskDetailView view = (TaskDetailView)controller.getView(event.getViewRef());

    if(task!=null)
      view.update(task);
    else
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.