Package org.jboss.bpm.console.client.model

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


   
    List<HistoryProcessInstanceRef> refs = new ArrayList<HistoryProcessInstanceRef>();

    for (String theInstanceID : historyInstanceIds) {
      List<Event> theEvents = ds.getPastActivities(theInstanceID);
      HistoryProcessInstanceRef ref = new HistoryProcessInstanceRef();
      for (Event e : theEvents) {
        ref.setProcessInstanceId(e.getProcessInstanceID());
        ref.setState(status);
        ref.setProcessDefinitionId(e.getProcessDefinitionID());
        for (Tuple tuple : e.getDataElement()) {
          if ("correlation-key".equals(tuple.getName())) {
            ref.setKey(tuple.getValue());
          }
          if ("process-start-time".equals(tuple.getName())) {
            ref.setStartTime(new Date(new Long(tuple.getValue())));
          }
          if ("process-end-time".equals(tuple.getName())) {
            ref.setEndTime(new Date(new Long(tuple.getValue())));
          }
        }
      }
       refs.add(ref);
    }
View Full Code Here


    }
  }

  public HistoryProcessInstanceRef getSelection()
  {
    HistoryProcessInstanceRef selection = null;
    if(listBoxHistory.getSelectedIndex()!=-1)
      selection = listBoxHistory.getItem( listBoxHistory.getSelectedIndex());
    return selection;
  }
View Full Code Here

    listBoxHistory.addRowSelectionHandler(new RowSelectionHandler() {

      public void onRowSelection(RowSelectionEvent rowSelectionEvent) {
        int index = listBoxHistory.getSelectedIndex();
        if (index != -1) {
          HistoryProcessInstanceRef item = listBoxHistory.getItem(index);

          // update details
          controller.handleEvent(new Event(UpdateHistoryInstanceAction.ID,  item.getProcessInstanceId()));

          diagramBtn.setEnabled(true);
        }
      }
    });
View Full Code Here

      @Override
      public void onDoubleClick(DoubleClickEvent event) {
        int index = listbox.getSelectedIndex();
        if (index != -1) {
          HistoryProcessInstanceRef historyInstance = listbox.getItem(index);
                    selectedProcessInstanceId = historyInstance.getProcessInstanceId();
                    createHistoryInstanceDetailWindow();
                    //controller.handleEvent(new Event(LoadProcessInstanceEventsAction.ID, selectedProcessInstanceId));
        }
      }
     
View Full Code Here

TOP

Related Classes of org.jboss.bpm.console.client.model.HistoryProcessInstanceRef

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.