Package com.defaultcompany.external.model.stdmsg

Examples of com.defaultcompany.external.model.stdmsg.ProcessStartMsg


   
    return adacMsg;
  }
 
  public ProcessStartMsg bindProcessStartMsg(HttpServletRequest request) {
    ProcessStartMsg psMsg = new ProcessStartMsg();
   
    this.bindCommon(request, psMsg);
   
    psMsg.setInitiator(ServletRequestUtils.getStringParameter(request, "initiator", null));
    psMsg.setProcAlias(ServletRequestUtils.getStringParameter(request, "procAlias", null));
   
    psMsg.setApprovalKey(ServletRequestUtils.getStringParameter(request, "approvalKey", null));
    psMsg.setComment(ServletRequestUtils.getStringParameter(request, "comment", null));
    psMsg.setMainParam(ServletRequestUtils.getStringParameter(request, "mainParam", null));
    psMsg.setSubParam(ServletRequestUtils.getStringParameter(request, "subParam", null));
   
    psMsg.setInstanceName(ServletRequestUtils.getStringParameter(request, "instanceName", null));
   
    psMsg.setFirstTaskCompleted(ServletRequestUtils.getBooleanParameter(request, "firstTaskCompleted", true));
   
    return psMsg;
  }
View Full Code Here


      pm = pmfb.getProcessManager();
     
      ProcessManagerService pms = new ProcessManagerService(pm, request);
     
      if (StdMsgContext.CMD_PROCESS_START.equalsIgnoreCase(cmdBpm)) {
        ProcessStartMsg psMsg = stdMsgContext.bindProcessStartMsg(request);
        System.out.println(psMsg);
       
        String newInstanceId = pms.processStart(psMsg);
       
        returnEndpoint = psMsg.getInitiator();
        returnInstanceId = newInstanceId;

      } else if (StdMsgContext.CMD_ACTIVITY_COMPLETE.equalsIgnoreCase(cmdBpm)) {
        ActivityCompleteMsg acMsg = stdMsgContext.bindActivityCompleteMsg(request);
        System.out.println(acMsg);
View Full Code Here

  @SuppressWarnings("unchecked")
  @Override
  protected Element invokeInternal(Element requestElement) throws Exception {
    Element commonElement = requestElement.getChild("common", WORKFLOW_NAMESPACE);

    ProcessStartMsg psMsg = new ProcessStartMsg();

    psMsg.setExternalKey(commonElement.getChildText("externalKey", WORKFLOW_NAMESPACE));
    psMsg.setProcessVariablesByElementList(commonElement.getChildren("processVariable", WORKFLOW_NAMESPACE));
    psMsg.setRolesByElementList(commonElement.getChildren("role", WORKFLOW_NAMESPACE));
   
    psMsg.setInitiator(requestElement.getChildText("initiator", WORKFLOW_NAMESPACE));
    psMsg.setProcAlias(requestElement.getChildText("procAlias", WORKFLOW_NAMESPACE));
    psMsg.setInstanceName(requestElement.getChildText("instanceName", WORKFLOW_NAMESPACE));
   
    psMsg.setApprovalKey(requestElement.getChildText("approvalKey", WORKFLOW_NAMESPACE));
    psMsg.setComment(requestElement.getChildText("comment", WORKFLOW_NAMESPACE));
    psMsg.setMainParam(requestElement.getChildText("mainParam", WORKFLOW_NAMESPACE));
    psMsg.setSubParam(requestElement.getChildText("subParam", WORKFLOW_NAMESPACE));
   
    psMsg.setFirstTaskCompleted(Boolean.parseBoolean(requestElement.getChildText("firstTaskCompleted", WORKFLOW_NAMESPACE)));
   
    System.out.println(psMsg);
   
    String status = null;
    List<TaskInfo> taskInfoList = null;
   
    ProcessManagerFactoryBean pmfb = new ProcessManagerFactoryBean();
    ProcessManagerRemote pm = null;
    try {
      pm = pmfb.getProcessManager();
     
      ProcessManagerService pms = new ProcessManagerService(pm, null);
      String newInstanceId = pms.processStart(psMsg);
      pm.applyChanges();
     
      if (StringUtils.hasText(newInstanceId) && StringUtils.hasText(psMsg.getInitiator())) {
        taskInfoList = pms.getTaskInfo(newInstanceId, psMsg.getInitiator());
      }
     
      status = "S";
     
    } catch (Exception e) {
View Full Code Here

TOP

Related Classes of com.defaultcompany.external.model.stdmsg.ProcessStartMsg

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.