0 Replies Latest reply on Jul 22, 2007 3:33 PM by jim.barrows

    How do I start a process, and have the initial task availabl

    jim.barrows

      Here's the scenario:
      User wants to start a new process, and clicks on the Start Process Button, which takes them to the initial page in the process. The fill in the page, hit the submit button and things hapen from there on.
      So, my starProcess button

      <s:link action="#{inspectionProcess.createInspection}"
       value="New Inspection" />

      And the method:
      @CreateProcess(definition = "InspectionProcess")
       @Begin
       public String createInspection() {
       if (logger.isDebugEnabled()) {
       logger.debug("createInspection() - start"); //$NON-NLS-1$
       }
      
       if (logger.isDebugEnabled()) {
       logger.debug("createInspection() - end"); //$NON-NLS-1$
       }
       return "/inspection.xhtml";
       }
      

      This does start the process, and seems move the proces to the first task. However the businesprocess component does not have the first task id in it.
      Here's the relevant part of jpdl:
      <start-state name="start">
       <transition to="gatherInfo" />
       </start-state>
      
       <task-node name="gatherInfo">
       <task name="createInspection" description="Select a Client">
       <assignment actor-id="#{actor.id}" />
       </task>
       <transition to="sampleCollection" />
       </task-node>

      When I go to the list task page, I can see that the createInspection task has been started, however when the user clicks the submit button :
      <h:commandButton id="start" value="Start Inspection"
       action="#{inspectionProcess.inspectionCreated}" >
       <s:taskId/>
       </h:commandButton>

      I'm told that the taskId does not exist. How do I create the process, and put the initial task somewhere it can be used?