Package org.jbpm.api

Examples of org.jbpm.api.ProcessInstance


        init();
        Map map = new HashMap();
        //在启动任务时,等于就是一个用户要请假了,那么,此时,要把流程信息关联到此用户上,在开始的下一个节点(也就是第一个任务节点),是指派给。所以用户名要与其对应的变量关联起来
        map.put("owner", getLoginedUserName());
        System.out.println("id_: "+id);
        ProcessInstance processInstance=executionService.startProcessInstanceById(id, map);
        System.out.println("启动时processInstance: "+processInstance.getId());
        return SUCCESS; 
    }
View Full Code Here


     */
    public String view()
    {
        init();
      //通过id查到流程实例
        ProcessInstance processInstance = executionService.findProcessInstanceById(id);
        Set<String> activityNames = processInstance.findActiveActivityNames();
       
        //Coordinates为相依衣物
        ac = repositoryService.getActivityCoordinates(processInstance.getProcessDefinitionId(),activityNames.iterator().next());
        return SUCCESS;
    }
View Full Code Here

     * @throws IOException
     */
    public void pic() throws IOException
    {
        init();
        ProcessInstance processInstance = executionService.findProcessInstanceById(id);
        String processDefinitionId = processInstance.getProcessDefinitionId();
        ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().processDefinitionId(processDefinitionId).uniqueResult();
       
        String path=ServletActionContext.getRequest().getRealPath("");
//        String filePath=path+"\\WEB-INF\\classes\\leave2.png";
        String filePath="leave2.png";
View Full Code Here

    Map map = new HashMap();
    // 在启动任务时,等于就是一个用户要请假了,那么,此时,要把流程信息关联到此用户上,在开始的下一个节点(也就是第一个任务节点),是指派给。所以用户名要与其对应的变量关联起来
    map.put("owner", getLoginedUserName());
    System.out.println(getLoginedUserName()+"lSggggggggggggggggggggggg");
    System.out.println("id_: " + id);
    ProcessInstance processInstance = executionService
        .startProcessInstanceById(id, map);
    System.out.println("启动时processInstance: " + processInstance.getId());
    return SUCCESS;
  }
View Full Code Here

   * @return
   */
  public String view() {
    init();
    // 通过id查到流程实例
    ProcessInstance processInstance = executionService
        .findProcessInstanceById(id);
    Set<String> activityNames = processInstance.findActiveActivityNames();

    // Coordinates为相依衣物
    ac = repositoryService.getActivityCoordinates(processInstance
        .getProcessDefinitionId(), activityNames.iterator().next());
    return SUCCESS;
  }
View Full Code Here

   *
   * @throws IOException
   */
  public void pic() throws IOException {
    init();
    ProcessInstance processInstance = executionService
        .findProcessInstanceById(id);
    String processDefinitionId = processInstance.getProcessDefinitionId();
    ProcessDefinition processDefinition = repositoryService
        .createProcessDefinitionQuery()
        .processDefinitionId(processDefinitionId).uniqueResult();
    ServletContext context = ServletActionContext.getServletContext();
    Date date = new Date();
View Full Code Here

        process.addNode(2L, endEvent);
       
        startEvent.addOutgoingFlow(SequenceFlow.FLOW_DEFAULT_TYPE, new SequenceFlowImpl(SequenceFlow.FLOW_DEFAULT_TYPE, actionNode));
        actionNode.addOutgoingFlow(SequenceFlow.FLOW_DEFAULT_TYPE, new SequenceFlowImpl(SequenceFlow.FLOW_DEFAULT_TYPE, endEvent));
       
        ProcessInstance processInstance = ProcessInstanceFactory.newProcessInstance(process);
               
        processInstance.start();       
   
    }
View Full Code Here

*
* @author salaboy
*/
public class ProcessInstanceFactory {
    public static ProcessInstance newProcessInstance(ProcessDefinition process){
        ProcessInstance instance = new ProcessInstanceImpl(process);
        return instance;
    }
View Full Code Here

TOP

Related Classes of org.jbpm.api.ProcessInstance

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.