# Path: botoflow/decorators.py
# def execute(version,
#             execution_start_to_close_timeout,
#             task_list=USE_WORKER_TASK_LIST,
#             task_priority=None,
#             task_start_to_close_timeout=30,  # as in java flow
#             child_policy=CHILD_TERMINATE,
#             data_converter=None,
#             description=None,
#             skip_registration=False):
#     """This decorator indicates the entry point of the workflow.
# 
#     The entry point of the workflow can be invoked remotely by your application
#     using :py:class`~botoflow.workflow_starter.workflow_starter` or direct API call from ``boto3`` or
#     `AWS CLI <http://docs.aws.amazon.com/cli/latest/reference/swf/start-workflow-execution.html>`_.
# 
#     :param str version: Required version of the workflow type. Maximum length
#         is 64 characters.
#     :param int execution_start_to_close_timeout: Specifies the
#         defaultExecutionStartToCloseTimeout registered with Amazon SWF for the
#         workflow type. This specifies the total time a workflow execution of
#         this type may take to complete. See the Amazon SWF API reference for
#         more details.
#     :param str task_list: The default task list for the decision tasks for
#         executions of this workflow type. The default can be overridden using
#         :py:func`~botoflow.options_overrides.workflow_options` when starting a
#         workflow execution. Set to
#         :py:data:`~botoflow.constants.USE_WORKER_TASK_LIST` by default. This is
#         a special value which indicates that the task list used by the worker,
#         which is performing the registration, should be used.
#     :param int task_priority: The default priority for decision tasks for
#         executions of this workflow type. The default can be overridden using
#         :py:func`~botoflow.options_overrides.workflow_options` when starting a
#         workflow execution. If unset AWS SWF defaults this to 0.
#     :param int task_start_to_close_timeout: Specifies the
#         defaultTaskStartToCloseTimeout registered with Amazon SWF for the
#         workflow type. This specifies the time a single decision task for a
#         workflow execution of this type may take to complete. See the Amazon
#         SWF API reference for more details. The default is 30 seconds.
#     :param str child_policy: Specifies the policy to use for the child
#         workflows if an execution of this type is terminated. The default value
#         is :py:data:`~botoflow.constants.CHILD_TERMINATE`.
#     :param data_converter: Specifies the type of the DataConverter to use for
#         serializing/deserializing data when sending requests to and receiving
#         results from workflow executions of this workflow type.  Set to `None`
#         by default, which indicates that the JsonDataConverter should be used.
#     :type data_converter: :py:class:`~botoflow.data_converter.abstract_data_converter.AbstractDataConverter`
#     :param description: Textual description of the workflow definition. By
#         default will use the docstring of the workflow definition class if
#         available. The maximum length is 1024 characters, so a long docstring
#         will be truncated to that length.
#     :type description: str or None
#     :param bool skip_registration: Indicates that the workflow type should not
#         be registered with Amazon SWF.
#     """
#     _workflow_type = WorkflowType(
#         version,
#         task_list=task_list,
#         execution_start_to_close_timeout=execution_start_to_close_timeout,
#         task_start_to_close_timeout=task_start_to_close_timeout,
#         task_priority=task_priority,
#         child_policy=child_policy,
#         data_converter=data_converter,
#         description=description,
#         skip_registration=skip_registration)
# 
#     def _execute(func):
#         # set description
#         if _workflow_type.description is None:
#             _workflow_type.description = func.__doc__
# 
#         _set_swf_options(func, 'workflow_type', _workflow_type)
#         return decorator_descriptors.WorkflowExecuteFunc(func)
# 
#     return _execute
# 
# def signal(name=None):
#     """When used on a method in the WorkflowDefinition subclass, identifies a
#     signal that can be received by executions of the workflow.
#     Use of this decorator is required to define a signal method.
# 
#     :param str name: Specifies the name portion of the signal name.
#         If not set, the name of the method is used.
#     """
# 
#     def _signal(func):
#         _signal_type = SignalType(name=name)
#         if name is None:
#             _signal_type = SignalType(name=func.__name__)
# 
#         _set_swf_options(func, 'signal_type', _signal_type)
#         return decorator_descriptors.SignalFunc(func)
# 
#     return _signal
# 
# Path: botoflow/workflow_definition.py
# class _WorkflowDefinitionMeta(type):
# class WorkflowDefinition(six.with_metaclass(_WorkflowDefinitionMeta, object)):
#     def __new__(mcs, name, bases, dct):
#     def _extract_workflows_and_signals(dct):
#     def __init__(self, workflow_execution):
#     def workflow_execution(self):
#     def workflow_execution(self, workflow_execution):
#     def workflow_state(self):
#     def workflow_state(self, state):
#     def workflow_result(self):
#     def cancel(self, details=""):
#     def cancellation_handler(self):
#     def _get_decision_context(self, calling_func):


from botoflow import execute, signal
from botoflow import workflow_definition as wodef



class SpamWorkflow(wodef.WorkflowDefinition):

    @execute('1.0', 1)
    def execute0(self):
        pass

    @execute('1.0', 1)
    def execute1(self):
        pass


# Path: botoflow/decorators.py
# def execute(version,
#             execution_start_to_close_timeout,
#             task_list=USE_WORKER_TASK_LIST,
#             task_priority=None,
#             task_start_to_close_timeout=30,  # as in java flow
#             child_policy=CHILD_TERMINATE,
#             data_converter=None,
#             description=None,
#             skip_registration=False):
#     """This decorator indicates the entry point of the workflow.
# 
#     The entry point of the workflow can be invoked remotely by your application
#     using :py:class`~botoflow.workflow_starter.workflow_starter` or direct API call from ``boto3`` or
#     `AWS CLI <http://docs.aws.amazon.com/cli/latest/reference/swf/start-workflow-execution.html>`_.
# 
#     :param str version: Required version of the workflow type. Maximum length
#         is 64 characters.
#     :param int execution_start_to_close_timeout: Specifies the
#         defaultExecutionStartToCloseTimeout registered with Amazon SWF for the
#         workflow type. This specifies the total time a workflow execution of
#         this type may take to complete. See the Amazon SWF API reference for
#         more details.
#     :param str task_list: The default task list for the decision tasks for
#         executions of this workflow type. The default can be overridden using
#         :py:func`~botoflow.options_overrides.workflow_options` when starting a
#         workflow execution. Set to
#         :py:data:`~botoflow.constants.USE_WORKER_TASK_LIST` by default. This is
#         a special value which indicates that the task list used by the worker,
#         which is performing the registration, should be used.
#     :param int task_priority: The default priority for decision tasks for
#         executions of this workflow type. The default can be overridden using
#         :py:func`~botoflow.options_overrides.workflow_options` when starting a
#         workflow execution. If unset AWS SWF defaults this to 0.
#     :param int task_start_to_close_timeout: Specifies the
#         defaultTaskStartToCloseTimeout registered with Amazon SWF for the
#         workflow type. This specifies the time a single decision task for a
#         workflow execution of this type may take to complete. See the Amazon
#         SWF API reference for more details. The default is 30 seconds.
#     :param str child_policy: Specifies the policy to use for the child
#         workflows if an execution of this type is terminated. The default value
#         is :py:data:`~botoflow.constants.CHILD_TERMINATE`.
#     :param data_converter: Specifies the type of the DataConverter to use for
#         serializing/deserializing data when sending requests to and receiving
#         results from workflow executions of this workflow type.  Set to `None`
#         by default, which indicates that the JsonDataConverter should be used.
#     :type data_converter: :py:class:`~botoflow.data_converter.abstract_data_converter.AbstractDataConverter`
#     :param description: Textual description of the workflow definition. By
#         default will use the docstring of the workflow definition class if
#         available. The maximum length is 1024 characters, so a long docstring
#         will be truncated to that length.
#     :type description: str or None
#     :param bool skip_registration: Indicates that the workflow type should not
#         be registered with Amazon SWF.
#     """
#     _workflow_type = WorkflowType(
#         version,
#         task_list=task_list,
#         execution_start_to_close_timeout=execution_start_to_close_timeout,
#         task_start_to_close_timeout=task_start_to_close_timeout,
#         task_priority=task_priority,
#         child_policy=child_policy,
#         data_converter=data_converter,
#         description=description,
#         skip_registration=skip_registration)
# 
#     def _execute(func):
#         # set description
#         if _workflow_type.description is None:
#             _workflow_type.description = func.__doc__
# 
#         _set_swf_options(func, 'workflow_type', _workflow_type)
#         return decorator_descriptors.WorkflowExecuteFunc(func)
# 
#     return _execute
# 
# def signal(name=None):
#     """When used on a method in the WorkflowDefinition subclass, identifies a
#     signal that can be received by executions of the workflow.
#     Use of this decorator is required to define a signal method.
# 
#     :param str name: Specifies the name portion of the signal name.
#         If not set, the name of the method is used.
#     """
# 
#     def _signal(func):
#         _signal_type = SignalType(name=name)
#         if name is None:
#             _signal_type = SignalType(name=func.__name__)
# 
#         _set_swf_options(func, 'signal_type', _signal_type)
#         return decorator_descriptors.SignalFunc(func)
# 
#     return _signal
# 
# Path: botoflow/workflow_definition.py
# class _WorkflowDefinitionMeta(type):
# class WorkflowDefinition(six.with_metaclass(_WorkflowDefinitionMeta, object)):
#     def __new__(mcs, name, bases, dct):
#     def _extract_workflows_and_signals(dct):
#     def __init__(self, workflow_execution):
#     def workflow_execution(self):
#     def workflow_execution(self, workflow_execution):
#     def workflow_state(self):
#     def workflow_state(self, state):
#     def workflow_result(self):
#     def cancel(self, details=""):
#     def cancellation_handler(self):
#     def _get_decision_context(self, calling_func):


# Path: test/unit/test_workflow_definition.py
from botoflow import execute, signal
from botoflow import workflow_definition as wodef




class SpamWorkflow(wodef.WorkflowDefinition):

    @execute('1.0', 1)
    def execute0(self):
        pass

    @execute('1.0', 1)
    def execute1(self):
        pass


    @signal()