Package org.uengine.kernel.viewer

Examples of org.uengine.kernel.viewer.ActivityViewer


    log("viewProcessDefinitionFlowChart", new Object[]{processDefinition, options});
    try{
      ProcessDefinition definition = getDefinition(processDefinition);
      ProcessInstance instance = new DefaultProcessInstance();
      instance.setProcessTransactionContext(getTransactionContext());
      ActivityViewer processDefinitionViewer = DefaultActivityViewer.createViewer(definition);
      return processDefinitionViewer.render(definition, instance, options).toString();
      //return ProcessDefinitionViewer.getInstance().render(getDefinition(processDefinition), null, options).toString();
    }catch(Exception e){
      e.printStackTrace();
      throw new RemoteException("ProcessManagerError:"+e.getMessage(), e);
    }
View Full Code Here


     
      //for performance and synchronized view - we don't need to create snapshot by the implementation of caching logic.
      ProcessInstance shotCopy = instance;//instance.createSnapshot();
      instance.setProcessDefinition(definition);
      //
      ActivityViewer processDefinitionViewer = DefaultActivityViewer.createViewer(definition);
      return processDefinitionViewer.render(definition, shotCopy, options).toString();
     
      //return ProcessDefinitionViewer.getInstance().render(definition, shotCopy, options).toString();
    }catch(Exception e){
      e.printStackTrace();
      throw new RemoteException("ProcessManagerError:"+e.getMessage(), e);
View Full Code Here

      //ProcessDefinition definition = (ProcessDefinition) GlobalContext.deserialize(definitionXml, null);
   
      //      ProcessInstance instance = new DefaultProcessInstance();
      //instance.setProcessTransactionContext(getTransactionContext());
      ActivityViewer processDefinitionViewer = DefaultActivityViewer.createViewer(definition);
      return processDefinitionViewer.render(definition, null, options).toString();
      //return ProcessDefinitionViewer.getInstance().render(getDefinition(processDefinition), null, options).toString();
    //}catch(Exception e){
//      ByteArrayOutputStream bao = new ByteArrayOutputStream();
//      return "반영되고있니???:"+e.getMessage();
//    }
View Full Code Here

   
    for(Enumeration enumeration = cActivity.getChildActivities().elements(); enumeration.hasMoreElements(); ){
      sb.append("<td><img src=images/arrow.gif></td><td>");
      Activity child = (Activity)enumeration.nextElement();
     
      ActivityViewer viewer = DefaultActivityViewer.createViewer(child);
      StringBuilder childHTML = viewer.render(child, instance, options);
     
      sb.append(childHTML);
      sb.append("</td>");
    }
   
View Full Code Here

 
  public static ActivityViewer createViewer(Activity act){
    Class activityCls = act.getClass();
    //String clsName = UEngineUtil.getComponentClassName(activityCls, "viewer");
   
    ActivityViewer viewer = null;
   
    if(viewerPool.containsKey(activityCls))
      return (ActivityViewer)viewerPool.get(activityCls);
   
/*    try{   
 
View Full Code Here

  }
 
  private StringBuffer getActivityContent(GraphActivity graphAct, ProcessInstance instance, Map options, boolean isVirtical) {
    StringBuffer sb = new StringBuffer();

    ActivityViewer sav = null;
    Activity act = graphAct.getReferenceActivity();
    String divId = getActivityWebId(graphAct, instance, options);
   

    if (act instanceof SubProcessActivity) {
      sav = DefaultActivityViewer.createViewer(act);
    } else {
      sav = new DefaultActivityViewer();
    }
   
    sb.append("<table id='" + divId + "' cellspacing='0' cellpadding='0'><tr>");
    if (isVirtical) {
      sb.append("<td align='center'>");
    } else {
      sb.append("<td>");
    }
   
    if (graphAct.isStartGraphActivity()) {
      sb.append("<img src='"+imageRootPath+"images/start.gif'>");
    } else if (graphAct.isEndGraphActivity()) {
      sb.append("<img src='"+imageRootPath+"images/end.gif'>");
    } else {
      Vector<GraphActivity> incommings = graphAct.getPrevious();
     
      if (incommings.get(0).getReferenceActivity() instanceof SwitchActivity) {
        SwitchActivity switchActivity = (SwitchActivity) incommings.get(0).getReferenceActivity();
        Vector<Activity> children = switchActivity.getChildActivities();
       
        appendSwitchActivityDescription(act, switchActivity, children, sb);
      }
     
      sb.append(sav.render(act,instance, (act instanceof ComplexActivity ? noDecoratedOption : options)));
    }

    sb.append("</td></tr></table>");
    return sb;
  }
View Full Code Here

TOP

Related Classes of org.uengine.kernel.viewer.ActivityViewer

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.