in workflows-generator/WorkflowsGenerator.py [0:0]
def process_steps(self,steps, level_id, thread_id, single_thread):
"""method to process steps"""
step_bodies = []
cloud_function_intermediate_name = self.exec_config.get("pFunctionIntermediateName")
jobs_definitions_bucket = self.exec_config.get("pJobsDefinitionsBucket")
for index, step in enumerate(steps):
step_body = ''
if step.get("TYPE") == 'sync':
step_body = self.process_step_sync(
assemble_cloud_function_id(cloud_function_intermediate_name, self.exec_config), step,
step.get("FUNCTION_NAME"))
elif step.get("TYPE") == 'async':
step_body = self.process_step_async(level_id,
assemble_cloud_function_id(cloud_function_intermediate_name, self.exec_config), step,
step.get("FUNCTION_ID_NAME"),
step.get("FUNCTION_STATUS_NAME"),jobs_definitions_bucket)
#TODO workflows functionality
elif step.get("TYPE") == 'workflows':
workflows_name = step.get("workflows_name")
workflows_id = assemble_workflows_id(workflows_name)
step_body = self.process_step_workflows(workflows_id, step)
step_body = step_body.replace("{LEVEL_ID}", level_id)
step_body = step_body.replace("{THREAD_ID}", thread_id)
step_body = self.process_next_step(steps, step, index, level_id, thread_id, step_body,single_thread)
step_bodies.append(step_body)
return step_bodies