Package org.huihoo.workflow.xpdl

Examples of org.huihoo.workflow.xpdl.WorkflowPackage


public class XPDLParserFile
{
  public static WorkflowPackage parseReader(DefaultXPDLParser parser, Reader inputReader)
    throws XPDLParserException, IOException
  {
    WorkflowPackage result = null;
    Digester digester = null;
    try
    {
      digester = createXPDLDigester();
      digester.parse(inputReader);
View Full Code Here


public class XPDLParserJDBC
{
  public static  WorkflowPackage parseJDBC(XPDLParser parser,Store store,String packageID)
  throws XPDLParserException
  {
    WorkflowPackage workflowPackage=null;   
    Connection conn=null;
    try
    {
      conn=ConnUtils.getConnection(store);
       
View Full Code Here

    }
    else if (xpdlFileBase.startsWith("file:"))
    {
      xpdlFileBase = xpdlFileBase.substring(5);
    }
    WorkflowPackage workflowPackage;
    try
    {
      workflowPackage = xpdlParser.parse(new File(xpdlFileBase));
    }
    catch (IOException e)
    {
      throw new WorkflowException(e);
    }

    //------------------------------------------------------------
    //  VERY IMPORTANT CODE SECTION  BY ZOSATAPO 2004-10-30
    //
    //  TO Initialize WorkflowProcess and WorkflowActivity Listeners
    //------------------------------------------------------------   
    XPDLParserTools.externalFormat(workflowPackage, context.getLoader().getClassLoader());

    String threadName = "EventMonitorThread[" + toString() + " - "+workflowPackage.getName()+"]";
    EventMonitorThread eventMonitorThread = new EventMonitorThread(threadName);
    eventMonitorThread.setDaemon(true);
    context.putEventMonitorThread(workflowPackage,eventMonitorThread);
   
    context.addWorkflowPackage(workflowPackage);
View Full Code Here

  }
  public void remove(String xpdlFileName) throws WorkflowException
  {
    if (deployed.containsKey(xpdlFileName))
    {
      WorkflowPackage workflowPackage = findDeployedPackage(xpdlFileName);
           
      EventMonitorThread eventMonitorThread = context.getEventMonitorThread(workflowPackage);
      eventMonitorThread.interrupt();
      try
      {
        eventMonitorThread.join();
      }
      catch (InterruptedException e)
      {
        ;
      }
      context.removeEventMonitorThread(workflowPackage);
      eventMonitorThread = null;
     
      context.reomveWorkflowPackage(workflowPackage.getUUID());         
      deployed.remove(xpdlFileName);
    }
  }
View Full Code Here

    List outTrans = new ArrayList();
    WorkflowActivity workActivity = workflowWork.getWorkflowActivity();
    List transList = workActivity.getOutgoingTransitions();
    WorkflowProcess workflowProcess = workActivity.getWorkflowProcess();
    WorkflowPackage workflowPackage = workflowProcess.getWorkflowPackage();
    ScriptInterpretor interpretor = workflowService.getScriptInterpretor();

    RuntimeContext context = null;
    WorkflowCase workflowCase = workflowWork.getWorkflowCase();
    WorkflowCaseContext caseContext = workflowCase.getCaseContext();
View Full Code Here

    List outTrans = new ArrayList();
    WorkflowActivity workActivity = workflowWork.getWorkflowActivity();
    List transList = workActivity.getOutgoingTransitions();
    WorkflowProcess workflowProcess = workActivity.getWorkflowProcess();
    WorkflowPackage workflowPackage = workflowProcess.getWorkflowPackage();
    ScriptInterpretor interpretor = workflowService.getScriptInterpretor();

    RuntimeContext context = null;
    WorkflowCase workflowCase = workflowWork.getWorkflowCase();
    WorkflowCaseContext caseContext = workflowCase.getCaseContext();
View Full Code Here

    {
      return derivedPackageName;
    }

    WorkflowProcess workflowProcess = workflowTransition.getWorkflowProcess();
    WorkflowPackage workflowPackage = workflowProcess.getWorkflowPackage();
    derivedPackageName = formatJavaID("_" + workflowPackage.getUUID() + "._" + workflowProcess.getUUID());

    return derivedPackageName;
  }
View Full Code Here

   
    System.err.println(xpdl.exists()+ " "+xpdl.getAbsolutePath());
   
    FileInputStream fis =new FileInputStream(xpdl);
    XPDLParserFactory xpdlParserFactory=new XPDLParserFactoryImpl();
    WorkflowPackage workflowPackage=xpdlParserFactory.newXPDLParser().parse(fis);
   
    XPDLSerializer serializer=new DefaultXPDLSerializer();
   
    FileWriter writer=new FileWriter(new File("G:\\huihoo-willow-1.1\\xpdl.xml"));
    serializer.serialize(workflowPackage,writer);
View Full Code Here

      String[] xpdlFileNames = findDeployedPackages();
      if (xpdlFileNames != null && xpdlFileNames.length > 0)
      {
        for (int i = 0; i < xpdlFileNames.length; ++i)
        {
          WorkflowPackage workflowPackage = findDeployedPackage(xpdlFileNames[i]);
          EventMonitorThread eventMonitorThread = this.getEventMonitorThread(workflowPackage);
          eventMonitorThread.start();
        }
      }
    }
    else
    {
      //has been stopped

      String[] xpdlFileNames = findDeployedPackages();
      if (xpdlFileNames != null && xpdlFileNames.length > 0)
      {
        for (int i = 0; i < xpdlFileNames.length; ++i)
        {
          WorkflowPackage workflowPackage = findDeployedPackage(xpdlFileNames[i]);
          String threadName = "EventMonitorThread[" + toString() + " - " + workflowPackage.getName() + "]";
          EventMonitorThread eventMonitorThread = new EventMonitorThread(threadName);
          eventMonitorThread.setDaemon(true);
          eventMonitorThread.start();
          this.putEventMonitorThread(workflowPackage, eventMonitorThread);
        }
View Full Code Here

      String[] xpdlFileNames = findDeployedPackages();
      if (xpdlFileNames != null && xpdlFileNames.length > 0)
      {
        for (int i = 0; i < xpdlFileNames.length; ++i)
        {
          WorkflowPackage workflowPackage = findDeployedPackage(xpdlFileNames[i]);

          EventMonitorThread eventMonitorThread = this.getEventMonitorThread(workflowPackage);
          eventMonitorThread.interrupt();
          try
          {
View Full Code Here

TOP

Related Classes of org.huihoo.workflow.xpdl.WorkflowPackage

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.