Class ProcessusEJB

    • Constructor Detail

      • ProcessusEJB

        public ProcessusEJB()
    • Method Detail

      • clearCache

        public void clearCache​(java.lang.String login,
                               java.lang.String process)
        Specified by:
        clearCache in interface ProcessusInterface
      • loadAlert

        public Alert loadAlert​(int type,
                               java.lang.String name,
                               ObjectDB obj)
        Load the alert definition
        Specified by:
        loadAlert in interface ProcessusInterface
        Parameters:
        type - info or warning
        name - Alert name
        obj - Business object (with a state model)
        Returns:
        Alert definition
      • loadAlert

        public Alert loadAlert​(java.lang.String id,
                               int type,
                               ObjectDB obj)
        Load the alert definition
        Specified by:
        loadAlert in interface ProcessusInterface
        Parameters:
        id - alert id
        type - info or warning
        obj - Business object (with a state model)
        Returns:
        Alert definition
      • lock

        public Message lock​(Activity a,
                            java.lang.String aid)
        Lock the user activity (status RUNNING)
        Specified by:
        lock in interface ProcessusInterface
        Parameters:
        a - Activity
        aid - Activity id
        Returns:
        message
      • unlock

        public Message unlock​(Activity a,
                              java.lang.String aid)
        Unlock the activity (WAITING)
        Specified by:
        unlock in interface ProcessusInterface
        Parameters:
        a - Activity
        aid - Activity id
        Returns:
        message
      • validate

        public Message validate​(ActivityFile context,
                                ObjectDB obj)
        Common activity validation
        Specified by:
        validate in interface ProcessusInterface
        Parameters:
        context - Activity context
        obj - Optional object (CRUD activities)
        Returns:
        Message with the next Activity or errors
      • cancel

        public Message cancel​(Activity a,
                              java.lang.String aid)
        Cancel the activity (status CANCEL)
        Specified by:
        cancel in interface ProcessusInterface
        Parameters:
        a - Activity
        aid - Activity id
        Returns:
        message
      • getContext

        public ActivityFile getContext​(Activity a,
                                       java.lang.String aid)
        Load the activity context
        Specified by:
        getContext in interface ProcessusInterface
        Parameters:
        a - Activity
        aid - Activity file row id
        Returns:
        Activity context
      • getParameter

        public java.util.List<java.lang.String> getParameter​(Processus p,
                                                             java.lang.String road)
        Read a contextual data in the process
        Specified by:
        getParameter in interface ProcessusInterface
        Parameters:
        road - Road of data step[.index].group.data
        Returns:
        Values
      • getParameter

        public java.util.List<java.lang.String> getParameter​(Activity a,
                                                             java.lang.String index,
                                                             java.lang.String group,
                                                             java.lang.String name)
        Read a contextual data in activity
        Specified by:
        getParameter in interface ProcessusInterface
        Parameters:
        a - Activity
        index - First, Last, All, or null
        group - Group of data
        name - Parameter name
        Returns:
        Values
      • parseValue

        public java.lang.String parseValue​(ActivityFile context,
                                           java.lang.String value)
        Parse a value with replacement of tokens under brackets : [userid], [login], [lang], [now], [text:code], [step.index.group.data]
        Specified by:
        parseValue in interface ProcessusInterface
        Parameters:
        context - Activity context
        value - The value to parse
        Returns:
        Parsed value