Skip navigation links
com.smartgwt.client.util.workflow

Class Process

    • Constructor Detail

      • Process

        public Process()
    • Method Detail

      • setContainerId

        public void setContainerId(String containerId)
        Identifier of canvas where should be added UI elements created by using inline view property.
        Parameters:
        containerId - Default value is null
      • getContainerId

        public String getContainerId()
        Identifier of canvas where should be added UI elements created by using inline view property.
        Returns:
        String
      • setElements

        public void setElements(ProcessElement... elements)
                         throws IllegalStateException
        Elements involved in this Process. You can also group elements into sequences to reduce the need to explicitly define IDs for elements and interlink them.
        Parameters:
        elements - Default value is null
        Throws:
        IllegalStateException - this property cannot be changed after the underlying component has been created
      • setSequences

        public void setSequences(ProcessSequence... sequences)
                          throws IllegalStateException
        Sequences of ProcessElements. By defining a sequences of elements you can make the ProcessElement.nextElement implicit.

        Example of using sequences:

          Process process = new Process();
          process.setStartElement("firstSequence");
          ProcessSequence innerSequence = new ProcessSequence(incTask, add2Task, incTask);
          process.setSequences(
              new ProcessSequence("firstSequence", serviceTask, decisionGateway),
              new ProcessSequence("errorFlow", failureTask, userNotifyTask)
          );
          // standalone process elements not part of sequences
          process.setElements(new ServiceTask(){...});
          Record state = new Record();
          state.setAttribute("someField", "someValue");
          process.setState(state);
          process.start();
          
        Parameters:
        sequences - Default value is null
        Throws:
        IllegalStateException - this property cannot be changed after the underlying component has been created
      • getSequences

        public ProcessSequence[] getSequences()
        Sequences of ProcessElements. By defining a sequences of elements you can make the ProcessElement.nextElement implicit.

        Example of using sequences:

          Process process = new Process();
          process.setStartElement("firstSequence");
          ProcessSequence innerSequence = new ProcessSequence(incTask, add2Task, incTask);
          process.setSequences(
              new ProcessSequence("firstSequence", serviceTask, decisionGateway),
              new ProcessSequence("errorFlow", failureTask, userNotifyTask)
          );
          // standalone process elements not part of sequences
          process.setElements(new ServiceTask(){...});
          Record state = new Record();
          state.setAttribute("someField", "someValue");
          process.setState(state);
          process.start();
          
        Returns:
        ProcessSequence...
      • setSetState

        public void setSetState(Record setState)
        Set new process state.
        Parameters:
        setState - Default value is null
      • getSetState

        public Record getSetState()
        Set new process state.
        Returns:
        Record
      • setStartElement

        public void setStartElement(String startElement)
                             throws IllegalStateException
        The ID of either a sequence or an element which should be the starting point of the process. If not specified, the first sequence is chosen, or if there are no sequences, the first element. - log a warning and do nothing if there are neither sequences or elements
        Parameters:
        startElement - Default value is null
        Throws:
        IllegalStateException - this property cannot be changed after the underlying component has been created
      • getStartElement

        public String getStartElement()
        The ID of either a sequence or an element which should be the starting point of the process. If not specified, the first sequence is chosen, or if there are no sequences, the first element. - log a warning and do nothing if there are neither sequences or elements
        Returns:
        String
      • setState

        public void setState(Record state)
        Current state of a process. As with Records in general, any field of a Record may contain a nested Record or Array of Records, so the process state is essentially a hierarchical data structure.

        If this method is called after the component has been drawn/initialized: Set process state for current process
        Parameters:
        state - the new process state. Default value is null
      • getState

        public Record getState()
        Current state of a process. As with Records in general, any field of a Record may contain a nested Record or Array of Records, so the process state is essentially a hierarchical data structure.
        Returns:
        Record
      • setWizard

        public void setWizard(Boolean wizard)
                       throws IllegalStateException
        If wizard is set then current workflow will be handled as wizard. Every userTask will hide associated form after user finished step.
        Parameters:
        wizard - Default value is false
        Throws:
        IllegalStateException - this property cannot be changed after the underlying component has been created
      • getWizard

        public Boolean getWizard()
        If wizard is set then current workflow will be handled as wizard. Every userTask will hide associated form after user finished step.
        Returns:
        Boolean
      • finished

        public void finished(Record state)
        StringMethod called when a process completes, meaning the process executes a ProcessElement with no next element.
        Parameters:
        state - the final process state
      • getElement

        public ProcessElement getElement(String ID)
        Retrieve a ProcessElement by it's ID
        Parameters:
        ID - id of the process element
        Returns:
        the indicated process element, or null if no such element exists
      • reset

        public void reset(Record state)
        Reset process to it's initial state, so process can be started again.
        Parameters:
        state - new state of the process
      • start

        public void start()
        Starts this task by executing the startElement.
      • getProcess

        public static Process getProcess(String processId)
        Get a Process instance by it's ID. See loadProcess().
        Parameters:
        processId - process IDs to retrieve
        Returns:
        the process, or null if not loaded
      • getElements

        public ProcessElement[] getElements()
        Elements involved in this Process. You can also group elements into sequences to reduce the need to explicitly define IDs for elements and interlink them.
        Returns:
        ProcessElement
      • onInit_Process

        protected void onInit_Process()