Exemplo n.º 1
0
    def initialize(self):
        """
        Initialize the WorkflowStep class.

        By creating the source data URI, and
        parsing the step templates.

        Args:
            self: class instance.

        Returns:
            On success: True.
            On failure: False.

        """
        # parse data uris in StageableData class
        if not StageableData.initialize(self):
            msg = 'cannot initialize data staging'
            Log.an().error(msg)
            return self._fatal(msg)

        # create data uri in the source context
        if not self._init_data_uri():
            msg = 'cannot create data uris'
            Log.an().error(msg)
            return self._fatal(msg)

        # make sure URIs for dependent steps match step dict
        # and app context
        if not self._validate_depend_uris():
            msg = 'validation failed for dependent step uris'
            Log.an().error(msg)
            return self._fatal(msg)

        # build template replacement list
        if not self._build_replace():
            msg = 'cannot build replacement strings for templates'
            Log.an().error(msg)
            return self._fatal(msg)

        # parse map uri
        if not self._parse_map_uri():
            msg = 'cannot parse map uri'
            Log.an().error(msg)
            return self._fatal(msg)

        return True
Exemplo n.º 2
0
    def initialize(self):
        """
        Initialize the WorkflowInput class.

        Initialize the base classes and checking for the
        existence of the source data URI.

        Args:
            self: class instance.

        Returns:
            On success: True.
            On failure: False.

        """
        # parse data URIs in StageableData class
        if not StageableData.initialize(self):
            msg = 'cannot initialize data staging'
            Log.an().error(msg)
            return False

        return True