Class WorkflowMeta

    • Field Detail

      • workflowVersion

        protected String workflowVersion
      • workflowStatus

        protected int workflowStatus
      • arguments

        protected String[] arguments
      • changedActions

        protected boolean changedActions
      • changedHops

        protected boolean changedHops
      • startActionName

        protected String startActionName
      • expandingRemoteWorkflow

        protected boolean expandingRemoteWorkflow
      • max

        public boolean[] max
        List of booleans indicating whether or not to remember the size and position of the different windows...
    • Method Detail

      • clear

        public void clear()
        Clears or reinitializes many of the WorkflowMeta properties.
        Overrides:
        clear in class AbstractMeta
      • addDefaults

        public void addDefaults()
        Adds the defaults.
      • getStart

        public ActionMeta getStart()
        Gets the start.
        Returns:
        the start
      • compare

        public int compare​(WorkflowMeta j1,
                           WorkflowMeta j2)
        Compares two workflow on name, filename, etc. The comparison algorithm is as follows:
        1. The first workflow's filename is checked first; if it has none, the workflow is created. If the second workflow does not come from a repository, -1 is returned.
        2. If the workflows are both created, the workflows' names are compared. If the first workflow has no name and the second one does, a -1 is returned. If the opposite is true, a 1 is returned.
        3. If they both have names they are compared as strings. If the result is non-zero it is returned.
        Parameters:
        j1 - the first workflow to compare
        j2 - the second workflow to compare
        Returns:
        0 if the two workflows are equal, 1 or -1 depending on the values (see description above)
      • equals

        public boolean equals​(Object obj)
        Checks whether this workflow's meta-data object is equal to the specified object. If the specified object is not an instance of WorkflowMeta, false is returned. Otherwise the method returns whether a call to compare() indicates equality (i.e. compare(this, (WorkflowMeta)obj)==0).
        Overrides:
        equals in class Object
        Parameters:
        obj - the obj
        Returns:
        true, if successful
        See Also:
        compare(WorkflowMeta, WorkflowMeta), Object.equals(Object)
      • clone

        public Object clone()
        Clones the workflow meta-data object.
        Overrides:
        clone in class Object
        Returns:
        a clone of the workflow meta-data object
        See Also:
        Object.clone()
      • realClone

        public Object realClone​(boolean doClear)
        Perform a real clone of the workflow meta-data object, including cloning all lists and copying all values. If the doClear parameter is true, the clone will be cleared of ALL values before the copy. If false, only the copied fields will be cleared.
        Parameters:
        doClear - Whether to clear all of the clone's data before copying from the source object
        Returns:
        a real clone of the calling object
      • getAction

        public ActionMeta getAction​(int x,
                                    int y,
                                    int iconsize)
        Gets the action copy.
        Parameters:
        x - the x
        y - the y
        iconsize - the iconsize
        Returns:
        the action copy
      • nrActions

        public int nrActions()
        Nr actions.
        Returns:
        the int
      • nrWorkflowHops

        public int nrWorkflowHops()
        Nr workflow hops.
        Returns:
        the int
      • getWorkflowHop

        public WorkflowHopMeta getWorkflowHop​(int i)
        Gets the workflow hop.
        Parameters:
        i - the i
        Returns:
        the workflow hop
      • getAction

        public ActionMeta getAction​(int i)
        Gets the action.
        Parameters:
        i - the i
        Returns:
        the action
      • addAction

        public void addAction​(ActionMeta action)
        Adds the action.
        Parameters:
        action - the je
      • addWorkflowHop

        public void addWorkflowHop​(WorkflowHopMeta hop)
        Adds the workflow hop.
        Parameters:
        hop - the hi
      • addAction

        public void addAction​(int p,
                              ActionMeta action)
        Adds the action.
        Parameters:
        p - the p
        action - the si
      • addWorkflowHop

        public void addWorkflowHop​(int p,
                                   WorkflowHopMeta hop)
        Adds the workflow hop.
        Parameters:
        p - the p
        hop - the hi
      • removeAction

        public void removeAction​(int i)
        Removes the action.
        Parameters:
        i - the i
      • removeWorkflowHop

        public void removeWorkflowHop​(int i)
        Removes the workflow hop.
        Parameters:
        i - the i
      • removeWorkflowHop

        public void removeWorkflowHop​(WorkflowHopMeta hop)
        Removes a hop from the pipeline. Also marks that the pipeline's hops have changed.
        Parameters:
        hop - The hop to remove from the list of hops
      • indexOfWorkflowHop

        public int indexOfWorkflowHop​(WorkflowHopMeta hop)
        Index of workflow hop.
        Parameters:
        hop - the workflow hop
        Returns:
        the int
      • indexOfAction

        public int indexOfAction​(ActionMeta action)
        Index of action.
        Parameters:
        action - the ActionMeta
        Returns:
        the int
      • setAction

        public void setAction​(int idx,
                              ActionMeta action)
        Sets the action.
        Parameters:
        idx - the idx
        action - the jec
      • findAction

        public ActionMeta findAction​(String name)
        Find an existing ActionMeta by it's name and number
        Parameters:
        name - The name of the action meta
        Returns:
        The ActionMeta or null if nothing was found!
      • findWorkflowHop

        public WorkflowHopMeta findWorkflowHop​(String name)
        Find workflow hop.
        Parameters:
        name - the name
        Returns:
        the workflow hop meta
      • findWorkflowHopFrom

        public WorkflowHopMeta findWorkflowHopFrom​(ActionMeta action)
        Find workflow hop from.
        Parameters:
        action - the action meta
        Returns:
        the workflow hop meta
      • findWorkflowHop

        public WorkflowHopMeta findWorkflowHop​(ActionMeta from,
                                               ActionMeta to)
        Find workflow hop.
        Parameters:
        from - the from
        to - the to
        Returns:
        the workflow hop meta
      • findWorkflowHop

        public WorkflowHopMeta findWorkflowHop​(ActionMeta from,
                                               ActionMeta to,
                                               boolean includeDisabled)
        Find workflow hop.
        Parameters:
        from - the from
        to - the to
        includeDisabled - the include disabled
        Returns:
        the workflow hop meta
      • findWorkflowHopTo

        public WorkflowHopMeta findWorkflowHopTo​(ActionMeta actionMeta)
        Find workflow hop to.
        Parameters:
        actionMeta - the action meta
        Returns:
        the workflow hop meta
      • findNrPrevActions

        public int findNrPrevActions​(ActionMeta from)
        Find nr prev actions.
        Parameters:
        from - the from
        Returns:
        the int
      • findPrevAction

        public ActionMeta findPrevAction​(ActionMeta to,
                                         int nr)
        Find prev action.
        Parameters:
        to - the to
        nr - the nr
        Returns:
        the action copy
      • findNrPrevActions

        public int findNrPrevActions​(ActionMeta to,
                                     boolean info)
        Find nr prev actions.
        Parameters:
        to - the to
        info - the info
        Returns:
        the int
      • findPrevAction

        public ActionMeta findPrevAction​(ActionMeta to,
                                         int nr,
                                         boolean info)
        Find prev action.
        Parameters:
        to - the to
        nr - the nr
        info - the info
        Returns:
        the action copy
      • findNrNextActions

        public int findNrNextActions​(ActionMeta from)
        Find nr next actions.
        Parameters:
        from - the from
        Returns:
        the int
      • findNextAction

        public ActionMeta findNextAction​(ActionMeta from,
                                         int cnt)
        Find next action.
        Parameters:
        from - the from
        cnt - the cnt
        Returns:
        the action copy
      • hasLoop

        public boolean hasLoop​(ActionMeta action)
        Checks for loop.
        Parameters:
        action - the action
        Returns:
        true, if successful
      • hasLoop

        public boolean hasLoop​(ActionMeta action,
                               ActionMeta lookup)
        Checks for loop.
        Parameters:
        action - the action
        lookup - the lookup
        Returns:
        true, if successful
      • isEntryUsedInHops

        public boolean isEntryUsedInHops​(ActionMeta action)
        Checks if is action used in hops.
        Parameters:
        action - the jge
        Returns:
        true, if is action used in hops
      • countEntries

        public int countEntries​(String name)
        Count actions.
        Parameters:
        name - the name
        Returns:
        the int
      • getAlternativeActionName

        public String getAlternativeActionName​(String name)
        Proposes an alternative action name when the original already exists...
        Parameters:
        name - The action name to find an alternative for..
        Returns:
        The alternative action name.
      • getAllWorkflowGraphActions

        public ActionMeta[] getAllWorkflowGraphActions​(String name)
        Gets the all workflow graph actions.
        Parameters:
        name - the name
        Returns:
        the all workflow graph actions
      • getAllWorkflowHopsUsing

        public WorkflowHopMeta[] getAllWorkflowHopsUsing​(String name)
        Gets the all workflow hops using.
        Parameters:
        name - the name
        Returns:
        the all workflow hops using
      • isPathExist

        public boolean isPathExist​(IAction from,
                                   IAction to)
      • selectAll

        public void selectAll()
        Select all.
      • unselectAll

        public void unselectAll()
        Unselect all.
      • getMaximum

        public Point getMaximum()
        Gets the maximum.
        Returns:
        the maximum
      • getMinimum

        public Point getMinimum()
        Get the minimum point on the canvas of a workflow
        Returns:
        Minimum coordinate of a transform in the workflow
      • getSelectedLocations

        public Point[] getSelectedLocations()
        Gets the selected locations.
        Returns:
        the selected locations
      • getSelectedNoteLocations

        public Point[] getSelectedNoteLocations()
        Get all the selected note locations
        Returns:
        The selected transform and notes locations.
      • getSelectedActions

        public List<ActionMeta> getSelectedActions()
        Gets the selected actions.
        Returns:
        the selected actions
      • getActionIndexes

        public int[] getActionIndexes​(List<ActionMeta> actions)
        Gets the action indexes.
        Parameters:
        actions - the actions
        Returns:
        the action indexes
      • findStart

        public ActionMeta findStart()
        Find start.
        Returns:
        the action copy
      • toString

        public String toString()
        Gets a textual representation of the workflow. If its name has been set, it will be returned, otherwise the classname is returned.
        Overrides:
        toString in class Object
        Returns:
        the textual representation of the workflow.
      • getStringList

        public List<StringSearchResult> getStringList​(boolean searchTransforms,
                                                      boolean searchDatabases,
                                                      boolean searchNotes)
        Get a list of all the strings used in this workflow.
        Returns:
        A list of StringSearchResult with strings used in the workflow
      • getUsedVariables

        public List<String> getUsedVariables()
        Gets the used variables.
        Returns:
        the used variables
      • haveActionsChanged

        public boolean haveActionsChanged()
        Have actions changed.
        Returns:
        true, if successful
      • haveWorkflowHopsChanged

        public boolean haveWorkflowHopsChanged()
        Have workflow hops changed.
        Returns:
        true, if successful
      • getWorkflowVersion

        public String getWorkflowVersion()
        Gets the version of the workflow.
        Returns:
        The version of the workflow
      • getWorkflowStatus

        public int getWorkflowStatus()
        Gets the status of the workflow.
        Returns:
        the status of the workflow
      • setWorkflowVersion

        public void setWorkflowVersion​(String jobVersion)
        Set the version of the workflow.
        Parameters:
        jobVersion - The new version description of the workflow
      • setWorkflowStatus

        public void setWorkflowStatus​(int status)
        Set the status of the workflow.
        Parameters:
        status - The new status description of the workflow
      • updateCurrentDir

        protected void updateCurrentDir​(IVariables variables)
      • setInternalNameHopVariable

        protected void setInternalNameHopVariable​(IVariables variables)
        Sets the internal name hop variable.
        Specified by:
        setInternalNameHopVariable in class AbstractMeta
        Parameters:
        variables - the new internal name hop variable
      • setInternalFilenameHopVariables

        protected void setInternalFilenameHopVariables​(IVariables variables)
        Sets the internal filename hop variables.
        Specified by:
        setInternalFilenameHopVariables in class AbstractMeta
        Parameters:
        variables - the new internal filename hop variables
      • setInternalEntryCurrentDirectory

        protected void setInternalEntryCurrentDirectory​(IVariables variables)
      • checkActions

        public void checkActions​(List<ICheckResult> remarks,
                                 boolean onlySelected,
                                 IProgressMonitor monitor,
                                 IVariables variables,
                                 IHopMetadataProvider metadataProvider)
        Check all actions within the workflow. Each Workflow Action has the opportunity to check their own settings.
        Parameters:
        remarks - List of CheckResult remarks inserted into by each Action
        onlySelected - true if you only want to check the selected workflows
        monitor - Progress monitor (not presently in use)
      • getResourceDependencies

        public List<ResourceReference> getResourceDependencies​(IVariables variables)
        Gets the resource dependencies.
        Returns:
        the resource dependencies
      • exportResources

        public String exportResources​(IVariables variables,
                                      Map<String,​ResourceDefinition> definitions,
                                      IResourceNaming namingInterface,
                                      IHopMetadataProvider metadataProvider)
                               throws HopException
        Description copied from interface: IResourceExport
        Exports the object to a flat-file system, adding content with filename keys to a set of definitions. The supplied resource naming interface allows the object to name appropriately without worrying about those parts of the implementation specific details.
        Specified by:
        exportResources in interface IResourceExport
        Parameters:
        variables - The variable variables to resolve (environment) variables with.
        definitions - The map containing the filenames and content
        namingInterface - The resource naming interface allows the object to name appropriately
        metadataProvider - the central metadata to load non-hop specific metadata from
        Returns:
        The filename for this object. (also contained in the definitions map)
        Throws:
        HopException - in case something goes wrong during the export
      • renameActionIfNameCollides

        public void renameActionIfNameCollides​(ActionMeta actionMeta)
        See if the name of the supplied action doesn't collide with any other action in the workflow.
        Parameters:
        actionMeta - The action copy to verify the name for.
      • getActions

        public List<ActionMeta> getActions()
        Gets the workflow actions.
        Returns:
        the workflow actions
      • getWorkflowHops

        public List<WorkflowHopMeta> getWorkflowHops()
        Gets the workflow hops.
        Returns:
        the workflow hops
      • composeActionList

        public List<IAction> composeActionList()
        Create a unique list of action interfaces
        Returns:
      • getLogChannelId

        public String getLogChannelId()
      • containsAction

        public boolean containsAction​(ActionMeta actionMeta)
      • addMissingAction

        public void addMissingAction​(MissingAction missingAction)
      • removeMissingAction

        public void removeMissingAction​(MissingAction missingAction)
      • getStartActionName

        public String getStartActionName()
      • setStartActionName

        public void setStartActionName​(String name)
      • isExpandingRemoteWorkflow

        public boolean isExpandingRemoteWorkflow()
      • setExpandingRemoteWorkflow

        public void setExpandingRemoteWorkflow​(boolean expandingRemoteWorkflow)
      • isEmpty

        public boolean isEmpty()
      • setInfo

        public void setInfo​(WorkflowMetaInfo info)
        Sets info
        Parameters:
        info - value of info
      • getName

        public String getName()
        Get the name of the workflow. If the name is synchronized with the filename, we return the base filename.
        Specified by:
        getName in interface IEngineMeta
        Specified by:
        getName in class AbstractMeta
        Returns:
        The name of the workflow
      • getDescription

        public String getDescription()
        Gets the description of the workflow.
        Specified by:
        getDescription in class AbstractMeta
        Returns:
        The description of the workflow
      • setDescription

        public void setDescription​(String description)
        Set the description of the workflow.
        Specified by:
        setDescription in class AbstractMeta
        Parameters:
        description - The new description of the workflow
      • getExtendedDescription

        public String getExtendedDescription()
        Gets the extended description of the workflow.
        Specified by:
        getExtendedDescription in class AbstractMeta
        Returns:
        The extended description of the workflow
      • setExtendedDescription

        public void setExtendedDescription​(String extendedDescription)
        Set the description of the workflow.
        Specified by:
        setExtendedDescription in class AbstractMeta
        Parameters:
        extendedDescription - The new extended description of the workflow