def filter(self,
               status=WorkflowExecution.STATUS_OPEN, tag=None,
               workflow_id=None, workflow_type_name=None,
               workflow_type_version=None,
               *args, **kwargs):
        """Filters workflow executions based on kwargs provided criteras

        :param  status: workflow executions with provided status will be kept.
                        Valid values are:
                        * ``swf.models.WorkflowExecution.STATUS_OPEN``
                        * ``swf.models.WorkflowExecution.STATUS_CLOSED``
        :type   status: string

        :param  tag: workflow executions containing the tag will be kept
        :type   tag: String

        :param  workflow_id: workflow executions attached to the id will be kept
        :type   workflow_id: String

        :param  workflow_type_name: workflow executions attached to the workflow type
                                    with provided name will be kept
        :type   workflow_type_name: String

        :param  workflow_type_version: workflow executions attached to the workflow type
                                       of the provided version will be kept
        :type   workflow_type_version: String

        **Be aware that** querying over status allows the usage of statuses specific
        kwargs

        * STATUS_OPEN

            :param start_latest_date: latest start or close date and time to return (in days)
            :type  start_latest_date: int

        * STATUS_CLOSED

            :param  start_latest_date: workflow executions that meet the start time criteria
                                       of the filter are kept (in days)
            :type   start_latest_date: int

            :param  start_oldest_date: workflow executions that meet the start time criteria
                                       of the filter are kept (in days)
            :type   start_oldest_date: int

            :param  close_latest_date: workflow executions that meet the close time criteria
                                       of the filter are kept (in days)
            :type   close_latest_date: int

            :param  close_oldest_date: workflow executions that meet the close time criteria
                                       of the filter are kept (in days)
            :type   close_oldest_date: int

            :param  close_status: must match the close status of an execution for it
                                  to meet the criteria of this filter.
                                  Valid values are:
                                  * ``CLOSE_STATUS_COMPLETED``
                                  * ``CLOSE_STATUS_FAILED``
                                  * ``CLOSE_STATUS_CANCELED``
                                  * ``CLOSE_STATUS_TERMINATED``
                                  * ``CLOSE_STATUS_CONTINUED_AS_NEW``
                                  * ``CLOSE_TIMED_OUT``
            :type   close_status: string

            :returns: workflow executions objects list
            :rtype: list
        """
        # As WorkflowTypeQuery has to be built against a specific domain
        # name, domain filter is disposable, but not mandatory.
        invalid_kwargs = self._validate_status_parameters(status, kwargs)

        if invalid_kwargs:
            err_msg = 'Invalid keyword arguments supplied: {}'.format(
                      ', '.join(invalid_kwargs))
            raise InvalidKeywordArgumentError(err_msg)

        if status == WorkflowExecution.STATUS_OPEN:
            oldest_date = kwargs.pop('oldest_date', 30)
        else:
            # The SWF docs on ListClosedWorkflowExecutions state that:
            #
            #   "startTimeFilter and closeTimeFilter are mutually exclusive"
            #
            # so we must figure out if we have to add a default value for
            # start_oldest_date or not.
            if "close_latest_date" in kwargs or "close_oldest_date" in kwargs:
                default_oldest_date = None
            else:
                default_oldest_date = 30
            oldest_date = kwargs.pop('start_oldest_date', default_oldest_date)

        # Compute a timestamp from the delta in days we got from params
        # If oldest_date is blank at this point, it's because we didn't want
        # it, so let's leave it blank and assume the user provided an other
        # time filter.
        if oldest_date:
            start_oldest_date = int(datetime_timestamp(past_day(oldest_date)))
        else:
            start_oldest_date = None

        return [self.to_WorkflowExecution(self.domain, wfe) for wfe in
                self._list_items(
                    *args,
                    domain=self.domain.name,
                    status=status,
                    workflow_id=workflow_id,
                    workflow_name=workflow_type_name,
                    workflow_version=workflow_type_version,
                    start_oldest_date=start_oldest_date,
                    tag=tag,
                    **kwargs
                )]