Class ProcessDescription

    • Constructor Detail

      • ProcessDescription

        public ProcessDescription​(ModelElement parent)
        A ProcessDescription is a list or sequence of commands that represent the life of a process
        Parameters:
        parent - the parent model element
      • ProcessDescription

        public ProcessDescription​(ModelElement parent,
                                  java.lang.String name)
        A ProcessDescription is a list or sequence of commands that represent the life of a process
        Parameters:
        parent - the parent model element
        name - The name of process description
    • Method Detail

      • turnOnAutoStart

        public final void turnOnAutoStart()
        Tells the process description that it can auto start executing. That is it will create a default process executor and start processing at the beginning of a replication. The default is no auto start.
      • turnOffAutoStart

        public final void turnOffAutoStart()
        Tells the process description that it should not auto start executing.
      • addProcessCommand

        public final void addProcessCommand​(ProcessCommand command)
        Adds a command to this process description. The order of adding commands determines the sequence of commands to be executed. Notice that commands can only be added at this time. No facilities for removing or rearranging commands have been provided. Once you make the sequence of command, they are set.
        Parameters:
        command - the ProcessCommand to be added.
      • setProcessExecutorCompletedListener

        public final void setProcessExecutorCompletedListener​(ProcessExecutorListenerIfc listener)
        This can be used to automatically add this listener to any ProcessExecutors that are created by this ProcessDescription This listener is notified when the ProcessExecutor is completed. The listener may be null. In which case nothing will be added.
        Parameters:
        listener - The processExecutorCompletedListener to set.
      • setProcessExecutorStartListener

        public final void setProcessExecutorStartListener​(ProcessExecutorListenerIfc listener)
        This can be used to automatically add this listener to any ProcessExecutors that are created by this ProcessDescription This listener is notified when the ProcessExecutor is started. The listener may be null. In which case, nothing will be added.
        Parameters:
        listener - The processExecutorStartListener to set.
      • defineEntityType

        public final EntityType defineEntityType​(java.lang.String name)
        Defines an entity type with the given name and adds it to the available types for this process description
        Parameters:
        name - , the name of the entity type, must be non-null and unique to this process description
        Returns:
        the entity type
      • createProcessExecutor

        public final ProcessExecutor createProcessExecutor()
        Asks the process description to make an instance of a ProcessExecutor in order to execute the commands. This method creates a default entity to be associated with the process.
        Returns:
        An instance of a ProcessExecutor
      • createProcessExecutor

        public ProcessExecutor createProcessExecutor​(Entity entity)
        Asks the process description to make an instance of a ProcessExecutor in order to execute the commands.
        Parameters:
        entity - , An entity to be used within the execution
        Returns:
        An instance of a ProcessExecutor
      • getProcessCommands

        protected java.util.List<ProcessCommand> getProcessCommands()
        Returns the list of commands
        Returns:
        , the list of commands as a List
      • initialize

        protected void initialize()
        Description copied from class: ModelElement
        This method should be overridden by subclasses that need actions performed to initialize prior to a replication. It is called once before each replication occurs if the model element wants initialization. It is called after beforeReplication() is called
        Overrides:
        initialize in class ModelElement
      • afterReplication

        protected void afterReplication()
        Description copied from class: ModelElement
        This method should be overridden by subclasses that need actions performed after each replication. It is called after replicationEnded() has been called.
        Overrides:
        afterReplication in class ModelElement
      • processExecutorTerminated

        protected void processExecutorTerminated​(ProcessExecutor processExecutor)
        This method is automatically called whenever a process executor associated with this process description has been terminated
        Parameters:
        processExecutor -